The Stop Structure API provides data about the topology of a station, stop, pier or other stop point. In other words, it includes data about entrances, concourses, ticket halls and platforms, as well as possible interchanges between these areas.
The API is documented below. If you have any questions, please reply and let us know.
Endpoint
The request endpoint is:
https://api.tfl.gov.uk/jp_public/api10/XML_STOPSTRUCTURE_REQUEST?
Parameters must be appended to this URL as described below:
Query string parameters
app_key
(required)
Your subscription key, which can be found on your user profile.
sSStopNr
(required)
The ID of the station you would like to retrieve the internal structure of. This can be in one of the following formats:
- ATCO Code: equivalent to a StopPoint object’s
naptanId
property. Example:940GZZLUSJP
. - EFA ID: equivalent to a StopPoint object’s
icsCode
property. Example:1000221
.
sSFF
By default, assigned stops are not taken into account. With this parameter it is possible to specify the ID of a stop to which the footpaths are output.
sSESM
Exact stop match.
Possible values:
0
(default): Include surrounding stops and interchanges to those stops.1
: Do not include surrounding stops or interchanges to those stops.
sSFEA
Filter empty areas.
Possible values:
0
(default): Return all areas.1
: Do not return empty areas.
sSInclSL
Include serving lines.
Possible values:
0
(default): Do not return data about serving lines.1
: Include data about the lines that serve each area.
sSInclSP
Include stop points.
Possible values:
0
(default): Do not return stop point data.1
: Include data about individual platforms and bus stops.
sSOnlyDF
Only direct footpath.
Possible values:
0
: Include footpaths between areas that require travelling through other areas.1
(default): Only include footpaths that directly connect two areas.
onlyDefaultFootpaths
Only unrestricted footpaths.
Possible values:
0
(default): Return all interchanges.1
: Do not return interchanges intended for customers with step-free requirements, such as lifts.
coordOutputFormat
The coordinate system used in the output.
Possible values:
MDV
(default): a proprietary coordinate system.WGS84[DD.DDDDD]
(recommended): WGS 84, a standard coordinate system compatible with most geographic information systems.
Example requests
Minimum recommended request
Finding the stop structure of St James’s Park Tube station:
https://api.tfl.gov.uk/jp_public/api10/XML_STOPSTRUCTURE_REQUEST?sSStopNr=940GZZLUSJP&coordOutputFormat=WGS84[dd.ddddd]&app_key=YOUR_API_KEY
A more complex request
Finding the stop structure of Victoria Tube station with additional data and customised filtering:
https://api.tfl.gov.uk/jp_public/api10/XML_STOPSTRUCTURE_REQUEST?sSStopNr=1000248&sSESM=1&sSFEA=1&sSInclSL=1&sSInclSP=1&sSOnlyDF=0&onlyDefaultFootpaths=1&coordOutputFormat=WGS84[dd.ddddd]&app_key=YOUR_API_KEY
Response elements
stopArea
An area within a stop/station. Contains an itdPoint
.
Attributes:
level
: The level that the area is on. Negative levels are below ground, positive levels are above ground.areaType
: The type of area. See below.stopName
: The name of the stop.areaName
: A short, textual identifier for the area.
itdPoint
A point within a stopArea
.
Attributes:
stopID
: The EFA ID for the stop the area is in.area
: The area’s ID within the stop. This is only unique to a specificstopID
.gid
: The stop’s ATCO Code.x
andy
: The geographic coordinates of the stop.
footpathInfo
Information about an interchange between two child itdPoint
s.
Attributes:
duration
: The number of minutes the interchange takes.distance
: The distance of the interchange in metres. Has a value of0
if unavailable.
footpathPartInfo
Information about part of a footpathInfo
.
Attributes:
type
: The means of interchange. Possible values:LEVEL
(walkway),STAIRS
,ESCALATOR
,ELEVATOR
,RAMP
.
areaType
flags
The stopArea
element’s areaType
attribute is the decimal sum of the values of a combination of bitwise flags, detailed below:
Flag | Decimal value | Description |
---|---|---|
PUBLICTRANSPORT | 1 | |
PARKANDRIDE | 2 | |
BIKEAREA | 4 | |
TAXI | 8 | |
LINESCARRYING_BIKES | 16 | Served by public transport lines that allow bikes |
CONNECTABLE_GIS | 32 | Stop area can be connected to GIS network |
LOCALTRAINS | 64 | Transition to local trains |
LONGTRAINS | 128 | Transition to long distance services |
PLANES | 256 | Transition to air traffic |
META1 | 512 | Transition point for distributed journey planning, method 1 |
SOS | 1024 | Emergency call available |
STAFFED | 2048 | Staff available at this area |
MEZZANINE | 4096 | |
META2 | 8192 | Transition point for distributed journey planning, method 2 |
META3 | 16384 | Transition point for distributed journey planning, method 3 |
For example, a value of 96 = 64 + 32, meaning both the CONNECTABLE_GIS and LOCALTRAINS flags apply.