Developers

The jetlags.fr API

The calculator engine, available as JSON. Ideal for travel apps, booking confirmation emails and corporate travel tools.

Features

REST JSON + CORS

Call it from a browser or a server.

Free, rate-limited

60 requests per minute per IP without a key.

OpenAPI 3.1

Full spec to generate your clients.

Endpoints

GET/api/health

Service health.

curl https://jetlags.fr/api/health
GET/api/v1/cities

List of cities (slug, name, IANA zone, coordinates). Parameter lang=fr|en.

curl "https://jetlags.fr/api/v1/cities?lang=en"
GET/api/v1/cities/{slug}

City detail with its current time.

curl https://jetlags.fr/api/v1/cities/tokyo
GET/api/v1/time

Current time for a city (city) or IANA zone (tz).

curl "https://jetlags.fr/api/v1/time?tz=Asia/Tokyo"
GET/api/v1/time-difference

Difference between two cities or zones, summer/winter, distance, flight estimate, jet lag intensity.

curl "https://jetlags.fr/api/v1/time-difference?from=paris&to=new-york"
GET / POST/api/v1/plan

Full jet lag plan. format=ics for a calendar file.

curl -X POST https://jetlags.fr/api/v1/plan \
  -H "content-type: application/json" \
  -d '{"from":"paris","to":"tokyo","departure":"2026-12-01T10:30","duration":13.5,"bedtime":"23:00","wake":"07:00","preDays":2,"lang":"en"}'

Errors

Errors return a 4xx/5xx HTTP status and a body { "error": { "code", "message" } }. Exceeding the limit returns 429 with a Retry-After header.

A Bruno test collection is available in the repository (bruno/ folder).