Retrieve places contained within another place

Given a list of parent Place DCIDs, (e.g. any State, Country, etc.), return a list of child places contained within the specified DCIDs. Only returns children whose place type matches the request’s placeType parameter.

General information about this endpoint

Formula: =DCPLACESIN(dcids, placeType)

Required arguments:

  • dcids: A list of (parent) Place nodes, identified by their DCIDs.

  • placeType: The type of the contained (child) Place nodes to filter by. For example, City and County are contained within State. For a full list of available types, see the Data Commons graph browser entry for Place.

Assembling the information you will need to use this formula

This endpoint requires the argument dcids. DCIDs are unique node identifiers defined by Data Commons. Your query will need to specify the DCIDs for the parent places of interest.

This endpoint also requires the argument placeType, specifying the type of the child places you desire in the response.


Before trying this method out, make sure to follow the setup directions in the main section for Sheets docs.

Example 1: Retrieve a list of the counties in Delaware.

Example 2: Retrieve a list of congressional districts in Alaska and Hawaii.

Error Responses

If you pass a bad DCID value, you will see a reference error appear:

Likewise, if you pass a nonexistent place type, you will also see a reference error appear:

If you pass an empty DCID, an error will appear: