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)
Joe's Pizza Brooklyn
Pizza Restaurant
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.
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.
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.
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.
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.
What you get back
Live response from GET /v1/locations/search?q=buffalo showing disambiguation.
{
"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
}
]
}
}Exactly what agents need to resolve ambiguity
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'.
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.
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.
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.
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 agenciesAmbiguous 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 consultantsBatch 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 workflowsUser 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 PromptsWhy 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.
| Approach | Cost per request | Location format | Ambiguity handling | Agent-ready |
|---|---|---|---|---|
| Google Geocoding API (official) | $5 per 1,000 requests | Yes, very flexible | Returns all matches | Requires OAuth + setup |
| Mapbox Geocoding API | $0.75 per 1,000 temporary, $5/1K permanent | Yes, flexible | Returns all matches | Restricted data reuse |
| Bing Maps Locations | ~$0.005 per call (with subscription) | Requires Bing format | Basic | No MCP integration |
| OpenCage Data | $0.002–0.004 per request (with quota) | Very flexible | Returns all matches | No MCP, REST only |
| Geoapify Geocoding | $1 per 1,000 (with subscription) | Flexible | Returns all matches | REST API, no MCP |
| Manual user location entry | $0 but high error rate | Inconsistent | User guesses wrong | Breaks agent workflows |
| Local SEO Data Location Search API | Free (0 credits) | Natural language input, canonical output | Returns all matches ranked by reach | Native MCP, built for agents |
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.comSee the docs for endpoint reference and auth.
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.
curl "https://api.localseodata.com/v1/locations/search?q=buffalo&limit=10" \
-H "Authorization: Bearer sk_live_..."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.
Common questions
What is the Location Search API?+
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?+
What locations does this cover?+
What if multiple locations match my query?+
Can I use this to look up zip codes or coordinates?+
What format does it return?+
How does this compare to Google Geocoding API or Mapbox?+
Can I batch-resolve multiple locations in one call?+
Is the location code stable over time?+
What is 'search reach' and why does it matter?+
Can AI agents call this directly?+
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?+
What changed in 2026 that made this endpoint valuable?+
Often used in the same agent prompt
Local Pack API
Requires canonical location code. Returns local 3-pack rankings.
POST /v1/keywords/search-volumeSearch Volume API
Requires canonical location code. Returns keyword volume by location.
POST /v1/business/listingsBusiness Listings API
Requires canonical location code. Returns all businesses in category/location.
POST /v1/rank-tracking/localLocal Rank Tracking API
Requires canonical location code. Returns multi-location keyword rankings.
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.