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 Local SEO Data 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 | Place name (e.g. "Cherry Hill", "Austin, TX"). Prefer a bare name plus the state param — many municipalities exist twice as distinct entities (e.g. "Hamilton" and "Hamilton Township" in NJ), and the state filter surfaces all of them. |
| state | string | No | State/province filter, name or abbreviation (e.g. "NJ") |
| country | string | No | Country filter (e.g. "United States" or "US") |
| limit | integer | No | Max results. Default: 10, max 50 |
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"
}
],
"total_count": 2,
"truncated": false
}
}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 from the upstream taxonomy: City, County, State, DMA Region, etc. |
| country | string | Country name |
| state | string | State/region name |
| parent_code | integer | null | Code of the parent location in the geo hierarchy |
| total_count | integer | Total matches before the limit was applied |
| truncated | boolean | True when more matches exist than were returned |
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.
- Township/borough municipalities often canonicalize with a suffix ("Cherry Hill Township") — a bare name plus the state filter finds them; the resolver behind other endpoints handles this automatically.
- This endpoint is free — no credits consumed.