Endpoints: Station Lookups

The following set of API endpoints can be used to get information about train stations across the United Kingdom.

The National Rail SOAP API does not have the capability to lookup information on train stations. The following endpoints are custom designed and served directly from the departureboard.io API. The data is generated from static data feeds from National Rail, which are automatically parsed and updated each night by the departureboard.io API at 00:30 United Kingdom time.

You do not need to specify your National Rail API Key to use these feeds. Responses are served directly by the departureboard.io API

There are 2 endpoints available here:

Endpoint Description
getStationBasicInfo Used to lookup train stations by CRS Code or by name
getStationDetailsByCRS Used to get detailed information on a train station by CRS code


Get Train Station Basic Info

getStationBasicInfo is used to look up a Train Station by CRS Code, or by name.

The most common use for this endpoint is for converting between CRS Codes and Train Station names. For example, displaying friendly names like “London Paddington” instead of “PAD” in your application. You can also use this endpoint in AJAX powered search boxes, to allow your users to search for stations by name.

getTrainStationBasicDetails returns a JSON Array of Objects, containing each stations crsCode and stationName.

The optional stationCRS parameter can also be used to lookup basic information on a specific train station by its CRS Code. This changes the response of the endpoint to a single JSON Object instead of a JSON Array. This can be used in applications to quickly convert CRS Codes to station names.

HTTP Request

GET https://api.departureboard.io/api/v2.0/getStationBasicInfo/


Query Parameters

Parameter Default Description
station none The string you wish to use to search for stations. This can be a CRS Code, such as PAD, a partial train station name such as Wate or a full train station name such as London Waterloo. If this query parameter is blank, then all train stations in the UK will be returned. This parameter cannot be used alongside stationCRS. You must use one or the other.

This query parameter must be URL encoded. For example London Paddington becomes London%20Paddington, and Hayes & Harlington becomes Hayes%20%26%20Harlington.
stationCRS none Used to lookup a specific train station by CRS Code. This parameter should not be used for searching, it must be a valid and complete CRS code. This parameter will change the response to return a single JSON object instead of an array. This parameter cannot be used alongside station. You must use one or the other.

Example Queries

Lookup all UK Train Stations with London in their name:
curl -X GET "https://api.departureboard.io/api/v2.0/getStationBasicInfo/?station=London"

Return a list of all UK Train Stations:
curl -X GET "https://api.departureboard.io/api/v2.0/getStationBasicInfo/?station="

Lookup London Paddington:
curl -X GET "https://api.departureboard.io/api/v2.0/getStationBasicInfo/station=London%20Paddington"

Lookup London Kings Cross by CRS Code Only:
curl -X GET "https://api.departureboard.io/api/v2.0/getStationBasicInfo/stationCRS=KGX"


Example Response

curl -X GET "https://api.departureboard.io/api/v2.0/getStationBasicInfo/?station=London%20W"

Expand Response
[
{
  "crsCode": "WAE",
  "stationName": "London Waterloo East"
},
{
  "crsCode": "WAT",
  "stationName": "London Waterloo"
}
]


Get Detailed Train Station Info By CRS

getStationDetailsByCRS is a custom designed API Endpoint that allows the retrieval of extremely detailed information about a Train Station.

It returns a wealth of information, such as:

  • Opening Times
  • Address
  • Staffing Schedules
  • Accessibility Information
  • +100’s of other attributes

HTTP Request

GET https://api.departureboard.io/api/v2.0/getStationDetailsByCRS/{CRS}


Query Parameters

Parameter Default Description
CRS
required
none The CRS (Computer Reservation System) for the Station you wish to get detailed Train Station information for, e.g. KGX for London Kings Cross.

Example Queries

Lookup detailed Train Station information for London Kings Cross:
curl -X GET "https://api.departureboard.io/api/v2.0/getStationDetailsByCRS/KGX/"

Example Response

curl -X GET "https://api.departureboard.io/api/v2.0/getStationDetailsByCRS/KGX/"

