Skip to main content

Geocode a place

asterwise_geocode

Turns a place name into latitude, longitude and IANA timezone for the other tools, which all take lat, lon and timezone.

Parameters​

ParameterTypeRequiredDescription
querystringyesPlace name, e.g. 'Pune' or 'Fatehabad, Haryana'.
limitintegernoMaximum matches to return (1-10).
countrystring/nullnoOptional ISO 3166 alpha-2 country code to narrow the search, e.g. 'in'.
response_formatenum: markdown, jsonnoOutput format: 'markdown' (default) for a readable report, or 'json' for the raw structured payload.

What it covers​

Searches OpenStreetMap (Nominatim) place names and returns up to limit matches, each with a label, city, state, country, latitude, longitude and timezone. When several places share a name, ambiguous is true: pick one, or narrow with a comma ('Fatehabad, Haryana') or country ('in', 'us').

Workflow​

BEFORE: None.
AFTER: any tool that takes lat, lon and timezone — asterwise_get_natal_chart, asterwise_get_panchanga, asterwise_get_muhurta, asterwise_get_festival_calendar and others.

Input​

query: place name, at least 2 characters (required). limit: 1-10 (default 5). country: optional ISO 3166 alpha-2 code.

Output contract​

data.query, data.count, data.ambiguous, data.tip (when ambiguous), data.results[]: label, city, state, country, latitude, longitude, timezone, place_id.

Errors​

INTERNAL_ERROR: no match (city_not_found) or upstream failure.

Do not confuse with​

None — this is the only place-lookup tool.

Connect​

Remote MCP endpoint: https://mcp.asterwise.com/mcp. Authenticate with Authorization: Bearer <API key> or OAuth. See the MCP setup guide.