Geocode a text query into geographic coordinates. This endpoint resolves a location name, address, or place description into precise latitude and longitude values, which can then be used with other endpoints like Search Nearby.
HTTP Request
| |
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
query | string | Yes | — | The location query to geocode (e.g., “New York City”, “1600 Amphitheatre Parkway”) |
language | string | No | "en" | Language code for the response |
country | string | No | "us" | Country code for regional bias |
lat | number | No | — | Latitude hint to bias results toward a specific area |
lng | number | No | — | Longitude hint to bias results toward a specific area |
zoom | integer | No | 7 | Map zoom level (3-21). Higher values give more precise local results |
Response
| |
Response Fields
| Field | Type | Description |
|---|---|---|
status | string | Request status (OK or error code) |
location.latitude | number | Latitude of the resolved location |
location.longitude | number | Longitude of the resolved location |
Code Examples
| |
| |
| |
Related Endpoints
- Search Nearby — Search for businesses using the coordinates returned by this endpoint
- Locate and Search — Combine geocoding and business search in a single call