Location Search
Find valid location names and codes for use with all other endpoints. Search by city name, state, or zip code to get the exact location string that LocalSEOData expects.
When to use this
You're not sure how to format a city name for the API — is it "Austin, TX" or "Austin, Texas, United States"? This free endpoint finds the right format for you. Use it to look up any city, state, or zip code.
GET
/v1/locations/searchCost: Free (0 credits)
Rate Limit: Varies by plan
Response: ~1-2 seconds
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| q | string | Yes | Search query (e.g. "Austin", "78701", "Denver CO") |
| limit | integer | No | Max results. Default: 10 |
Example Request
curl "https://api.localseodata.com/v1/locations/search?q=austin&limit=5" \
-H "Authorization: Bearer sk_live_your_key"Example Response
JSON
{
"status": "success",
"credits_used": 0,
"data": {
"locations": [
{
"name": "Austin,Texas,United States",
"code": 1025197,
"type": "City",
"country": "United States",
"state": "Texas"
},
{
"name": "Austin,Minnesota,United States",
"code": 1025198,
"type": "City",
"country": "United States",
"state": "Minnesota"
}
]
}
}Response Fields
| Field | Type | Description |
|---|---|---|
| name | string | Canonical location name to use in API calls |
| code | integer | Location code (used internally) |
| type | string | Location type (City, State, Country, etc.) |
| country | string | Country name |
| state | string | State/region name |
Notes
- Use this endpoint when you're unsure of the exact location format.
- The 'name' field from the response can be used directly in all other endpoints' location parameter.
- This endpoint is free — no credits consumed.