Raster Tiles API
The Maps Raster Tile API endpoint renders map data as images. The images are divided into squared sections called tiles for efficient retrieval and transmission. These tiles or square images are available at 23 different zoom levels, ranging from 0 to 22. A zoom level of 0 renders the entire earth in a single tile.
The Raster Tile API supports “basic” tile layer which contains mapping data such as polygons, road shapes, borders, labels, and road icons. This layer can be rendered in two different style as listed in Request Parameters below.
Use the following endpoint to get the Raster tiles:
GET
Path Parameters
Request Parameters
| Name | Required | Format & Usage | Description |
|---|---|---|---|
| key | Yes | Type: string Format: 32 character alphanumeric string Example: key=API_KEY | A key is a unique identifier that is required to authenticate a request to the API. |
| tileSize | No | Type: integer Default Value: 256 Allowed Values: 256, 512 | The tile size dimension in pixels. When tileSize is specified as 256 the resolution of the image returned is 256x256 and a 512x512 resolution image is returned when 512 is specified as input. |
| language | No | Type: string Default value: NGT (Neutral Ground Truth) Other values: List of supported languages. | The language to be used for labels returned in the response. It should be one of the supported IETF language code tags described here or one of the custom language tags. When data in a specified language is not available for a specific label, the default language is used. |
| view | No | Type: string Default value: See the following Default view mapping section. Other values: Unified, IL, IN, MA, PK, AR, Arabic, RU, TR, CN, US. | A geopolitical view.Usage of a value outside of the given set will result in the server sending a HTTP 400 response. |
Sample Request
API 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 support@nextbillion.ai for more details.
API Error Codes
| Response code | Description | Additional notes |
|---|---|---|
| 200 | Normal success case. | Normal success case. |
| 400 | Input validation failed. | There is a missing or an invalid parameter or a parameter with an invalid value type is added to the request. |
| 401 | APIKEY not supplied or invalid | This error occurs when the wrong API key is passed in the request or the key is missing altogether. |
| 403 | APIKEY 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. |
| 404 | Requested host/path not found | This error occurs when a malformed hostname is used. |
| 422 | Could not process the request | A feasible solution could not be generated for the given set of locations or parameter configuration. |
| 429 | Too many requests | QPM reached or API request count quota reached. |
| 500 | Internal Service error. | There was an internal issue with NextBillion.ai services. You can reach out to support@nextbillion.ai for an explanation. |