LSD

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/search
Cost: Free (0 credits)
Rate Limit: Varies by plan
Response: ~1-2 seconds

Parameters

ParameterTypeRequiredDescription
qstringYesPlace 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.
statestringNoState/province filter, name or abbreviation (e.g. "NJ")
countrystringNoCountry filter (e.g. "United States" or "US")
limitintegerNoMax 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

FieldTypeDescription
namestringCanonical location name to use in API calls
codeintegerLocation code (used internally)
typestringLocation type from the upstream taxonomy: City, County, State, DMA Region, etc.
countrystringCountry name
statestringState/region name
parent_codeinteger | nullCode of the parent location in the geo hierarchy
total_countintegerTotal matches before the limit was applied
truncatedbooleanTrue 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.