If you have the location name and address for a POI, use lookup: location_name & address to retrieve the geospatial coordinates for that place.

query {
  lookup(
    query: {
      location_name: "Pier 39"
      street_address: "39 Pier 39"
      city: "San Francisco"
      region: "CA"
      iso_country_code: "US"
    }
  ) {
    placekey
    safegraph_core {
      location_name
      street_address
      city
      region
      iso_country_code
      postal_code
      latitude
      longitude
    }
  }
}
curl --location --request POST 'https://api.safegraph.com/v1/graphql' \
--header 'apikey: {your-api-key}' \
--header 'content-type: application/json' \
--data-raw '{"query":"query {\n\tlookup(\n    query: {\n      location_name: \"Pier 39\"\n      street_address: \"39 Pier 39\"\n      city: \"San Francisco\"\n      region: \"CA\"\n      iso_country_code: \"US\"\n    }\n  ) {\n    placekey\n    safegraph_core {\n      location_name\n      street_address\n      city\n      region\n      iso_country_code\n      postal_code\n      latitude\n      longitude\n  \t}\n  }\n}","variables":{}}'
# pip install safegraphQL
import safegraphql.client as sgql

sgql_client = sgql.HTTP_Client(apikey = 'your-api-key')

location_name = 'Pier 39'
street_address = '39 Pier 39'
city = 'San Francisco'
region = 'CA'
iso_country_code = 'US'

cols = [
    'location_name',
    'street_address',
    'city',
    'region',
    'iso_country_code',
    'postal_code',
    'latitude',
    'longitude'
]

sgql_client.lookup_by_name(
    product = 'core', 
    location_name = location_name,
    street_address = street_address,
    city = city,
    region = region,
    iso_country_code = iso_country_code,
    columns = cols
)
{
  "data": {
    "lookup": {
      "placekey": "[email protected]",
      "safegraph_core": {
        "location_name": "Pier 39",
        "street_address": "39 Pier 39",
        "city": "San Francisco",
        "region": "CA",
        "iso_country_code": "US",
        "postal_code": "94133",
        "latitude": 37.808961,
        "longitude": -122.409856
      }
    }
  },
  "extensions": {
    "row_count": 1,
    "version_date": "1627739802__2021_07"
  }
}