Loading
Loading
Our forward geocoding API converts any address, business name, or place query into precise WGS84 latitude and longitude coordinates. It accepts free-form text input, so there is no strict formatting requirement on the address before you make the request. Each result comes with a full set of address components: street, area, postcode, city, county, state with its ISO 3166-2 code, and country. A full_address field delivers everything as a single readable line, and a bounding_box array covers the spatial extent of the matched feature.
Built for developers who need reliable address to coordinates conversion without the overhead of a full maps platform. The API supports a configurable result limit between 1 and 40, POI detection when coordinates land on a known place, and multi-language output via the Accept-Language header. You can also pass four bounding box parameters to define a rectangular search area, which limits results to that region only. Useful when your application is scoped to a specific city, zone, or delivery area and out-of-region matches are noise. It works as a practical Google Maps Geocoding API alternative for teams that need straightforward geocoding with JSON output and no SDK dependency.
The API accepts full postal addresses, partial addresses, business names, and landmark references without any preprocessing on your end.
The limit parameter controls how many matches come back, from 1 to 40. Useful for single-match address validation as well as multi-option search interfaces.
Define a rectangular search area using the four viewbox parameters and results are restricted to that region. Prevents out-of-area matches from appearing when your application is scoped to a specific city or zone.
When a query resolves near a known amenity, building, or landmark, the poi array returns the name, category, and type of that place alongside the standard address fields.
Every result includes individual fields for street, neighbourhood, postcode, city, county, state, and country. The state_code field follows the ISO 3166-2 standard.
Pass an Accept-Language header to receive address data in a preferred language. Defaults to English when the requested language is unavailable for a location.
Each result includes a bounding_box with the spatial extent of the matched feature expressed as [lat_min, lat_max, lon_min, lon_max] in WGS84 decimal degrees.
Returned lat and lon values are in the WGS84 decimal degree standard, compatible with virtually every mapping library, GIS platform, and spatial database.
$ pip install requests
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| query | Yes | String | — | Free form search query. Accepts addresses, place names, business names, landmarks. |
| limit | No | Integer | 1 | Maximum number of results to return. Min 1, max 40. |
| min_lat | No | Float | — | Minimum latitude of the viewbox. Between -90 and 90, must be less than or equal to max_lat. All four viewbox parameters must be provided together. |
| max_lat | No | Float | — | Maximum latitude of the viewbox. Between -90 and 90, must be greater than or equal to min_lat. All four viewbox parameters must be provided together. |
| min_lon | No | Float | — | Minimum longitude of the viewbox. Between -180 and 180, must be less than or equal to max_lon. All four viewbox parameters must be provided together. |
| max_lon | No | Float | — | Maximum longitude of the viewbox. Between -180 and 180, must be greater than or equal to min_lon. All four viewbox parameters must be provided together. |
| Header | Required | Type | Default | Description |
|---|---|---|---|---|
| Accept-Language | No | String | en | Language preference for results. Single code or comma-separated list. Falls back to English if needed. |
Returns a JSON array. The number of objects depends on the limit value and the number of matches found.
For an interactive view of the full response, see the Forward Geocoding API Test Page Click here.
| HTTP Status | Reasons |
|---|---|
| 400 | (1) Please provide valid parameters.
(2) Please provide a valid limit. Valid range is from 1 to 40.
(3) Please provide a valid query string.
(4) Latitude must be between -90 and 90.
(5) Longitude must be between -180 and 180.
(6) Minimum latitude cannot be greater than maximum latitude in the viewbox.
(7) Minimum longitude cannot be greater than maximum longitude in the viewbox.
(8) Please provide all four viewbox parameters: min_lat, min_lon, max_lat, max_lon. |
| 404 | No results found for the given query. |
| 500 | Internal Server Error Occurred. |
| 504 | This request exceeded the processing limit. Please try again later. |
Set limit=1 when you only need the top match for a specific address.
# Response [ { "lat": 37.42248575, "lon": -122.08558456613565, "name": "Google Building 41", "category": "building", "type": "commercial", "poi": [ { "name": "Google Building 41", "category": "building", "type": "commercial" }, { "name": "1600", "category": "place", "type": "house_number" } ], "street": "Amphitheatre Parkway", "postcode": "94043", "city": "Mountain View", "county": "Santa Clara County", "state_code": "US-CA", "state": "California", "country_code": "US", "country": "United States", "full_address": "Google Building 41, 1600, Amphitheatre Parkway, Mountain View, Santa Clara County, California, 94043, United States", "bounding_box": [ "37.4221124", "37.4228508", "-122.0859868", "-122.0851511" ] } ]curl "https://api.apifreaks.com/v1.0/geocoder/search?apiKey=YOUR_API_KEY&query=1600%20Amphitheatre%20Parkway%2C%20Mountain%20View%2C%20CA&limit=1"
When the query is a business name or landmark, set limit higher to return several candidate matches.
# Response [ { "lat": 40.757009499999995, "lon": -73.98597239146777, "name": "Times Square", "category": "highway", "type": "pedestrian", "street": "Times Square", "area": "Manhattan, New York County", "postcode": "10036", "city": "New York", "state_code": "US-NY", "state": "New York", "country_code": "US", "country": "United States", "full_address": "Times Square, Theater District, Manhattan Community Board 5, Manhattan, New York County, New York, 10036, United States", "bounding_box": [ "40.7558313", "40.7591362", "-73.9870666", "-73.9845108" ] }, { "lat": 40.757261400000004, "lon": -73.98589982948505, "name": "Times Square", "category": "tourism", "type": "attraction", "area": "Manhattan, New York County", "postcode": "10036", "city": "New York", "state_code": "US-NY", "state": "New York", "country_code": "US", "country": "United States", "full_address": "Times Square, 7th Avenue, Theater District, Manhattan Community Board 5, Manhattan, New York County, New York, 10036, United States", "bounding_box": [ "40.7564751", "40.7580455", "-73.9866378", "-73.9853729" ] }, { "lat": 40.7555923, "lon": -73.9858388, "name": "Times Square", "category": "railway", "type": "station", "poi": [ { "name": "Times Square", "category": "railway", "type": "station" } ], "street": "West 42nd Street", "area": "Manhattan, New York County", "postcode": "10036", "city": "New York", "state_code": "US-NY", "state": "New York", "country_code": "US", "country": "United States", "full_address": "Times Square, West 42nd Street, Midtown, Manhattan Community Board 5, Manhattan, New York County, New York, 10036, United States", "bounding_box": [ "40.7505923", "40.7605923", "-73.9908388", "-73.9808388" ] }, { "lat": 40.75847625, "lon": -73.98529451938359, "name": "Times Square", "category": "tourism", "type": "artwork", "poi": [ { "name": "Times Square", "category": "tourism", "type": "artwork" } ], "street": "Times Square", "area": "Manhattan, New York County", "postcode": "10036", "city": "New York", "state_code": "US-NY", "state": "New York", "country_code": "US", "country": "United States", "full_address": "Times Square, Theater District, Manhattan Community Board 5, Manhattan, New York County, New York, 10036, United States", "bounding_box": [ "40.7584086", "40.7585614", "-73.9853379", "-73.9852297" ] }, { "lat": 40.756983950000006, "lon": -73.98626560946721, "name": "Times Square", "category": "landuse", "type": "commercial", "area": "Manhattan, New York County", "city": "New York", "state_code": "US-NY", "state": "New York", "country_code": "US", "country": "United States", "full_address": "Times Square, Manhattan, New York County, New York, United States", "bounding_box": [ "40.7536202", "40.7622040", "-73.9906088", "-73.9819367" ] } ]curl "https://api.apifreaks.com/v1.0/geocoder/search?apiKey=YOUR_API_KEY&query=Times%20Square%20New%20York&limit=5"
Add the four viewbox parameters to filter results to a defined geographic area. All four must be included together.
# Response [ { "lat": 40.75569, "lon": -73.9418423, "name": "Coffee Shop", "category": "amenity", "type": "restaurant", "poi": [ { "name": "Coffee Shop", "category": "amenity", "type": "restaurant" }, { "name": "13-01", "category": "place", "type": "house_number" } ], "street": "40th Avenue", "area": "Queens, Queens County", "postcode": "11101", "city": "New York", "state_code": "US-NY", "state": "New York", "country_code": "US", "country": "United States", "full_address": "Coffee Shop, 13-01, 40th Avenue, Queensbridge, Queens, Queens County, New York, 11101, United States", "bounding_box": [ "40.7556400", "40.7557400", "-73.9418923", "-73.9417923" ] } ]curl "https://api.apifreaks.com/v1.0/geocoder/search?apiKey=YOUR_API_KEY&query=coffee%20shop&limit=5&min_lat=40.4774&max_lat=40.9176&min_lon=-74.2591&max_lon=-73.7004"
limit value when building region-scoped search features.To use the Forward Geocoding API, you will need API credits. We only charge for successful queries, defined by a 2xx status code. If your request results in a 4xx or 5xx status code, no credits will be charged, and any deducted credits will be returned.
For Each Successful request 5 credits will be charged.
Utilize the Credits Usage API to efficiently monitor your recent consumption of both one-off and subscription credits. This API provides a streamlined way to track and manage your credit usage, ensuring you stay informed about your remaining balance and can optimize your resource allocation effectively.