Public Transit Station Search API v8

Public Transit Station Search API v8 provides transit stations within a given area.

The /stations response consists of a series of stations with relevant information about the stations. Additional properties, such as the address and transport, can be optionally requested.

Use Cases

Common uses of the Public Transit Station Search API v8 include the following:

  • get how many stations are within a certain distance from a given location
  • get station specific information such as name, identifier, location, type and so on
  • define what transport line serves a given station

Types of Queries

Public Transit Station Search API v8 offers three different types of queries:

Query stations by IDs

This query is useful when you know the identifier of the station and you want to request its information. When querying stations by IDs, the stations element in the response contains only the stations of the selected station.

Query stations by location

This query is useful when you want to know what transit stations are available within a location of your choice. The query will return the stations that fall within a circular area. The center of the area and its size are set by the location of your choice and the radius, respectively.

Note

The number of stations being returned is directly dependent on the size of the area.

You can make use of the maxPlaces parameter to limit the number of stations in the response.

Query stations by name and location

This query is useful when you want to search for a station within a location of your choice, within which there are too many stations. This scenario is common in big transit hubs with many different transit modes and searching for a specific station may be difficult. The required name parameter is the station name or part of the name to search for. It is composed of one or more space-separated words. The name is combined with the optional method parameter to specify if the match is, by default, fuzzy (such as name parts) or strict (i.e. the exact name). You can make use of the maxPlaces parameter to limit the number of stations in the response.

All of the aforementioned queries accept a return parameters which enables the transport information to be returned in the response.

For more information on how to use the Public Transit Station Search API v8, see how to Send a Request and consult one of the following examples:

results matching ""

    No results matching ""