/v1/info/place
Get basic information about a place.
This API returns basic information on a place, given the place’s DCID. The information provided includes the place’s name, type (city, state, country, etc.), as well as information on all parent places that contain the place queried.
For a rich, graphical exploration of places available in the Data Commons knowledge graph, take a look at the Place Explorer.
To get information on a variable instead of a place, see /v1/info/variable.
For querying multiple places, see the bulk version of this endpoint.
Request
GET Request
https://api.datacommons.org/v1/info/place/{PLACE_DCID}?key={your_api_key}
Path Parameters
Name | Description |
---|---|
PLACE_DCID |
DCID of the place to query information for. |
Query Parameters
Name | Type | Description |
---|---|---|
key |
string | Your API key. See the page on authentication for a demo key, as well as instructions on how to get your own key. |
Response
The response looks like:
{
"entity": "Place DCID",
"info":
{
"self":
{
"dcid": "Place DCID",
"name": "Place Name",
"type": "State/City/Country/Etc"
},
"parents":
[
{
"dcid": "Containing Place DCID",
"name": "Containing Place Name",
"type": "State/City/Country/Etc"
}, ...
]
}
}
Response fields
Name | Type | Description |
---|---|---|
entity | string | DCID of the place queried. |
info | object | Information about the place queried. Includes the name and type (city, state, country, etc.) of the place, as well as those of all “parent” places that contain the place queried (e.g. North America is a parent place of the United States). |
Examples
Example 1: Get information on a single place
Get basic information about New York City (DCID: geoId/3651000
).
Request:
$ curl --request GET --url \
'https://api.datacommons.org/v1/info/place/geoId/3651000?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI'
Response:
{
"entity": "geoId/3651000",
"info":
{
"self":
{
"dcid": "geoId/3651000",
"name": "New York",
"type": "City"
},
"parents":
[
{
"dcid": "geoId/36085",
"name": "Richmond County",
"type": "County"
},
{
"dcid": "geoId/36081",
"name": "Queens",
"type": "County"
},
{
"dcid": "geoId/36061",
"name": "Manhattan",
"type": "County"
},
{
"dcid": "geoId/36047",
"name": "Brooklyn",
"type": "County"
},
{
"dcid": "geoId/36005",
"name": "Bronx County",
"type": "County"
},
{
"dcid": "geoId/36",
"name": "New York",
"type": "State"
},
{
"dcid": "geoId/3651000",
"name": "New York",
"type": "City"
},
{
"dcid": "usc/MiddleAtlanticDivision",
"name": "Middle Atlantic Division",
"type": "CensusDivision"
},
{
"dcid": "country/USA",
"name": "United States",
"type": "Country"
},
{
"dcid": "usc/NortheastRegion",
"name": "Northeast Region"
},
{
"dcid": "northamerica",
"name": "North America",
"type": "Continent"
},
{
"dcid": "Earth",
"name": "Earth",
"type": "Place"
}
]
}
}
Page last updated: December 17, 2024 • Send feedback about this page