APIEndpoint 32 of 40Locations / Search / Canonical Resolution

Location Search API

The location canonicalization layer for the new local SEO stack.

Geocoding used to be a separate paid product. Google's Geocoding API costs $5 per 1,000 requests. Mapbox costs $0.75 per 1,000. We bundled it free into every LocalSEOData account because your agent shouldn't have to manage location format strings. Pass "Buffalo, NY" or "downtown Atlanta" — the endpoint returns the canonical location code every other LSD endpoint expects. One call, zero credits, JSON out.

GET /v1/locations/search · Free (0 credits)

POST /v1/locations/search1 profile · 2 credits
Resolved location · Brooklyn, NY

Joe's Pizza Brooklyn

Pizza Restaurant

4.8 · 542 reviews
124 Fulton St, Brooklyn, NY 11201
(718) 555-0142
joespizza.com
Open · Closes 11 PM
Dine-inTakeoutDeliveryWheelchair accessible
▌ Ask your agent

These prompts call Location Search first.

Connect Local SEO Data as an MCP server once (60 seconds, below). Then your agent resolves any location string, uses the code for follow-up calls, and completes the task. Replace bracketed locations with your own.

Multi-city rank tracking

For each of [Buffalo, Denver, Boston], resolve to canonical location code. Then pull the local 3-pack for [plumber] in each. Flag any that dropped rank from last week.

Disambiguation on conflicting city names

Resolve [Springfield] to all matching locations. Show me which ones exist, their states, and populations. Then let me pick the right one for my analysis.

Client prospect audit across regions

I have a list of 30 prospect cities in their own formats. Canonicalize all of them. Then pull search volume for [my keywords] in each. Show me the hottest markets.

Auto-correct user input

User says "new york city." Resolve it. User says "SF." Resolve it. User says "denver metro." Resolve it to the canonical form and tell me what I found.

Real response

What you get back

Live response from GET /v1/locations/search?q=buffalo showing disambiguation.

response · application/json~1-2s · 0 credits
{
  "status": "success",
  "credits_used": 0,
  "data": {
    "locations": [
      {
        "name": "Buffalo, New York, United States",
        "code": 1009847,
        "type": "City",
        "latitude": 42.8864,
        "longitude": -78.8784,
        "population": 250000,
        "reach": 150000
      },
      {
        "name": "Buffalo Grove, Illinois, United States",
        "code": 1029384,
        "type": "City",
        "latitude": 42.1447,
        "longitude": -87.9826,
        "population": 40000,
        "reach": 25000
      },
      {
        "name": "Buffalo, Wyoming, United States",
        "code": 1084920,
        "type": "City",
        "latitude": 44.3501,
        "longitude": -106.7019,
        "population": 4500,
        "reach": 2000
      }
    ]
  }
}
Returns

Exactly what agents need to resolve ambiguity

Canonical name

City, State, Country format

The standardized location string that every LocalSEOData endpoint expects. No more guessing if it's 'Austin, TX' or 'Austin, Texas, United States'.

Location code

Numeric identifier for the location

The DataForSEO location code used internally by all other endpoints. Your agent stores this; follow-up calls use it directly for zero ambiguity.

Disambiguation

Multiple matches ranked by reach

When ambiguity exists (Springfield, IL vs Springfield, MO vs 7 other Springfields), the endpoint returns all of them ranked by search reach. Your agent picks the right one.

Geographic metadata

Latitude, longitude, population, search reach

GPS coordinates for mapping workflows. Population and reach metrics help your agent pick the best match when disambiguation is necessary.

Built for

What AI-native operators ship with this

Pre-call location canonicalization

Before calling Local Pack, Search Volume, or Review APIs, your agent resolves the location input to a canonical code. Eliminates the 'invalid location' error retry loop. Rate-limit waste becomes zero.

For agencies

Ambiguous city disambiguation

Your prospect says 'I'm in Springfield.' The endpoint returns 19 matches ranked by reach. Your agent (or you) picks the right one. No ambiguity, no false positives in downstream calls.

For consultants

