Geocoding API

Introduction

This API allows you to find the geo-coordinates of a known address, place, locality or administrative area, even if the query is incomplete or partly incorrect. It also returns a complete postal address string and address details.

Parameters

Loading...

Response Schema

Loading...

Query Limits

Nextbillion.ai allows a maximum rate limit of 6000 queries per minute or 100 queries/second for continuous requests.

Note: We can increase the quota if needed on request. Contact [email protected] for more details.

Examples

Sample API Request

1https://api.nextbillion.io/h/geocode?key={{api_key}}&q=market%20st&limit=2&in=countryCode:USA,MEX

Sample API Response

1{
2  "items": [
3    {
4      "title": "Market St, Philadelphia, PA 19106, United States",
5      "id": "here:af:street:x7-LwaZKEqfmPp3XN9Gh1D",
6      "resultType": "street",
7      "address": {
8        "label": "Market St, Philadelphia, PA 19106, United States",
9        "countryCode": "USA",
10        "countryName": "United States",
11        "stateCode": "PA",
12        "state": "Pennsylvania",
13        "county": "Philadelphia",
14        "city": "Philadelphia",
15        "street": "Market St",
16        "postalCode": "19106"
17      },
18      "position": {
19        "lat": 39.95086,
20        "lng": -75.15134
21      },
22      "mapView": {
23        "west": -75.16263,
24        "south": 39.94947,
25        "east": -75.14002,
26        "north": 39.95244
27      },
28      "scoring": {
29        "queryScore": 1.0,
30        "fieldScore": {
31          "streets": [
32            1.0
33          ]
34        }
35      }
36    },
37    {
38      "title": "Market St, San Francisco, CA 94102, United States",
39      "id": "here:af:street:VhS6IWwjk10vNjLE2atzXA",
40      "resultType": "street",
41      "address": {
42        "label": "Market St, San Francisco, CA 94102, United States",
43        "countryCode": "USA",
44        "countryName": "United States",
45        "stateCode": "CA",
46        "state": "California",
47        "county": "San Francisco",
48        "city": "San Francisco",
49        "street": "Market St",
50        "postalCode": "94102"
51      },
52      "position": {
53        "lat": 37.77379,
54        "lng": -122.42101
55      },
56      "mapView": {
57        "west": -122.44491,
58        "south": 37.75006,
59        "east": -122.39479,
60        "north": 37.7945
61      },
62      "scoring": {
63        "queryScore": 1.0,
64        "fieldScore": {
65          "streets": [
66            1.0
67          ]
68        }
69      }
70    }
71  ]
72}

API Error Codes

Response CodeDescriptionAdditional Notes
200Normal success case.Normal success case.
400Input validation failed.Such as missing parameter or parameter with invalid value type (for example value cannot be parsed into number).
401APIKEY not supplied or invalid.-
403APIKEY is valid but does not have access to requested resources.You might be querying for a geographical region which is not valid for your account, or requesting a service which is not enabled for you.
404Requested host/path not found.This error occurs when there is a malformed host name used.
422Could not process the request.There is an underlying map issue which prevents the processing of the request.
429Too many requests.QPM reached or something like distance matrix size quota reached.
500Internal Service error.There was an internal issue with Nextbillion.ai services. You can reach out to [email protected] for an explanation.
Reverse Geocoding
DIDN'T FIND WHAT YOU LOOKING FOR?