DepartureBoard

departureboard.io API

The departureboard.io is a high performance API written in Golang. Its goal is to provide to main functions: (1): A JSON API interface to the legacy National…

Logistics & shipping#openapi#transport

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

The departureboard.io is a high performance API written in Golang. Its goal is to provide to main functions: (1): A JSON API interface to the legacy National Rail SOAP API: Giving developers the ability to pull live information on departures, arrivals, and services from National Rail, without having to use the legacy SOAP API provided by National Rail. Information is still pulled directly from National Rail in the background, providing the same level of real-time data without the additional complexity of having to interact with SOAP. (2): A JSON API interface for additional National Rail information: Giving developers the ability to pull a range of information about the Rail Network, via a JSON API interface. This is not an offering that National Rail currently provide, and is custom developed. Data is sourced from periodically updated XML documents, parsed, and provided for consumption via the departureboard.io API. This API is completely free to use for non-commercial purposes. You can explore the various sections of the documentation using the links below. For more information please see https://api.departureboard.io

Endpoints 6

Departures & Arrivals

  • GETgetArrivalsAndDeparturesByCRS is used to get a list of services arriving to and departing from a UK train station by the CRS (Computer Reservation System) code. This will typically return a list of train services, but will also return any replacement bus or ferry services that are in place./getArrivalsAndDeparturesByCRS/:CRS?apiKey=string&numServices=10&timeOffset=0&timeWindow=120&serviceDetails=true&filterStation=string&filterType=string
  • GETgetArrivalsByCRS is used to get a list of services arriving to a UK train station by the CRS (Computer Reservation System) code. This will typically return a list of train services, but will also return any replacement bus or ferry services that are in place./getArrivalsByCRS/:CRS?apiKey=string&numServices=10&timeOffset=0&timeWindow=120&serviceDetails=true&filterStation=string
  • GETgetDeparturesByCRS is used to get a list of services departing from a UK train station by the CRS (Computer Reservation System) code. This will typically return a list of train services, but will also return any replacement bus or ferry services that are in place./getDeparturesByCRS/:CRS?apiKey=string&numServices=10&timeOffset=0&timeWindow=120&serviceDetails=true&filterStation=string

Fastest and Next Departures

  • GETgetFastestDeparturesByCRS is used to get the fastest next service running between two stations. Multiple destinations can be specified. This will typically return a single train service, but will also return a replacement bus or ferry service if in place./getFastestDeparturesByCRS/:CRS?apiKey=string&filterList=string&timeOffset=0&timeWindow=120&serviceDetails=true
  • GETgetNextDeparturesByCRS is used to get the next service running between two stations. Multiple destinations can be specified. This will typically return a single train service, but will also return a replacement bus or ferry service if in place. This will return the next departures for each of the filterList stations specified. It may not return the fastest next service. To get the fastest next service use the getFastestDeparturesByCRS endpoint./getNextDeparturesByCRS/:CRS?apiKey=string&filterList=string&timeOffset=0&timeWindow=120&serviceDetails=true

Service Information

  • GETgetServiceDetailsByID is used to get information on a service, by the Service ID. This will typically return a train service, but will also return a bus and ferry services. The Service ID must be provided in the serviceIDUrlSafe format that is provided in the response for Arrival and Departure Boards. A service ID is specific to a station, and can only be looked up for a short time after a train/bus/ferry arrives at, or departs from a station. This is a National Rail limitation./getServiceDetailsByID/:serviceID?apiKey=string

API details

Base URL
https://api.departureboard.io/api/v2.0
Authentication
None declared in the description
Operations
6 operations on 6 pathsGET 6
Main resources
Departures & Arrivals 3Fastest and Next Departures 2Service Information 1
Description format
OpenAPI 3.0.0, API version 2.0
Listed from
APIs.guru OpenAPI Directory (CC0-1.0)
Source updated

How to test the departureboard.io API in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the departureboard.io API collection, without the publisher's secrets.
  3. Add your credentialsOpen the collection's variables or an environment and enter your API key or token, if the API needs one.
  4. Send a requestPick an endpoint, for example “getArrivalsAndDeparturesByCRS is used to get a list of services arriving to and departing from a UK train station by the CRS (Computer Reservation System) code. This will typically return a list of train services, but will also return any replacement bus or ferry services that are in place.” (GET /getArrivalsAndDeparturesByCRS/:CRS?apiKey=string&numServices=10&timeOffset=0&timeWindow=120&serviceDetails=true&filterStation=string&filterType=string), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the departureboard.io API?

The departureboard.io is a high performance API written in Golang. Its goal is to provide to main functions: (1): A JSON API interface to the legacy National… It is listed under Logistics & shipping and has 6 endpoints.

Who publishes the departureboard.io API?

It is listed from DepartureBoard's public API description (an OpenAPI document), not published by DepartureBoard on Swastik Codes. Anyone who controls departureboard.io can claim the profile by adding a DNS TXT record.

What is the base URL of the departureboard.io API?

Requests go to https://api.departureboard.io/api/v2.0. Endpoint paths are added to this base URL.

How do I authenticate with the departureboard.io API?

Its OpenAPI description does not declare an authentication scheme. Some endpoints may be open; check the provider's documentation before relying on that.

How many endpoints does the departureboard.io API have?

6 operations on 6 paths (6 GET). The largest groups are Departures & Arrivals, Fastest and Next Departures, Service Information.

Is forking the departureboard.io API free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.