Data Commons Python Client API
This is a Python library for accessing data in the Data Commons knowledge graph. To get started, install this package from pip.
pip install datacommons
Once the package is installed, import
import datacommons as dc
You will also need to provision an API key by enabling the Data Commons API on GCP. Once you have the API key, simply add the following line to your code.
For more detail on getting started with the API, please visit Getting Started.
After you're ready to use the API, you can refer to
examples on how to use this package to perform various tasks. More tutorials and
documentation can be found at tutorials!
About Data Commons
Data Commons is an Open Knowledge Graph that provides a unified view across multiple public data sets and statistics. You can view what datasets are currently ingested and browse the graph using our browser.
The Python Client API currently supports
python>=2.7. We use
bazel as our build system. To test, first install
bazel then run the following:
$ bazel build //... $ bazel test //...
- Update "VERSION" in setup.py
- Update CHANGELOG.md for a new version
- Upload a new package using steps for generating distribution archives and uploading the distribution archives
For general questions or issues about the API, please open an issue on our
issues page. For all other
questions, please send an email to
Note - This is not an officially supported Google product.