Relaystation logo Relaystation

Location & routing

Four geospatial primitives behind one API surface: turn a free-text address into coordinates, turn coordinates back into an address, search places and points of interest, and compute a route between two points. Backed by AWS Location Service; each call is priced flat and metered per lookup — no map-SDK contract, no monthly minimum.

curl -X POST https://api.relaystation.ai/v1/location/geocode \
  -H 'Authorization: Bearer rs_live_<key>' \
  -H 'Idempotency-Key: geocode-hq-20260707' \
  -H 'Content-Type: application/json' \
  -d '{ "query": "1600 Amphitheatre Parkway, Mountain View, CA" }'

Or on the lodestone path — no account, a signed x402 payment instead of an API key:

curl -X POST https://api.relaystation.ai/v1/location/geocode \
  -H 'X-Payment: <base64 EIP-3009 authorization>' \
  -H 'Idempotency-Key: geocode-hq-20260707' \
  -H 'Content-Type: application/json' \
  -d '{ "query": "1600 Amphitheatre Parkway, Mountain View, CA" }'

Every coordinate in this API is [longitude, latitude] (WGS-84) — longitude first, matching the GeoJSON / AWS Location convention.

geocode — address → coordinates

POST /v1/location/geocode resolves a free-text query (an address or place name) to candidate positions.

FieldTypeNotes
querystring, requiredthe address / place text (1–512 chars)
maxResultsinteger1–20 candidates
languagestringBCP-47 language tag for the returned labels
biasPosition[lon, lat]pull results toward this point
countriesstring[]restrict to ISO 3166 alpha-3 country codes (e.g. ["USA"])

Returns { results: [...] } — AWS Location result items, each with a Title, structured Address, and Position ([lon, lat]). An empty array means no match (not an error).

reverse-geocode — coordinates → address

POST /v1/location/reverse-geocode resolves a position ([lon, lat]) to the nearest address.

FieldTypeNotes
position[lon, lat], requiredthe point to resolve
maxResultsinteger1–20 candidates
radiusMetersintegersearch radius, 1–100000 m
languagestringlabel language
curl -X POST https://api.relaystation.ai/v1/location/reverse-geocode \
  -H 'Authorization: Bearer rs_live_<key>' \
  -H 'Idempotency-Key: rev-20260707' \
  -H 'Content-Type: application/json' \
  -d '{ "position": [-122.084, 37.4224] }'

Returns { results: [...] }; an empty array means nothing was nearby.

place-search — points of interest

POST /v1/location/place-search searches places and POIs by text.

FieldTypeNotes
querystring, requiredthe search text (1–512 chars)
biasPosition[lon, lat]bias toward this point
maxResultsinteger1–20 results
languagestringlabel language
countriesstring[]ISO 3166 alpha-3 restriction
curl -X POST https://api.relaystation.ai/v1/location/place-search \
  -H 'Authorization: Bearer rs_live_<key>' \
  -H 'Idempotency-Key: place-20260707' \
  -H 'Content-Type: application/json' \
  -d '{ "query": "coffee near Union Square", "biasPosition": [-122.4074, 37.7881] }'

Returns { results: [...] }.

route — path between two points

POST /v1/location/route computes a route from an origin to a destination.

FieldTypeNotes
origin[lon, lat], requiredstart point
destination[lon, lat], requiredend point
travelModeenumCar | Truck | Pedestrian | Scooter
departNowbooleanuse live traffic for the departure
curl -X POST https://api.relaystation.ai/v1/location/route \
  -H 'Authorization: Bearer rs_live_<key>' \
  -H 'Idempotency-Key: route-20260707' \
  -H 'Content-Type: application/json' \
  -d '{ "origin": [-122.4074, 37.7881], "destination": [-122.084, 37.4224], "travelMode": "Car" }'

Returns the AWS Location route set — Routes[].Legs carrying distance, duration, and geometry.

Billing

Each op is a flat per-call charge: geocode and reverse-geocode bill per lookup; place-search bills per search; route bills per route. The charge stands whether the call returns matches or an empty result set — what you buy is the lookup. Reads have no free tier here (every op calls the upstream provider). Priced per call; see Pricing for the current rates, or send an unauthenticated POST to read the exact price from the 402 challenge. Every billable call needs an Idempotency-Key; a same-key retry returns the cached result without re-charging.

MCP tools

Callable over MCP at https://api.relaystation.ai/mcp: geocode, reverse_geocode, place_search, and route. Same auth, same prices as the HTTP routes.

Next

Quickstart · Authentication · x402 wire format · API reference