Skip to main content
routes/between

Public JSON API

Static JSON snapshots of our reference data. Free to use for embeds, research, side projects. No auth, no rate limit, plain HTTPS GET.

Endpoints

/api/cities.json

All 50 cities with slug, name, country, lat/lng, population, hasAirport, hasMajorRail.

{ "slug": "rome", "name": "Rome", "country": "Italy", "countryCode": "IT", "lat": 41.9028, "lng": 12.4964, ... }
/api/countries.json

All 27 countries with currency, language, time zone, plug, driving side, calling code, and their city slugs.

{ "slug": "italy", "name": "Italy", "code": "IT", "facts": { "currency": "EUR", "language": "Italian", ... }, "cities": ["rome", "milan", ...] }
/api/routes.json

All 2,450 city-pair routes. Each route has distance, all 4 modes (with availability, duration, price range, operators, CO2), plus fastest/cheapest summary.

{ "from": "rome", "to": "paris", "km": 1105, "modes": [...], "fastest": { "mode": "flight", "durationMinutes": 238 }, ... }
/api/index.json

Self-describing catalogue of all available endpoints.

{ "endpoints": [{ "url": "/api/cities.json", "count": 50, ... }] }

Quick example

# Fetch all cities
curl https://routesbetween.com/api/cities.json | jq '.cities[] | select(.country == "Italy")'

# Get all routes
curl https://routesbetween.com/api/routes.json | jq '.routes[] | select(.from == "rome") | .to'

License & caveats

The data is provided as-is, no warranty. Durations and prices are estimates — see /data-sources/ for the methodology. Operators listed at corridor level, not as actual scheduled-service guarantees. Use with attribution to routesbetween.com if you publish derivatives.

Snapshots are regenerated on every site build. Don't poll faster than once a day — the data rarely changes that quickly.