# Vector Tiles API

The **Digime Vector Tiles API** serves vector tiles from Digime-hosted vector tilesets.

## Retrieve vector tiles

**GET** : `https://dplace-api.themap.world/basemap/vector-tiles/{zoom}/{x}/{y}.pbf?apikey={YOUR_API_KEY}`

| Required parameters | Type | Description |
|  --- | --- | --- |
| `zoom` | `integer` | Specifies the tile's zoom level (supported from 0 to 20), as described in the [Slippy Map Tilenames](http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames) specification. |
| `{x}/{y}` | `integer` | Specifies the tile's column `{x}` and row `{y}`, as described in the [Slippy Map Tilenames](http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames) specification. |
| `apikey` | `string` | A valid Digime API key passed as a query parameter. |


### Example request: Retrieve vector tiles

```bash
$ curl "https://dplace-api.themap.world/basemap/vector-tiles/9/407/240.pbf?apikey=YOUR_API_KEY"
```

### Response: Retrieve vector tiles

The response is a vector tile in `.pbf` format. For performance, tiles are delivered with a `max-age` header value set to optimize subsequent requests.

## Vector Tiles API errors

table
thead
tr
th
Response body 
code
message
th
HTTP status code
th
Description
tbody
tr
td
code
Not Authorized - No Token
td
code
401
td
No API key was used in the query.
tr
td
code
Not Authorized - Invalid Token
td
code
401
td
Check the API key you used in the query.
tr
td
code
Forbidden
td
code
403
td
There may be an issue with your account, or the API key has restrictions.
tr
td
code
Tileset {tileset name} does not exist
td
code
404
td
Check the name of the tileset you used in the query.
tr
td
code
Tile not found
td
code
404
td
Check the column and row of the tile requested in the query.
tr
td
code
Zoom level must be between 0-20.
td
code
422
td
The zoom level specified in the query is larger than 20 or contains non-numeric characters.
## Vector Tiles API restrictions and limits

- The default rate limit for the Digime Vector Tiles API endpoint depends on your current pricing plan. If you require a higher rate limit, please contact our sales team.
- If you exceed the rate limit, you will receive an `HTTP 429 Too Many Requests` response.
- Responses from the Vector Tiles API set default Cache-Control headers to ensure fast delivery across edge networks.
- For general information on caching and tile performance, refer to our advanced integration guides.


## Vector Tiles API pricing

- Billed by **requests**
- See rates and discounts per tile requests in our pricing page's **Maps** section.


Usage of the Vector Tiles API is measured in **tile requests**. Details about the number of tile requests included in the free tier and the cost per request beyond what is included in the free tier are available on the pricing page.