Skip to main content
GET
/
v1
/
googlemaps
/
locations
Get Geolocation
curl --request GET \
  --url https://api.lobstr.io/v1/googlemaps/locations \
  --header 'Authorization: <authorization>'

Documentation Index

Fetch the complete documentation index at: https://docs.lobstr.io/llms.txt

Use this file to discover all available pages before exploring further.

Use this endpoint to fetch valid regions, districts, and cities used in parameter-based tasks for the Google Maps Search Export crawler. This is essential when constructing structured tasks where accurate location inputs are required.

Headers

Authorization
string
required
Your API authentication token. Value: Token YOUR_API_KEY

Query Parameters

country_code
string
required
ISO 2-letter country code. Example: US
region
string
State or province name. Example: California
district
string
County or local district. Example: San Diego
city
string
City name filter

How It Works

The value you leave empty determines what the API returns:
  • Leave region empty to get regions for a country
  • Provide region, leave city empty to get cities in that region
  • Provide district to narrow down the city list further

Query Parameters

ParameterRequiredDescription
country_codeYesISO 2-letter country code (e.g., US, FR, PK)
regionConditionalRequired when querying districts or cities. Leave empty to get regions.
districtNoNarrows the city list within a region
cityNoUsed when retrieving a refined list of locations
Use the returned values for region, district, and city in parameter-based tasks.
Combine location values with category to generate accurate search inputs.

Code Examples

curl -X GET "https://api.lobstr.io/v1/googlemaps/locations?country_code=US&region=California&city" \
  -H "Authorization: Token YOUR_API_KEY"

Response

200
[
  "Acampo 95220",
  "Acton 93510",
  "Adelanto 92301",
  "Adin 96006",
  "Agoura Hills 91301",
  "Agoura Hills 91376",
  "Aguanga 92536",
  "Ahwahnee 93601",
  "Alameda 94501",
  "Alameda 94502",
  "Alamo 94507",
  "Albany 94706",
  "Albion 95410",
  "Alderpoint 95511",
  "Alhambra 91801",
  "Alhambra 91802",
  "Alhambra 91803"
]