Search Location
The search_location tool searches for geographic locations and returns their coordinates, useful for precise weather queries.
Overview
Tool Name: search_location
Coverage: Worldwide
Data Source: OpenStreetMap Nominatim
Cache Duration: 24 hours
Results: Up to 5 matching locations
Usage
Claude uses this tool automatically when location names are ambiguous or when coordinates are explicitly requested.
Example Queries
"Find the coordinates for Central Park"
"Where is Yosemite National Park?"
"Latitude and longitude of the Eiffel Tower"
"Search for Springfield" (returns multiple matches)
"Find Tokyo Skytree location"
Parameters
query (required)
Type: string
Description: Location name, landmark, address, or place
The search accepts various query types:
- City names: "Seattle", "Paris", "Tokyo"
- Landmarks: "Golden Gate Bridge", "Big Ben"
- Addresses: "1600 Pennsylvania Ave NW, Washington DC"
- Parks: "Yellowstone National Park"
- Airports: "LAX", "Heathrow Airport"
- Regions: "Silicon Valley", "Napa Valley"
More specific queries return more accurate results. Include country or state for common city names.
limit (optional)
Type: number
Default: 5
Range: 1-10
Maximum number of results to return.
Response Data
Each location result includes:
Basic Information
- Display Name: Full formatted name of the location
- Type: Location type (city, town, landmark, etc.)
- Class: Geographic class (place, natural, building, etc.)
Coordinates
- Latitude: Decimal degrees (-90 to 90)
- Longitude: Decimal degrees (-180 to 180)
Address Components
- Country: Country name
- Country Code: ISO country code
- State/Region: State or region name (if applicable)
- County: County name (if applicable)
- City: City name
- Postal Code: ZIP/postal code (if applicable)
Bounding Box
- Min/Max Coordinates: Geographic extent of the location
Example Response
User: "Find the coordinates for Golden Gate Bridge"
Claude: "I found the Golden Gate Bridge:
Location: Golden Gate Bridge, San Francisco, California, United States
Coordinates:
- Latitude: 37.8199° N
- Longitude: 122.4783° W
Type: Bridge Region: San Francisco County, California
Would you like me to get the current weather conditions or forecast for this location?"
Search Behavior
Single Result
When only one clear match is found, Claude uses it automatically:
User: "Weather in Eiffel Tower"
→ Finds "Eiffel Tower, Paris, France" automatically
→ Returns weather for those coordinates
Multiple Results
When multiple locations match, Claude presents options:
User: "Weather in Springfield"
→ Finds: Springfield, IL; Springfield, MA; Springfield, MO, etc.
→ Claude: "I found several cities named Springfield. Which one?
1. Springfield, Illinois
2. Springfield, Massachusetts
3. Springfield, Missouri
..."
Disambiguation
For ambiguous queries, Claude will ask you to clarify which location you mean.
Use Cases
Precise Location Queries
"Exact coordinates of my hotel"
"Find the location of [landmark]"
"Where exactly is [address]?"
Location Verification
"Is that in the right city?"
"Confirm the location of [place]"
"What county is [city] in?"
Planning & Navigation
"Location of the nearest airport to [city]"
"Find [national park] coordinates"
"Where is the stadium located?"
Geographic Research
"What are the boundaries of [city]?"
"Bounding box for [region]"
"Geographic details of [location]"
Location Types
The search can find various location types:
Places
- Cities, towns, villages
- Neighborhoods, districts
- Regions, states, countries
Landmarks
- Monuments and memorials
- Towers and buildings
- Parks and recreation areas
Infrastructure
- Airports and stations
- Bridges and tunnels
- Ports and harbors
Natural Features
- Mountains and peaks
- Lakes and rivers
- Beaches and bays
Addresses
- Street addresses
- Postal codes
- Coordinates
Search Quality
High Precision Results
- Well-known landmarks
- Major cities
- Official place names
- Complete addresses
Variable Results
- Common place names (may return multiple matches)
- Informal names (may not match)
- Recent developments (may not be in database)
- Very small locations (may not have records)
The search uses OpenStreetMap data, which is crowdsourced and may vary in completeness by region.
Data Accuracy
Coordinate Precision
- Cities: City center point
- Landmarks: Structure location
- Addresses: Building or plot location
- Regions: Geographic center
Precision: Typically accurate to within 10-100 meters for specific locations.
Address Completeness
Varies by country and region:
- Excellent: US, Canada, Western Europe, Japan
- Good: Most developed countries
- Variable: Developing regions, rural areas
Limitations
- Informal Names: May not recognize colloquial place names
- New Developments: Recently built locations may not be indexed
- Spelling: Sensitive to spelling errors
- Language: Works best with English or local language names
- Private Properties: May not find private residences or businesses
Search results depend on OpenStreetMap data quality, which varies by region. Always verify critical location information.
Error Handling
Common errors and solutions:
"No results found for query"
- Solution: Try a more general search term or check spelling
"Location is ambiguous"
- Solution: Add city, state, or country to the query
"Too many results"
- Solution: Be more specific with your query
Integration with Weather Tools
Location search works seamlessly with weather tools:
User: "Weather at the Space Needle"
1. Searches for "Space Needle" → finds Seattle coordinates
2. Gets weather for those coordinates
3. Returns: "Current weather at Space Needle, Seattle..."
Claude handles this workflow automatically - you don't need to search locations separately unless you want the coordinates specifically.
Related Tools
- Get Forecast - Uses coordinates for accurate forecasts
- Get Current Conditions - Uses coordinates for current weather
- Get Alerts - Uses location to find relevant alerts
Technical Details
Caching
Location searches are heavily cached:
- Cache Key: Normalized query string
- TTL: 86400 seconds (24 hours)
- Rationale: Location coordinates rarely change
Data Source
- Provider: OpenStreetMap Nominatim
- API: Nominatim geocoding API
- Rate Limits: Respectful (max 1 request/second)
- Data: Open-source geographic database
Search Algorithm
- Query Normalization: Clean and standardize input
- Geocoding: Search OpenStreetMap database
- Result Ranking: Sort by relevance and importance
- Filtering: Remove duplicates and low-quality results
- Formatting: Structure response for Claude
Privacy
Location searches are:
- Not logged (unless analytics are enabled)
- Not associated with your identity
- Cached locally to reduce API calls
- Processed server-side (not sent to Claude/Anthropic)
Only the location name is sent to OpenStreetMap's geocoding service. No personal information is transmitted.
Best Practices
- Be Specific: Include country or state for common names
- Use Official Names: Official place names work better than nicknames
- Check Results: Verify coordinates are correct before using
- Format Addresses: Use standard address format for best results
- Landmarks: Famous landmarks work better than obscure locations