Batch multi-city location resolution

Agencies with 100+ client locations batch-resolve them once, store the codes, reuse them for months. One call per location, zero credits, permanent mapping. Zero ambiguity on follow-up calls.

Multi-location workflows

User input auto-correction in conversational agents

User says 'denver metro.' Your agent resolves it to 'Denver, Colorado, United States' and asks for confirmation before proceeding. Conversational workflows become reliable without manual location entry.

Agent Prompts
vs. the alternatives

Why not just use Google Geocoding API or let users type naturally?

Geocoding is a solved problem, but the cost model is backward. You pay per request. We made it free because agents shouldn't rate-limit themselves on location validation.

ApproachCost per requestLocation formatAmbiguity handlingAgent-ready
Google Geocoding API (official)$5 per 1,000 requestsYes, very flexibleReturns all matchesRequires OAuth + setup
Mapbox Geocoding API$0.75 per 1,000 temporary, $5/1K permanentYes, flexibleReturns all matchesRestricted data reuse
Bing Maps Locations~$0.005 per call (with subscription)Requires Bing formatBasicNo MCP integration
OpenCage Data$0.002–0.004 per request (with quota)Very flexibleReturns all matchesNo MCP, REST only
Geoapify Geocoding$1 per 1,000 (with subscription)FlexibleReturns all matchesREST API, no MCP
Manual user location entry$0 but high error rateInconsistentUser guesses wrongBreaks agent workflows
Local SEO Data Location Search APIFree (0 credits)Natural language input, canonical outputReturns all matches ranked by reachNative MCP, built for agents
Connect in 60 seconds

Use it from your agent

Two integration surfaces: MCP for clients that speak MCP, REST API for everything else.

Direct MCP integration

Drop-in support in Claude Desktop, OpenClaw, Hermes Agent, and any MCP-aware client.

Add to your client's MCP config (e.g. claude_desktop_config.json):

{
  "mcpServers": {
    "localseodata": {
      "url": "https://mcp.localseodata.com",
      "headers": {
        "Authorization": "Bearer sk_live_..."
      }
    }
  }
}

REST API

For Perplexity Computer, ChatGPT Custom GPTs, custom agents, and any platform that calls REST endpoints directly.

Base URL:

api.localseodata.com

See the docs for endpoint reference and auth.

Quickstart

Your first call in three lines

Single endpoint, simple query. Pass any location string — city name, abbreviation, zip code. The endpoint returns all matches ranked by search reach. Your agent picks the right one or asks for clarification.

terminal · curl
GET /v1/locations/search
curl "https://api.localseodata.com/v1/locations/search?q=buffalo&limit=10" \
  -H "Authorization: Bearer sk_live_..."
Pricing for this endpoint

Free (0 credits per call)

Location resolution is unbundled from the credit system. Use it as much as you need — agent calls it before every downstream query with zero cost impact.

Free tier
Unlimited
location searches on signup
Starter · $19/mo
Unlimited
location searches at this rate
Per-call cost
$0.00
zero credits, always free
FAQ

Common questions

