batch_lookup allows you to retrieve details of multiple places in a single query. To retrieve details, submit an array of Placekeys as input. You will get details on up to 20 places in each response.

Generate Placekeys of the desired locations from here. Provide an array of Placekeys as query variables. You may request any attributes from SafeGraph Core, Geometry, or Patterns data sets.

Request Parameters

Parameter

Description

[placekeys]

Array of the Placekeys of the locations

Below is an example of submitting an array of Placekeys to obtain information. You may add up to 20 Placekeys in this array. Add the array under Query variables in the GraphiQL Explorer.

query($placekeys: [Placekey!]) {
  batch_lookup(placekeys: $placekeys) {
    placekey
    safegraph_core {
      location_name
      street_address
      city
      region
      postal_code
      iso_country_code
    }
  }
}
{
  "data": {
    "batch_lookup": [
      {
        "placekey": "[email protected]",
        "safegraph_core": {
          "location_name": "Patrick Baptist Church",
          "street_address": "2006 Parkinson Rd",
          "city": "Ferris",
          "region": "TX",
          "postal_code": "75125",
          "iso_country_code": "US"
        }
      },
      {
        "placekey": "[email protected]",
        "safegraph_core": {
          "location_name": "United States Postal Service (USPS)",
          "street_address": "317 E Main St",
          "city": "Edmore",
          "region": "MI",
          "postal_code": "48829",
          "iso_country_code": "US"
        }
      },
      {
        "placekey": "[email protected]",
        "safegraph_core": {
          "location_name": "Private Ink",
          "street_address": "333 Peterson Rd Ste 250",
          "city": "Libertyville",
          "region": "IL",
          "postal_code": "60048",
          "iso_country_code": "US"
        }
      },
      {
        "placekey": "[email protected]",
        "safegraph_core": {
          "location_name": "Little Italy Pizza Cafe",
          "street_address": "16A N State St",
          "city": "Greenfield",
          "region": "IN",
          "postal_code": "46140",
          "iso_country_code": "US"
        }
      },
      {
        "placekey": "[email protected]",
        "safegraph_core": {
          "location_name": "Tolenas Elementary",
          "street_address": "4500 Tolenas Rd",
          "city": "Fairfield",
          "region": "CA",
          "postal_code": "94533",
          "iso_country_code": "US"
        }
      }
    ]
  },
  "extensions": {
    "row_count": 5,
    "version_date": "1627739802__2021_07"
  }
}