Glassdoor Location Search API Documentation Find Glassdoor locations by name: cities, states and countries with location id, type, names, label, state abbreviation, ISO country code, metro id, state id and country id. Use these ids with the salary estimate endpoint (city_id, state_id, metro_id, country_id) and with the company jobs endpoint (location_id and location_type). A name without matches returns an empty locations list and is a successful response. Costs 1 credit per successful request. Failed requests are not billed.
Run this endpoint
Endpoint
Parameters
Start with the required fields, then add optional filters only when your use case needs them.
Runnable path
1 required parameter needed before sending a request.
string
Required
Location name, 2 to 100 characters. Example: new york.
coffee shops
Response Schema
Example response fields are illustrative; inspect the JSON before integrating.
Example response fields
Scan these fields before integrating.
data
meta
success
{
"data": {
"query": "new york",
"locations": [
{
"city": "New York",
"name": "New York, NY",
"type": "CITY",
"label": "New York, NY",
"state": "New York State",
"country": "United States",
"metro_id": 615,
"state_id": 428,
"long_name": "New York, NY (US)",
"country_id": 1,
"country_iso": "US",
"location_id": 1132348,
"state_abbreviation": "NY"
},
{
"name": "New York State",
"type": "STATE",
"label": "New York State",
"state": "New York State",
"country": "United States",
"metro_id": -1,
"state_id": 428,
"long_name": "New York State, US",
"country_id": 1,
"country_iso": "US",
"location_id": 428,
"state_abbreviation": "NY"
},
{
"city": "New York Mills",
"name": "New York Mills, NY",
"type": "CITY",
"label": "New York Mills, NY",
"state": "New York State",
"country": "United States",
"metro_id": 881,
"state_id": 428,
"long_name": "New York Mills, NY (US)",
"country_id": 1,
"country_iso": "US",
"location_id": 1132913,
"state_abbreviation": "NY"
}
]
},
"meta": {
"billable": true,
"endpoint_family": "location_search"
},
"success": true
}
Errors
Handle these documented responses before retrying or showing customer-facing failures.
Validation Error
A required or invalid query parameter. No upstream call is made. This response is not billable.
{
"errors": {
"query": [
"The query field is required."
]
},
"message": "The request validation failed"
}Invalid Source Response
Glassdoor answered with a shape that no longer matches the documented contract. This response is not billable.
{
"meta": {
"billable": false,
"retryable": true,
"endpoint_family": "location_search"
},
"error": {
"code": "PARSER_DRIFT",
"message": "The Glassdoor API is temporarily unavailable. Please retry."
},
"success": false
}Upstream Blocked
Glassdoor blocked every try. This response is not billable.
{
"meta": {
"billable": false,
"retryable": true,
"endpoint_family": "location_search"
},
"error": {
"code": "UPSTREAM_BLOCKED",
"message": "The Glassdoor API is temporarily unavailable. Please retry."
},
"success": false
}Service Unavailable
Glassdoor could not be reached. This response is not billable.
{
"meta": {
"billable": false,
"retryable": true,
"endpoint_family": "location_search"
},
"error": {
"code": "UPSTREAM_UNAVAILABLE",
"message": "The Glassdoor API is temporarily unavailable. Please retry."
},
"success": false
}Generate Code with AI
Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.
Try It Live
Test this endpoint in our interactive playground with real data.