CTS API

Transportation / API Key Intermediate HTTPS CORS
Varies by plan (check documentation)

Overview

The CTS (Compagnie des Transports Strasbourgeois) API provides real-time transit data for the Strasbourg, France public transport network including trams and buses. You need an API key from CTS to access live arrival predictions and vehicle positions. It is ideal for developers building local transit apps for the Strasbourg region.

💡

Beginner Tip

Request an API key directly from CTS via their developer portal at https://api.cts-strasbourg.eu/. The API follows SIRI-Lite standards, so queries use XML-like parameters — use the Swagger UI in the docs to understand the request format before writing code.

Available Data

Use case: Integrate cts realtime api data into web and mobile applications
CTS data via REST API
JSON-formatted response data
Requires API key authentication

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

MonitoringRef The stop reference identifier used to query real-time arrivals.
MonitoredVehicleJourney.LineRef The line identifier for the vehicle journey (e.g., tram line A or bus line 10).
MonitoredVehicleJourney.DestinationName The final destination displayed on the vehicle for this journey.
MonitoredCall.ExpectedArrivalTime Real-time predicted arrival time at the monitored stop in ISO 8601 format.
MonitoredCall.AimedArrivalTime Scheduled (timetabled) arrival time at the stop, for comparison with the real-time prediction.

Implementation Example

const url = "https://api.cts-strasbourg.eu/";
// 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 API key missing or invalid
Include your CTS API key as the "apikey" query parameter in the URL or contact CTS to request a new key.
No service delivery data Querying a stop reference that does not exist in the CTS network
Look up valid stop codes in the CTS network map or use the /stop-points endpoint to list valid MonitoringRef values.
Empty MonitoredVehicleJourney array No vehicles currently serving the requested stop
Check the service schedule — late night or early morning queries may return no results. Try a busier stop like a major tram interchange.

Matrix Score Breakdown

🌐 Reachability 0/30
⚡ Speed 0/20
🔒 Security 15/15
🛠 Developer XP 17/20
✓ Reliability 0/15

Partially tested on Apr 5, 2026

Technical Specifications

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

Similar APIs

View All →