Parchment Docs

API Reference

Reference for the Parchment REST API.

The Parchment API is a REST API that powers the Parchment map and trip-planning app. All responses are JSON.

In development the API is at http://localhost:5000. In production, use your instance’s base URL.

Authentication

The map, search, places, directions, transit, bike share, geocoding, weather and overlay endpoints work without signing in. Everything that belongs to an account needs credentials: send a session cookie, or a token in the Authorization: Bearer <token> header. See Auth for details.

A token is either a sign-in session, with full access, or a scoped token: an API key from Settings → Connections, or one an app got through OAuth. A scoped token reaches only the routes its scopes cover:

ScopeRoutes
places:readGET /places/*, /search/*, GET /geocoding/*
trips:read/directions/* (except saving a trip), GET /transit/*, GET /gbfs/*, GET /isochrone
weather:readGET /weather, GET /environment/*
library:readGET /library/*, GET /vehicles
library:writePOST, PUT, PATCH and DELETE on /library/*

Any scoped token can reach POST /mcp, which checks each tool's scope itself (see AI assistants). Anything else answers 403 with WWW-Authenticate: Bearer error="insufficient_scope", plus the scope it needs when one would help. Tokens, sessions, account settings and OAuth consent always need a sign-in session.

Rate limits

Every endpoint allows each client a default budget per minute, counted per API key when a request sends one and per IP address otherwise:

RequestsPer minute
Map tiles (/proxy/*, /environment/tiles/*)3,000
Everything else600

Costly endpoints have tighter limits of their own on top, such as directions (60 a minute), saving a trip (30 an hour) and sign-in. A request over a limit answers 429 with Retry-After, in seconds.

An API key gets its own allowance, separate from the IP address it is sent from. An admin can create a key with no rate limit (the access-tokens:unlimited permission), for trusted services that need more.

Separately, the server caps how often it calls paid providers each day. Once one runs out, endpoints that depend on it fall back to other sources or answer 503 with Retry-After until midnight UTC.