What is the Location Search API?+
A free endpoint that resolves natural location input ('Buffalo, NY', 'downtown Atlanta', 'zip 78701') to canonical location codes used by all other LocalSEOData endpoints. It returns the standardized location name, a numeric location code, GPS coordinates, population, and search reach. The endpoint is GET /v1/locations/search; one call costs 0 credits. This is the helper layer your agent calls before every rank, review, or keyword query to eliminate ambiguity and format errors.
Why do I need this if I can just type a location myself?+
Three reasons. First, agents can't guess — they need a canonical format that works across every LocalSEOData endpoint. Second, ambiguity is silent: if you pass 'Springfield' without disambiguation, the endpoint you call next might use the wrong state and return false results. This API surfaces the ambiguity upfront. Third, once you resolve a location code, you can reuse it for months without re-resolving. Multi-location operators batch-resolve their client locations once and store the codes permanently.
What locations does this cover?+
The endpoint covers all cities, metro areas, states, provinces, and countries in the DataForSEO location database — full coverage for the United States, Canada, Western Europe, Australia, and most developed markets, with town-level granularity in many regions. For niche locations outside this coverage, the endpoint will return no results; in that case, contact support and we can add them.
What if multiple locations match my query?+
The endpoint returns all matches ranked by search reach — a proxy for how many searches happen in that location. If you search 'Springfield', you get all 19 matches: Springfield, Illinois (largest reach), Springfield, Missouri, Springfield, Massachusetts, etc. Your agent can present these to you, or pick the highest-reach match if disambiguation is not critical for your use case.
Can I use this to look up zip codes or coordinates?+
Yes to both. Pass a zip code (e.g., '78701') as the query and the endpoint resolves it to the city/state. Pass coordinates (latitude/longitude in decimal format) and the endpoint reverses them to the nearest location. Both are zero-credit calls, same as the city-name lookup.
What format does it return?+
The endpoint returns a location code (a numeric identifier from DataForSEO), the canonical name in 'City, State, Country' format, type (City, Metro, State, Country), latitude, longitude, population, and search reach. Other LocalSEOData endpoints accept the location code directly, which bypasses any future ambiguity.
How does this compare to Google Geocoding API or Mapbox?+
Google Geocoding costs $5 per 1,000 requests. Mapbox costs $0.75-$5 per 1,000 depending on whether you store results. Both are designed for mapping and spatial workflows. This endpoint is free because agents shouldn't rate-limit themselves on location validation. It's not a replacement for full geographic analysis — if you need distance matrices, elevation, or routing, use Google or Mapbox. If you just need a canonical location code for downstream API calls, use this.
Can I batch-resolve multiple locations in one call?+
Not in a single call, but the API has no rate limits beyond your credit balance (which is zero for location search). Your agent can loop through 100+ locations in parallel without hitting any quota. In practice, agents resolve locations in batches of 10-50 and cache the codes, so you call this endpoint once per location and reuse the code forever.
Is the location code stable over time?+
Yes. Location codes are persistent identifiers from DataForSEO. They do not change when new data is added to the platform. Once you resolve 'Austin, Texas, United States' to code 1025197, that mapping is permanent. You can safely store codes in your database and reuse them across months or years of agent runs.
What is 'search reach' and why does it matter?+
Search reach is the estimated number of monthly searches that happen in that location, pulled from Google's search data. When you query 'Springfield', the endpoint returns 19 matches ranked by reach. The first Springfield (by reach) is probably the one you want. Your agent uses reach to pick the most relevant match when disambiguation is necessary, or to surface the ranking to you for manual confirmation.
Can AI agents call this directly?+
Yes, and this is exactly what we built for. Two integration paths. MCP: add Local SEO Data to your claude_desktop_config.json and your Claude agent calls this endpoint from any prompt. REST: any agent that can make HTTPS calls (ChatGPT Custom GPTs, Perplexity Computer, custom Python agents) hits the API directly with your Bearer token. The agent receives structured JSON and extracts the location code for follow-up calls.
Where does the location data come from?+
DataForSEO, our upstream provider for most LocalSEOData endpoints. Location data is pulled from public geographic databases, Google Search Volume estimates, and proprietary DataForSEO enrichment. It reflects the regions where real search activity happens, not just a static geographic taxonomy. This is why 'search reach' is included — because location relevance is determined by query volume, not just administrative boundaries.
What changed in 2026 that made this endpoint valuable?+
Two things. First, MCP (Model Context Protocol) became standard, making it practical for agents to call specialized APIs without custom integration code. The moment that happened, the right shape of a location service flipped from 'a field on your data form' to 'a free preprocessing step your agent calls before every query'. Second, the move from dashboard workflows to agent workflows revealed that location format inconsistency is a silent killer of automation — queries fail silently or return wrong results when location strings don't match. This endpoint solves that in the agent pipeline.

Resolve any location in your first agent prompt.

Free (0 credits). Your agent calls this once per location, stores the code, and uses it across all downstream endpoints.

▌ MADE FOR THE NEW LOCAL SEO STACK