NOTE: The Data Commons V1 REST API is deprecated. Please use the V2 REST API.

Data Commons V1 REST API

The Data Commons REST API is a REST library that enables developers to programmatically access data in the Data Commons knowledge graph. This package allows users to explore the structure of the graph, integrate statistics from the graph into data analysis applications and much more.

Getting Started

First time using the Data Commons API, or just need a refresher? Take a look at our Getting Started Guide.

Service Endpoints

The base URL for all endpoints below is:

https://api.datacommons.org

Simple vs Bulk Query

Some APIs have a bulk version, designed for handling multiple queries at a time, with more detailed output. Bulk endpoints are tagged with bulk below.

Local Graph Exploration

Methods for exploring the graph around a set of nodes.

API URI Description
Triples /v1/triples Get neighboring nodes and property labels of directed edges of a specific node
Properties /v1/properties Get all properties (labels of directed edges) available for a specific node
Property Values /v1/property/values/ Get the value for a property of a specific node
Property Values (linked) /v1/property/values/in/linked Get all places of a specific type contained in an ancestor place
     
bulk Triples /v1/bulk/triples Get neighboring nodes and edge labels for multiple nodes
bulk Properties /v1/bulk/properties Get all properties for multiple nodes.
bulk Property values /v1/bulk/property/values Get property values for multiple properties and multiple nodes
bulk Property Values (linked) /v1/bulk/property/values/in/linked Get all places of a specific type for mulitple ancestor places

Node Information

Methods for retrieving information of certain types of nodes.

API URI Description
Find Entities /v1/find/entities Find the DCID of an entity
Place Info /v1/info/place Get information about a place
Variable Info /v1/info/variable Get information about a variable
Variable Group Info /v1/info/variable-group Get information about a variable group
     
bulk Find Entities /v1/bulk/find/entities Find the DCID of an entity
bulk Place Info /v1/bulk/info/place Get information about multiple places
bulk Variable Info /v1/bulk/info/variable Get information about multiple variables
bulk Variable Group Info /v1/bulk/info/variable-group Get information about multiple variable groups

Statistical Observations

Methods for retrieving statistical observations associated with a set of entities.

API URI Description
Observation (single value) /v1/observations/point Get a single value from a time-series variable for a specific entity
Observation (series) /v1/observations/series Get all values from a variable for a specific entity
     
bulk Observation (single value) /v1/bulk/observations/point Get a single value from variables for multiple entities
bulk Observation (single value, linked) /v1/bulk/observations/point/linked Get a single value from variables for all places in an ancestor place
bulk Observation (series) /v1/bulk/observations/series Get all values from variables for multiple entities
bulk Observation (series, linked) /v1/bulk/observations/series/linked Get all values from a variable for all places in an ancestor place

Statistical Variable

Methods for retrieving statistical variable related data.

API URI Description
Variables /v1/variables Get all variables associated with a specific entity
bulk Variables /v1/bulk/variables Get all variables available for multiple entities

Graph Query

Methods for querying the Data Commons knowledge graph with SPARQL.

API URI Description
SPARQL /v1/query Use SPARQL queries

Page last updated: December 17, 2024 • Send feedback about this page