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

Parameters

ParameterTypeRequiredDescription
qstringYesSearch query (e.g. "Austin", "78701", "Denver CO")
limitintegerNoMax 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

FieldTypeDescription
namestringCanonical location name to use in API calls
codeintegerLocation code (used internally)
typestringLocation type (City, State, Country, etc.)
countrystringCountry name
statestringState/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.