Documentation menu
Places
GET/places/nearest
Access and price
| Auth | An API key, as Authorization: Bearer snk_… or ?api_key=snk_…. Metered. A browser (maps) key may call it. |
|---|---|
| Price | 1 call per request. Class: standard. Published as unit_rules.default in /pricing.json. |
What it does
The caller's places nearest to a point, by haversine distance (no text query, no index).
An API key, as Authorization: Bearer snk_… or ?api_key=snk_…. Metered. Price: 1 call per request.
Call it
bash
curl -fsS -X GET "https://api.mapmap.ai/places/nearest?lat=…&lon=…" \
-H "Authorization: Bearer $MAPMAP_KEY"Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| lat | query | number | yes | Latitude (WGS84), required |
| lon | query | number | yes | Longitude (WGS84), required |
| limit | query | integer | no | Maximum results, 1–50 (default 10) Limits: at least 0. |
Responses
200Places ordered nearest first (empty when no dataset is stored)
| Field | Type | Required | Description |
|---|---|---|---|
| count | integer | yes | Number of results returned. |
| results | PlaceNearestHit[] | yes | Hits ordered nearest first. Empty when no dataset is stored. |
Example: A response assembled from this schema's own field examples, enums, defaults and types; not a recorded call
json
{
"count": 0,
"results": [
{
"distance_m": 0,
"place": {}
}
]
}400Missing or malformed
lat/lonapplication/problem+json · Problem
401Missing or invalid API key. Also: No key, or a missing, malformed, unknown, revoked or expired one (
unauthorized); the body carries signup, docs and a one-call hint for a free keyapplication/problem+json · Problem
402Beyond the included volume with no way to pay this call: an x402 body naming how to pay (provisional key past its allowance, prepaid balance below the price, or a rejected
X-PAYMENT). Not problem+jsonapplication/json · X402PaymentRequired
403The key may not call this: a browser key outside its scope (
scope-insufficient), a request from an origin the key does not allow (origin-not-allowed), or an account restriction (forbidden)application/problem+json · Problem
404Customer places not configured on this gateway
application/problem+json · Problem
429Per-key rate limit (
rate-limited, with Retry-After), or monthly quota exhausted with no payment path (quota-exceeded)application/problem+json · Problem
504The request did not finish within the gateway's request deadline (
request-timeout)application/problem+json · Problem
Error bodies follow the shared problem model documented on API conventions.
Also under Places
Generated from https://api.mapmap.ai/openapi.json on 2026-11-12 · operationId nearest_places