Navitia API

Beginner's Pick Transportation / API Key Intermediate HTTPS
Varies by plan (check documentation)

Overview

Navitia is a powerful open API for public transportation data, covering routes, stops, schedules, and journey planning worldwide. It requires a free API key you can obtain from their developer portal. Once authenticated, you can query transit routes, real-time departures, and multi-modal journeys.

Beginner Tip

Sign up at navitia.io to get a free API key instantly. Start with the /coverage endpoint to explore what regions are available before diving into journey planning.

Available Data

match scores and results
team standings
player statistics
schedule and fixtures

Example Response

JSON Response
{
  "route": "Line 1",
  "origin": "Station A",
  "destination": "Station B",
  "departure": "08:30",
  "arrival": "09:15",
  "status": "On Time",
  "delays_min": 0
}

Field Reference

journeys List of possible journey options from origin to destination, each with duration and sections
sections Individual legs of a journey, including walking segments and transit rides
departure_date_time Departure time in ISO 8601 format (YYYYMMDDTHHmmss)
display_informations Human-readable details about the transit line, including name, color, and direction
stop_point Information about a specific transit stop, including name and geographic coordinates

Implementation Example

Request
const url = "https://doc.navitia.io/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

401 Unauthorized Missing or incorrectly formatted API key — Navitia uses HTTP Basic Auth with the key as the username
Pass your API key as the username with an empty password: curl -u YOUR_API_KEY: <url>
404 Not Found Requested coverage region or entity does not exist
First call /v1/coverage/ to list valid region IDs, then use those IDs in subsequent requests
Empty journeys array No transit routes connect the requested origin and destination in the given time window
Verify coordinates are within a supported coverage area and that the requested datetime is in the future

Metadata Score Breakdown

Estimated from metadata — endpoint not independently tested

This score is estimated from observable metadata — HTTPS support, authentication model, declared CORS, and documentation reachability — because the API requires authentication or exposes no publicly testable endpoint. The five-signal breakdown is only shown for live-tested APIs.

Metadata estimate · endpoint not independently tested

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Transportation
Difficulty Intermediate
Verified: 2026-04-04

Related Tags

Similar APIs

View All →