@pipeworx/datacommons

Connect: https://pipeworx.io/mcp — every tool in the catalog, including @pipeworx/datacommons’s. Install: one-click buttons

Connect to just the @pipeworx/datacommons pack

https://gateway.pipeworx.io/datacommons/mcp — only @pipeworx/datacommons’s own tools, nothing else in the catalog.

No MCP client? Skip the connection: POST https://gateway.pipeworx.io/v1/tools/search_packs {"query":"..."} to find a tool below, GET /v1/tools/<name> for its schema, POST the same URL with arguments for the data — see For AI agents.

Tools: 4

Harmonised public statistics for any place on Earth from Google Data Commons: population, income, health, employment, emissions and thousands more indicators. Every value names the original publisher (US Census, World Bank, Eurostat, CDC, BLS, …).

Tools

  • datacommons_find_place(name, place_type?, limit?): turns a place name into Data Commons place ids (dcids), with name and type for each candidate. “California” + State gives geoId/06. “India” gives country/IND.
  • datacommons_find_variable(query, limit?): turns a plain-language indicator into statistical variable ids, with a match score. “median household income” gives Median_Income_Household.
  • datacommons_observation(variable, place, date?, limit?): one variable at one place. Returns the latest value (default), the value at a date, or the whole series with date=all. The response carries the publisher of the value and how many other sources report it, plus the latest value from up to five of them.
  • datacommons_child_places(variable, parent_place, child_type, date?, sort?, limit?): one variable across every child place of a parent, sorted by value. Use it for all US states, every county in Texas (geoId/48, County) or every country in europe.

A place/variable pair with no data is an error that names both ids. It never comes back as an empty list.

Auth

Platform key (PLATFORM_DATACOMMONS_KEY) with a BYO override through _apiKey, which is sent upstream as the X-API-Key header. Through the gateway, callers without a key use ours. Anyone importing the package directly needs a free Data Commons key from https://apikeys.datacommons.org (self-serve, no approval step). Without one, the pack refuses with “requires an API key” before any upstream request.

Data sources

  • Google Data Commons, the Data Commons knowledge graph (REST v2). It aggregates official statistics from national and international publishers. Each value’s publisher object names the dataset, measurement method and the publisher’s provenance page.

Reuse terms: this pack calls the API live for each request and keeps no copy. Each value stays under its original publisher’s terms, and the publisher object on every response links to that publisher’s provenance page.

Notes for the next person:

  • Most indicators have several sources (“facets”) that disagree. In 2024, US population was 340.0M from Census PEP and 334.9M from the ACS 5-year survey. The pack takes Data Commons’ own ranking (first facet with observations) and shows the alternates, so the caller can see the spread.
  • Name resolution is fuzzy. “Paris” returns NUTS region FR101 first and then about a dozen US towns. Pass place_type to narrow it.
  • The indicator resolver always returns something, even for nonsense, so it falls back to topics. The pack keeps only StatisticalVariable hits and sets low_confidence when the best score is under 0.7.
  • Data Commons publishes a rate-limited trial key in its own docs. It is good for a one-off smoke test, not for serving callers.

Tools

  • datacommons_find_place — Find the Google Data Commons place id (dcid) for a place name — country, state, county, city, region. Returns candidates with name and place type, e.g. “California” -> geoId/06, “India” -> country/IND
  • datacommons_find_variable — Search Google Data Commons statistical variables by plain-language indicator, e.g. “median household income” -> Median_Income_Household, “unemployment rate” -> UnemploymentRate_Person. Returns variabl
  • datacommons_observation — Get the value of one Google Data Commons statistical variable for one place: the latest value (default), the value at a date, or the whole time series. Each value names its original publisher (US Cens
  • datacommons_child_places — Compare one Google Data Commons statistical variable across every child place of a parent — e.g. population of all US states, median income of every county in Texas (geoId/48, County), GDP of every co

Tools

  • datacommons_child_places — Compare one Google Data Commons statistical variable across every child place of a parent — e.g. population of all US states, median income of every county in Texas (geoId/48, County), GDP of every co
  • datacommons_find_place — Find the Google Data Commons place id (dcid) for a place name — country, state, county, city, region. Returns candidates with name and place type, e.g. California -> geoId/06, India -> country/IND. Us
  • datacommons_find_variable — Search Google Data Commons statistical variables by plain-language indicator, e.g. median household income -> Median_Income_Household, unemployment rate -> UnemploymentRate_Person. Returns variable id
  • datacommons_observation — Get the value of one Google Data Commons statistical variable for one place: the latest value (default), the value at a date, or the whole time series. Each value names its original publisher (US Cens

Regenerated from source · build October 14, 2026