Skip to main content
GET
/
v1
/
api
/
tiles
/
stats
Get Tile Statistics
curl --request GET \
  --url https://api.bookovia.com/v1/api/tiles/stats \
  --header 'X-API-Key: <api-key>'
{
  "success": true,
  "sources": [
    {
      "id": "<string>",
      "name": "<string>",
      "file": "<string>",
      "url": "<string>",
      "size": "<string>",
      "features": "<string>",
      "coverage": "<string>",
      "attributes": [
        "<string>"
      ],
      "zoomLevels": "<string>",
      "endpoint": "<string>"
    }
  ],
  "format": "<string>",
  "protocol": "<string>",
  "error": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.bookovia.com/llms.txt

Use this file to discover all available pages before exploring further.

Overview

The Tile Statistics endpoint provides comprehensive information about available vector tile sources, including data coverage, tile counts, zoom levels, and storage details.
Use this endpoint to discover available tile sources and understand their characteristics before integrating them into your application.

Authentication

This endpoint requires authentication via API key in the X-API-Key header. Required permissions: maps:read

Request

No request parameters required.

Request Example

curl -H "X-API-Key: bkv_your_api_key_here" \
  https://api.bookovia.com/v1/api/tiles/stats

Response

success
boolean
Indicates whether the request was successful
sources
array
Array of available tile sources with their metadata
format
string
Tile archive formatValue: PMTiles v3 (Protomaps)
protocol
string
Vector tile protocolValue: Mapbox Vector Tiles (MVT)

Response Example

{
  "success": true,
  "sources": [
    {
      "id": "buildings",
      "name": "USA Buildings",
      "file": "usa-buildings.pmtiles",
      "url": "https://maptiles.bookovia.com/usa-buildings.pmtiles",
      "size": "9.25 GB",
      "features": "~150M building footprints",
      "coverage": "United States",
      "attributes": [
        "height",
        "building_type",
        "address",
        "num_floors"
      ],
      "zoomLevels": "0-15",
      "endpoint": "/tiles/buildings/{z}/{x}/{y}.mvt"
    },
    {
      "id": "roads",
      "name": "USA Roads",
      "file": "usa-roads.pmtiles",
      "url": "https://maptiles.bookovia.com/usa-roads.pmtiles",
      "size": "5.70 GB",
      "features": "~50M road segments",
      "coverage": "United States",
      "attributes": [
        "class",
        "name",
        "ref",
        "lanes",
        "surface",
        "speed_limit",
        "oneway",
        "bridge",
        "tunnel",
        "toll"
      ],
      "zoomLevels": "0-15",
      "endpoint": "/tiles/roads/{z}/{x}/{y}.mvt"
    }
  ],
  "format": "PMTiles v3 (Protomaps)",
  "protocol": "Mapbox Vector Tiles (MVT)",
  "implementation": "Binary tile serving with HTTP Range requests",
  "status": "Partial - needs proper directory parsing and Hilbert curve encoding"
}

Use Cases

Query available tile sources during application initialization to dynamically configure map styles and data sources.
Check geographic coverage before deciding which tile sources to use for your application’s target region.
Discover available feature attributes to plan your styling and filtering strategies.
Display tile source status, sizes, and feature counts in administrative dashboards.

Response Breakdown

Buildings Source Details

{
  "id": "buildings",
  "name": "USA Buildings",
  "features": "~150M building footprints",
  "size": "9.25 GB",
  "coverage": "United States"
}
Key Points:
  • 150 million building footprints
  • Includes residential, commercial, and industrial structures
  • Height data available for ~60% of commercial buildings
  • Updated quarterly from Overture Maps

Roads Source Details

{
  "id": "roads",
  "name": "USA Roads",
  "features": "~50M road segments",
  "size": "5.70 GB",
  "coverage": "United States"
}
Key Points:
  • 50 million road segments
  • Includes all road classes from motorways to footways
  • Same dataset used by Routing API
  • Updated quarterly from Overture Maps

Error Handling

error
string
Error message if the request failed

Common Errors

Status CodeErrorDescription
401API key requiredMissing X-API-Key header
401Invalid API key formatAPI key doesn’t start with bkv_
500Failed to fetch statisticsInternal server error

Best Practices

Cache the response: Tile statistics rarely change. Cache the response for 24 hours to reduce API calls.
Use for discovery: Query this endpoint once during app initialization to discover available tile sources dynamically.
Validate coverage: Check the coverage field to ensure tile sources match your application’s geographic needs.