# Mapbox Tilequery

> Mapbox Tilequery is a paid API for AI agents from Mapbox at mapbox.mpp.paywithlocus.com, paid per call via MPP, $0.005/call, status unknown (last checked 2026-10-09).

Query geographic features from a Mapbox tileset at a specific longitude/latitude point, returning nearby features with distance and geometry metadata.

## Facts

- Endpoint: POST https://mapbox.mpp.paywithlocus.com/mapbox/tilequery?utm_source=zero.xyz
- Price: $0.005/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-09
- Activations on Zero: 0
- Provider: Mapbox
- Docs: https://docs.mapbox.com/api/
- Website: https://www.mapbox.com
- Tags: maps, geocoding, directions, routing, geospatial, data
- Canonical page: https://www.zero.xyz/c/mapbox-tilequery-52fc2436
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0mRfrKbdCzUzqBEed7Yqv

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability mapbox-tilequery-52fc2436 -d '<json body>'
```

Example prompt: Using the Mapbox Streets tileset (mapbox.mapbox-streets-v8), what road and path features are within 50 meters of coordinates -122.4194 longitude, 37.7749 latitude? Return up to 5 results with deduplication enabled.

## When to prefer this

Use Tilequery when you need to retrieve vector tile features at or near a specific coordinate from a Mapbox tileset — especially for point-in-polygon checks, nearby road/feature lookups, or enriching a location with layer-specific geographic attributes. Prefer this over forward/reverse geocoding when you need raw tileset feature data (e.g., road class, surface type, custom layer attributes) rather than human-readable addresses.

## Known failure modes

- Invalid tileset_id returns 404 or empty FeatureCollection
- Latitude outside -85 to 85 range returns validation error
- Longitude outside -180 to 180 range returns validation error
- Limit outside 1-50 range returns validation error
- Invalid geometry filter value returns 422
- Querying a private tileset without proper access returns 401/403
- No features found within radius returns empty features array

## How this service works

Query vector tileset features near a geographic point. Useful for spatial lookups (e.g. "what features are within 100m of this point?").

## Output

A GeoJSON FeatureCollection with up to N matched features, each including geometry (point coordinates), properties (feature type, class, surface, oneway, structure, ISO country codes), and a tilequery metadata block showing the originating layer, distance from the query point in meters, and the geometry type of the matched feature.

## Example request

```json
{
 "limit": 5,
 "dedupe": true,
 "radius": 50,
 "latitude": 37.7749,
 "longitude": -122.4194,
 "tileset_id": "mapbox.mapbox-streets-v8"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "tileset_id",
  "longitude",
  "latitude"
 ],
 "properties": {
  "limit": {
   "type": "number",
   "description": "Max features to return (1-50, default 5)"
  },
  "dedupe": {
   "type": "boolean",
   "description": "Remove duplicate features (default true)"
  },
  "layers": {
   "type": "string",
   "description": "Comma-separated layer names to query"
  },
  "radius": {
   "type": "number",
   "description": "Search radius in meters (default 0 for point-in-polygon)"
  },
  "geometry": {
   "type": "string",
   "description": "Filter by geometry type: polygon, linestring, point"
  },
  "latitude": {
   "type": "number",
   "description": "Latitude (-85 to 85)"
  },
  "longitude": {
   "type": "number",
   "description": "Longitude (-180 to 180)"
  },
  "tileset_id": {
   "type": "string",
   "description": "Tileset ID to query (e.g. \"mapbox.mapbox-streets-v8\"). Comma-separate up to 25."
  }
 },
 "additionalProperties": true
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/mapbox-tilequery-52fc2436/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from mapbox.mpp.paywithlocus.com](https://www.zero.xyz/host/mapbox.mpp.paywithlocus.com/llms.txt)
