Ontology for Devs
The Ontology is Carbon Arc's knowledge graph that maps entities (companies, products, tickers, locations, etc.) to insights (metrics and KPIs like revenue, users, spend). Use these APIs to discover what data is available and build queries.
Key Concepts
| Concept | Description |
|---|---|
| Entity | A real-world object like a company, product, app, or location |
| Representation | The type/category of an entity (company, ticker, product, app, etc.) |
| Insight | A metric or KPI that can be queried for entities (Revenue, Users, Transactions) |
API Reference
Available Methods
| Method | Description |
|---|---|
client.ontology.get_entity_map() | Get all available entity types/representations |
client.ontology.get_entities() | List and filter entities (paginated) |
client.ontology.get_insights() | List and filter insights (paginated) |
client.ontology.get_entity_information() | Get details for a specific entity |
client.ontology.get_insight_information() | Get details for a specific insight |
client.ontology.get_entities_for_insight() | Find entities with data for an insight |
client.ontology.get_insights_for_entity() | Find insights with data for an entity |
Quick Start
from carbonarc import CarbonArcClient
client = CarbonArcClient(
host="https://api.carbonarc.co",
token="YOUR_API_TOKEN"
)
Explore Entities
# Get all available entity types
entity_map = client.ontology.get_entity_map()
# List entities (paginated)
response = client.ontology.get_entities(page=1, size=50)
# Get details for a specific entity
entity = client.ontology.get_entity_information(
entity_id=64719,
representation="company"
)
Explore Insights
# List insights (paginated, with filters)
response = client.ontology.get_insights(insight_types=["metric"], size=100)
# Get insight details
insight = client.ontology.get_insight_information(insight_id=465)
# Find entities with a specific insight
response = client.ontology.get_entities_for_insight(insight_id=465)
# Find insights available for a specific entity
response = client.ontology.get_insights_for_entity(entity_id=64719, entity_representation="company")
Typical Workflow
get_entity_map()→ Discover what entity types are availableget_entities()→ Browse and search for entitiesget_entity_information()→ Get details for a specific entityget_insight_information()→ Understand what a metric measuresget_entities_for_insight()→ Find entities that have the metricget_insights_for_entity()→ Find metrics available for an entity- Build a Framework → Query data using the Frameworks API
Related Resources
| Resource | Description |
|---|---|
| API Authentication | Get your API key and authenticate |
| Library for Devs | Explore available data assets |
| Python SDK on PyPI | Install the official Carbon Arc package |
Need Help?
- Email: support@carbonarc.co
- GitHub: Carbon Arc Tutorials