Skip to main content

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

ConceptDescription
EntityA real-world object like a company, product, app, or location
RepresentationThe type/category of an entity (company, ticker, product, app, etc.)
InsightA metric or KPI that can be queried for entities (Revenue, Users, Transactions)

API Reference


Available Methods

MethodDescription
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

  1. get_entity_map() → Discover what entity types are available
  2. get_entities() → Browse and search for entities
  3. get_entity_information() → Get details for a specific entity
  4. get_insight_information() → Understand what a metric measures
  5. get_entities_for_insight() → Find entities that have the metric
  6. get_insights_for_entity() → Find metrics available for an entity
  7. Build a Framework → Query data using the Frameworks API

ResourceDescription
API AuthenticationGet your API key and authenticate
Library for DevsExplore available data assets
Python SDK on PyPIInstall the official Carbon Arc package

Need Help?