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 location values for the params.location setting in the Google Search Scraper. These values provide geographic bias for your search queries.
Your API authentication token. Value: Token YOUR_API_KEY
Query Parameters
Search substring for location names. Example: Alabama
Full country name. Example: United States
Query Parameters
| Parameter | Required | Description |
|---|
| q | Yes | Substring to search for in region, district, or city names |
| country_name | Yes | Full country name to scope the search (e.g., United States) |
Response Fields
| Field | Type | Description |
|---|
| name | string | Display name of the location (region, district, or city) |
| canonical_name | string | Full hierarchical name (e.g., Alabama,United States) |
| country_name | string | Country associated with this location |
| country_code | string | ISO 2-letter country code (e.g., US) |
Use the returned name value as your params.location setting.
Location values provide geographic bias - search results will be relevant to that area.
Code Examples
curl -X GET "https://api.lobstr.io/v1/googlelocations?q=Alabama&country_name=United%20States" \
-H "Authorization: Token YOUR_API_KEY"
Response
{
"success": true,
"data": [
{
"name": "Alabama",
"canonical_name": "Alabama,United States",
"country_name": "United States",
"country_code": "US"
},
{
"name": "Alabama's 1st Congressional District 2022 redistricting",
"canonical_name": "Alabama's 1st Congressional District 2022 redistricting,Alabama,United States",
"country_name": "United States",
"country_code": "US"
},
{
"name": "The University of Alabama",
"canonical_name": "The University of Alabama,Alabama,United States",
"country_name": "United States",
"country_code": "US"
},
{
"name": "University of Alabama at Birmingham",
"canonical_name": "University of Alabama at Birmingham,Alabama,United States",
"country_name": "United States",
"country_code": "US"
}
]
}