Expand Response
{
"changeHistory": {
  "changedBy": "AWoodward",
  "lastChangedDate": "2020-04-03T00:00:00.000+01:00"
},
"crsCode": "PBO",
"alternativeIdentifiers": {
  "nationalLocationCode": "613300"
},
"name": "Peterborough",
"sixteenCharacterName": "PETERBOROUGH",
"address": {
  "line": [
    "Peterborough station",
    "Station Road",
    "Peterborough",
    "Cambridgeshire"
  ],
  "postCode": "PE1 1QL"
},
"longitude": "-0.249830061",
"latitude": "52.57499236",
"stationOperator": "GR",
"staffing": {
  "staffingLevel": "fullTime",
  "closedCircuitTelevisionavailable": true
},
"informationSystems": {
  "informationAvailableFromStaff": null,
  "informationServicesOpen": {
    "note": null,
    "openingPeriods": [
      {
        "dayType": {
          "monday": true,
          "tuesday": true,
          "wednesday": true,
          "thursday": true,
          "friday": true,
          "saturday": true,
          "sunday": false,
          "mondayToFriday": false,
          "mondayToSunday": false,
          "allBankHoldays": false
        },
        "openingHours": {
          "openPeriod": {
            "startTime": "03:15:00.000",
            "endTime": "01:00:00.000"
          },
          "twentyFourHours": null,
          "unavailable": null
        }
      },
      {
        "dayType": {
          "monday": false,
          "tuesday": false,
          "wednesday": false,
          "thursday": false,
          "friday": false,
          "saturday": false,
          "sunday": true,
          "mondayToFriday": false,
          "mondayToSunday": false,
          "allBankHoldays": false
        },
        "openingHours": {
          "openPeriod": {
            "startTime": null,
            "endTime": null
          },
          "twentyFourHours": true,
          "unavailable": null
        }
      }
    ]
  },
  "CIS": null,
  "customerHelpPointsAvailable": false
},
"fares": {
  "ticketOffice": {
    "available": null,
    "openingPeriods": [
      {
        "dayType": {
          "monday": false,
          "tuesday": false,
          "wednesday": false,
          "thursday": false,
          "friday": false,
          "saturday": false,
          "sunday": false,
          "mondayToFriday": true,
          "mondayToSunday": false,
          "allBankHoldays": false
        },
        "openingHours": {
          "openPeriod": {
            "startTime": "05:45:00.000",
            "endTime": "21:00:00.000"
          },
          "twentyFourHours": null,
          "unavailable": null
        }
      },
      {
        "dayType": {
          "monday": false,
          "tuesday": false,
          "wednesday": false,
          "thursday": false,
          "friday": false,
          "saturday": true,
          "sunday": false,
          "mondayToFriday": false,
          "mondayToSunday": false,
          "allBankHoldays": false
        },
        "openingHours": {
          "openPeriod": {
            "startTime": "05:45:00.000",
            "endTime": "21:00:00.000"
          },
          "twentyFourHours": null,
          "unavailable": null
        }
      },
      {
        "dayType": {
          "monday": false,
          "tuesday": false,
          "wednesday": false,
          "thursday": false,
          "friday": false,
          "saturday": false,
          "sunday": true,
          "mondayToFriday": false,
          "mondayToSunday": false,
          "allBankHoldays": false
        },
        "openingHours": {
          "openPeriod": {
            "startTime": "08:05:00.000",
            "endTime": "21:00:00.000"
          },
          "twentyFourHours": null,
          "unavailable": null
        }
      }
    ]
  },
  "prepurchaseTicketCollectionAvailable": {
    "ticketOffice": true,
    "ticketMachine": true
  },
  "ticketMachineAvailable": true,
  "oystercardIssued": false,
  "oystercardTopupAvailable": {
    "ticketOffice": null,
    "ticketMachine": null
  },
  "useOystercard": false,
  "alwaysShowOysterCardFields": false,
  "smartcardIssued": false,
  "smartcardValidator": true,
  "smartcardComments": "<p><span style=\"display: inline !important; float: none; background-,Helvetica,sans-serif; font-size: 12.13px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;\">Collection is available for Smart tickets bought online.</span>&nbsp;</p>",
  "travelcardZones": null,
  "penaltyFares": {
    "policyInfoUrl": null,
    "trainOperatorsApplicable": null
  }
},
"passengerServices": {
  "customerServiceNote": null,
  "leftLuggage": {
    "contactDetails": {
      "primaryTelephoneNumber": null,
      "url": "https://www.nationalrail.co.uk/"
    },
    "available": false,
    "operatorName": null
  },
  "lostProperty": {
    "contactDetails": {
      "primaryTelephoneNumber": "01302 362175",
      "url": "https://www.nationalrail.co.uk/"
    },
    "available": null,
    "operatorName": null
  }
},
"stationFacilities": {
  "firstClassLounge": {
    "note": "<p>The First Class Lounge&nbsp;&nbsp;For LNER customers is located in the&nbsp;Great Northern Hotel directly opposite the station.</p>",
    "available": null
  },
  "seatedArea": {
    "note": null,
    "available": true
  },
  "WaitingRoom": {
    "note": null,
    "available": null
  },
  "trolleys": {
    "note": null,
    "available": true
  },
  "stationBuffet": {
    "note": null,
    "available": true
  },
  "toilets": {
    "note": null,
    "available": true
  },
  "babyChange": {
    "note": null,
    "available": true
  },
  "showers": {
    "note": null,
    "available": false
  },
  "telephones": {
    "note": null,
    "available": null,
    "usageType": null
  },
  "wiFi": {
    "note": "<p><a href=\"http://btopenzone.hotspot-directory.com/results.php?txtQuick=PE1 1QL&z=9&radRoaming=1\" target=\"_blank\">Find WiFi Hotspots around Peterborough station</a></p>",
    "available": false
  },
  "webKiosk": {
    "note": null,
    "available": false
  },
  "postBox": {
    "note": null,
    "available": true
  },
  "touristInformation": {
    "note": null,
    "available": false
  },
  "atmMachine": {
    "note": null,
    "available": true
  },
  "bureauDeChange": {
    "note": null,
    "available": false
  },
  "shops": {
    "note": null,
    "available": true
  }
},
"accessibility": {
  "helpline": {
    "contactDetails": {
      "note": "08457 225 225",
      "url": "https://www.nationalrail.co.uk/"
    },
    "openingPeriods": null
  },
  "staffHelpAvailable": {
    "note": "<p><font color=\"#000000\"><span style=\"font-size: 10pt; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;\">Assistance meeting point is</span><span style=\"font-size: 12pt; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;\"> </span><span style=\"font-size: 10pt; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;\">Customer Information Point in main concourse</span></font></p>",
    "available": null
  },
  "inductionLoop": true,
  "accessibleTicketMachines": {
    "note": null,
    "available": true
  },
  "heightAdjustedTicketOfficeCounter": {
    "note": null,
    "available": true
  },
  "rampForTrainAccess": {
    "note": null,
    "available": true
  },
  "accessibleTaxis": {
    "note": "<p>Outside station plus we can book by phone</p>",
    "available": null
  },
  "accessiblePublicTelephones": {
    "note": null,
    "available": null
  },
  "nearestStationsWithMoreFacilities": null,
  "nationalKeyToilets": {
    "note": null,
    "available": true
  },
  "stepFreeAccess": {
    "note": "<p>Steps and lifts are available for access to all 7 platforms. Ticket Office and Car Park are step free.</p><p>Peterborough has a RNIB Map for All located outside the main entrance to the right of the doors.</p>",
    "coverage": "wholeStation"
  },
  "impairedMobilitySetDown": {
    "note": null,
    "available": true
  },
  "wheelchairsAvailable": {
    "note": null,
    "available": true
  }
},
"interchange": {
  "cycleStorage": {
    "note": null,
    "spaces": 458,
    "sheltered": "Yes",
    "cctv": true
  },
  "carPark": {
    "contactDetails": {
      "postalAddress": {
        "line": [
          "-",
          "-"
        ]
      },
      "primaryTelephoneNumber": null,
      "alternatePublicTelephoneNumbers": null,
      "alternateInternalTelephoneNumbers": null,
      "faxNumber": null,
      "emailAddress": null,
      "url": "https://www.nationalrail.co.uk/"
    },
    "dayAndTimeAvailability": null,
    "operatorName": "London North Eastern Railway",
    "name": "Spittle Bank",
    "spaces": 193,
    "charges": {
      "free": null,
      "offPeak": "£7.00",
      "perHour": "N/A",
      "daily": "£15.00",
      "weekly": "£49.00",
      "monthly": "£195.00",
      "threeMonthly": "£445.00",
      "sixMonthly": "N/A",
      "annual": "£1385.00",
      "saturday": "£6.00",
      "sunday": "£6.00",
      "note": "<p>Special weekend rate available Friday to Monday at £17.00, this must be purchased from the Travel Centre prior to travel&nbsp;</p>"
    },
    "numberAccessibleSpaces": null,
    "AccessibleSpacesNote": "<font color=\"#000000\" face=\"Times New Roman\" size=\"3\"><font color=\"#000000\" face=\"Times New Roman\" size=\"3\">\n\n</font><span style=\"font-size: 11pt; mso-fareast-language: EN-GB; mso-bidi-language: AR-SA;\"><font color=\"#000000\">There are a further 28 spaces for blue\n(disabled) badge holders.&nbsp; 25 of these are in the area behind the Great\nNorthern hotel with a further 3 within the main long stay car park towards the\nsouth of the station</font></span></font>",
    "accessibleCarParkEquipment": null,
    "accessibleCarParkEquipmentNote": null,
    "cctv": false
  },
  "railReplacementServices": {
    "note": "<p>Rail Replacement Coaches leave from the station entrance.</p>",
    "railReplacementMap": null
  },
  "taxiRank": {
    "note": "<p>Taxis are available, whilst services run, there is also a private hire firm situated at the station.</p> <p>Peterborough Taxis: 01733 777 000</p>"
  },
  "onwardTravel": {
    "note": "<p>Information to plan your onward journey is available in a printable format <a href=\"http://www.nationalrail.co.uk/posters/PBO.pdf\">here</a></p>"
  },
  "airport": {
    "note": null
  },
  "carHire": {
    "note": null
  },
  "cycleHire": {
    "note": "Brompton Dock <br>0208 232 3931<br><a href=\"http://www.bromptondock.co.uk\">www.bromptondock.co.uk</a>"
  },
  "metroServices": {
    "note": null
  },
  "port": {
    "note": null
  }
},
"stationAlerts": {
  "alertText": [
    "<p>The LNER Travel Centre at this station is temporarily closed.</p>"
  ]
},
"stationTrainOperatingCompanies": [
  "GR"
]
}