IDOS APIidos.cz ↗
Search Czech train, bus, and tram connections via IDOS.cz. Get departure/arrival times, duration, carriers, transfers, and segment-level journey details.
What is the IDOS API?
The IDOS.cz API provides one endpoint — search_connections — that queries Czech public transport timetables and returns up to 3 connections per call, each containing departure time, arrival time, total duration, number of transfers, and a full segments array breaking down every leg of the journey by transport type, carrier, and station.
curl -X GET 'https://api.parse.bot/scraper/35759a92-49ba-47ec-8bc2-ce5761e995f1/search_connections?to=Brno+hl.n.&date=12.7.2026&from=Praha+hl.n.&time=10%3A00&to_code=100003&from_code=100003&direct_only=False' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace idos-cz-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""IDOS.cz Transport Connections — search Czech public transport routes."""
from parse_apis.idos_cz_transport_connections_api import Idos, ConnectionNotFound
client = Idos()
# Search for connections from Praha to Brno at 10:00
result = client.connectionsearches.search(
from_station="Praha hl.n.",
to_station="Brno hl.n.",
time="10:00",
)
print(f"Route: {result.from_} → {result.to}, found {result.connections_count} connections")
# Inspect connection details — segments, carriers, delays
for conn in result.connections:
print(f" {conn.departure_time}–{conn.arrival_time} ({conn.total_duration}, {conn.num_transfers} transfers)")
for seg in conn.segments:
stations_str = " → ".join(s.name for s in seg.stations)
print(f" [{seg.type}] {seg.line_name} | {seg.carrier} | {stations_str}")
if seg.delay_info:
print(f" ⚠ {seg.delay_info}")
# Direct-only search — filter to connections without transfers
direct = client.connectionsearches.search(
from_station="Praha hl.n.",
to_station="Brno hl.n.",
time="08:00",
direct_only="True",
)
print(f"\nDirect connections: {direct.connections_count}")
# Typed error handling
try:
bad = client.connectionsearches.search(
from_station="NonexistentStation123",
to_station="Brno hl.n.",
)
except ConnectionNotFound as exc:
print(f"No connections found: {exc}")
print("Exercised: connectionsearches.search (with time, direct_only, error handling)")
Search for transport connections between two stations on the IDOS.cz timetable. Returns connections with detailed segments showing each leg of the journey including transport type, carrier, stations, timing, and live delay information. Typically returns 3 connections per request; use the time parameter to paginate forward through later departures.
| Param | Type | Description |
|---|---|---|
| to | string | Arrival station name (must match IDOS station name exactly, e.g. 'Brno hl.n.', 'Praha hl.n.', 'Ostrava hl.n.'). |
| date | string | Travel date in D.M.YYYY format (e.g. '3.5.2026'). Omitting defaults to today. |
| from | string | Departure station name (must match IDOS station name exactly, e.g. 'Praha hl.n.', 'Olomouc město', 'Brno hl.n.'). |
| time | string | Departure time in HH:MM format (e.g. '10:00'). Omitting defaults to current time. Use to paginate through later connections. |
| to_code | string | Station type code for the arrival station. |
| from_code | string | Station type code for the departure station. |
| direct_only | boolean | If true, only show direct connections without transfers. May return zero results on routes with no direct service. |
{
"type": "object",
"fields": {
"to": "string - arrival station name",
"date": "string - travel date or 'today' if not specified",
"from": "string - departure station name",
"time": "string - departure time filter or 'now' if not specified",
"connections": "array of connection objects, each with id, departure_time, arrival_time, date, total_duration, num_transfers, and segments array detailing each leg",
"search_info": "string - search description from the site",
"connections_count": "integer - number of connections found"
},
"sample": {
"data": {
"to": "Brno hl.n.",
"date": "today",
"from": "Praha hl.n.",
"time": "10:00",
"connections": [
{
"id": "563329983",
"date": "11.6. čt",
"segments": [
{
"type": "train",
"carrier": "Dopravní podnik hl.m. Prahy, a.s.",
"stations": [
{
"name": "Hlavní nádraží",
"time": "10:27"
},
{
"name": "Nádraží Holešovice",
"time": "10:32"
}
],
"line_name": "Metro C",
"delay_info": "",
"line_description": "metro (Háje >> Letňany)"
},
{
"type": "railjet",
"carrier": "České dráhy, a.s.",
"stations": [
{
"name": "Praha-Holešovice",
"time": "10:36"
},
{
"name": "Brno hl.n.",
"time": "13:13"
}
],
"line_name": "Ex3 (rj 251 Vindobona)",
"delay_info": "Aktuální zpoždění 8 minut",
"walk_before": "Přesun asi 4 min",
"line_description": "railjet (Berlin Hbf (tief) >> Villach Hbf)"
}
],
"arrival_time": "13:13",
"num_transfers": 1,
"departure_time": "10:27",
"total_duration": "2 hod 46 min"
}
],
"search_info": "Spojení Praha hl.n. » Brno hl.n. 11.6.2026",
"connections_count": 3
},
"status": "success"
}
}About the IDOS API
What the API Returns
The search_connections endpoint accepts a departure station (from) and arrival station (to), both of which must match IDOS station names exactly — for example Praha hl.n., Brno hl.n., or Olomouc město. You can also supply a date in D.M.YYYY format and a time in HH:MM format; omitting either defaults to the current date and time. Optional from_code and to_code parameters allow you to disambiguate stations that share a name across different transport modes or localities.
Connection and Segment Data
Each connection object in the connections array includes id, departure_time, arrival_time, date, total_duration, and num_transfers. The nested segments array describes individual legs of the journey, covering the transport mode (train, bus, tram), carrier name, origin and destination stations for that leg, scheduled times, and live delay information where available. The top-level response also includes search_info (a human-readable description of the search) and connections_count.
Filtering and Pagination
Setting direct_only to true restricts results to connections with no transfers; note that some routes have no direct service and the array may return empty. To page through later departures, pass the time parameter set to a value after the last returned departure time — the endpoint does not expose an offset or page number parameter.
The IDOS API is a managed, monitored endpoint for idos.cz — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when idos.cz changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official idos.cz API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a trip-planning widget that shows train and bus options between any two Czech cities with live delay indicators
- Compare total journey durations across multiple departure times on a given route using repeated
search_connectionscalls - Filter for direct-only connections on intercity routes by setting
direct_only: trueand surfacing carrier names to travelers - Aggregate
num_transfersdata across routes to identify the most transfer-heavy corridors in the Czech rail network - Automate daily commute alerts by querying
search_connectionsfor a fixed origin/destination pair and monitoringdeparture_timeshifts - Populate a route comparison table with
total_durationandsegmentsdata to help users choose between train and bus options
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does IDOS.cz have an official public developer API?+
What does the `segments` array inside each connection contain?+
How do I retrieve connections later in the day, since only ~3 results are returned per call?+
time parameter set to a time after the last departure_time in the current response. There is no page offset parameter, so incrementing the time value is the intended way to walk forward through the timetable.Does the API cover intermediate stops along a segment, or only the endpoints of each leg?+
Are station names for `from` and `to` case-sensitive, and what happens with ambiguous names?+
Praha hl.n. rather than Praha hlavni nadrazi. The optional from_code and to_code parameters exist specifically to disambiguate stations that share a display name across different transport contexts or regions.