npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@datafire/tfl_gov_uk

v6.0.0

Published

DataFire integration for Transport for London Unified

Downloads

16

Readme

@datafire/tfl_gov_uk

Client library for Transport for London Unified

Installation and Usage

npm install --save @datafire/tfl_gov_uk
let tfl_gov_uk = require('@datafire/tfl_gov_uk').create({
  apiKey: "",
  appId: ""
});

.then(data => {
  console.log(data);
});

Description

Our unified API brings together data across all modes of transport into a single RESTful API. This API provides access to the most highly requested realtime and status infomation across all the modes of transport, in a single and consistent way. Access to the developer documentation is available at https://api.tfl.gov.uk

Actions

AccidentStats_Get

Gets all accident details for accidents occuring in the specified year

tfl_gov_uk.AccidentStats_Get({
  "year": 0
}, context)

Input

  • input object
    • year required integer: The year for which to filter the accidents on.

Output

AirQuality_Get

Gets air quality data feed

tfl_gov_uk.AirQuality_Get(null, context)

Input

This action has no parameters

Output

BikePoint_GetAll

Gets all bike point locations. The Place object has an addtionalProperties array which contains the nbBikes, nbDocks and nbSpaces numbers which give the status of the BikePoint. A mismatch in these numbers i.e. nbDocks - (nbBikes + nbSpaces) != 0 indicates broken docks.

tfl_gov_uk.BikePoint_GetAll(null, context)

Input

This action has no parameters

Output

BikePoint_Search

Search for bike stations by their name, a bike point's name often contains information about the name of the street or nearby landmarks, for example. Note that the search result does not contain the PlaceProperties i.e. the status or occupancy of the BikePoint, to get that information you should retrieve the BikePoint by its id on /BikePoint/id.

tfl_gov_uk.BikePoint_Search({
  "query": ""
}, context)

Input

  • input object
    • query required string: The search term e.g. "St. James"

Output

BikePoint_Get

Gets the bike point with the given id.

tfl_gov_uk.BikePoint_Get({
  "id": ""
}, context)

Input

  • input object
    • id required string: A bike point id (a list of ids can be obtained from the above BikePoint call)

Output

Cabwise_Get

Gets taxis and minicabs contact information

tfl_gov_uk.Cabwise_Get({
  "lat": 0,
  "lon": 0
}, context)

Input

  • input object
    • lat required number: Latitude
    • lon required number: Longitude
    • optype string: Operator Type e.g Minicab, Executive, Limousine
    • wc string: Wheelchair accessible
    • radius number: The radius of the bounding circle in metres
    • name string: Trading name of operating company
    • maxResults integer: An optional parameter to limit the number of results return. Default and maximum is 20.
    • legacyFormat boolean: Legacy Format
    • forceXml boolean: Force Xml
    • twentyFourSevenOnly boolean: Twenty Four Seven Only

Output

Journey_JourneyResults

Perform a Journey Planner search from the parameters specified in simple types

tfl_gov_uk.Journey_JourneyResults({
  "from": "",
  "to": ""
}, context)

Input

  • input object
    • from required string: Origin of the journey. Can be WGS84 coordinates expressed as "lat,long", a UK postcode, a Naptan (StopPoint) id, an ICS StopId, or a free-text string (will cause disambiguation unless it exactly matches a point of interest name).
    • to required string: Destination of the journey. Can be WGS84 coordinates expressed as "lat,long", a UK postcode, a Naptan (StopPoint) id, an ICS StopId, or a free-text string (will cause disambiguation unless it exactly matches a point of interest name).
    • via string: Travel through point on the journey. Can be WGS84 coordinates expressed as "lat,long", a UK postcode, a Naptan (StopPoint) id, an ICS StopId, or a free-text string (will cause disambiguation unless it exactly matches a point of interest name).
    • nationalSearch boolean: Does the journey cover stops outside London? eg. "nationalSearch=true"
    • date string: The date must be in yyyyMMdd format
    • time string: The time must be in HHmm format
    • timeIs string (values: Arriving, Departing): Does the time given relate to arrival or leaving time? Possible options: "departing" | "arriving"
    • journeyPreference string (values: LeastInterchange, LeastTime, LeastWalking): The journey preference eg possible options: "leastinterchange" | "leasttime" | "leastwalking"
    • mode array: The mode must be a comma separated list of modes. eg possible options: "public-bus,overground,train,tube,coach,dlr,cablecar,tram,river,walking,cycle"
    • accessibilityPreference array: The accessibility preference must be a comma separated list eg. "noSolidStairs,noEscalators,noElevators,stepFreeToVehicle,stepFreeToPlatform"
    • fromName string: An optional name to associate with the origin of the journey in the results.
    • toName string: An optional name to associate with the destination of the journey in the results.
    • viaName string: An optional name to associate with the via point of the journey in the results.
    • maxTransferMinutes string: The max walking time in minutes for transfer eg. "120"
    • maxWalkingMinutes string: The max walking time in minutes for journeys eg. "120"
    • walkingSpeed string (values: Slow, Average, Fast): The walking speed. eg possible options: "slow" | "average" | "fast".
    • cyclePreference string (values: None, LeaveAtStation, TakeOnTransport, AllTheWay, CycleHire): The cycle preference. eg possible options: "allTheWay" | "leaveAtStation" | "takeOnTransport" | "cycleHire"
    • adjustment string: Time adjustment command. eg possible options: "TripFirst" | "TripLast"
    • bikeProficiency array: A comma separated list of cycling proficiency levels. eg possible options: "easy,moderate,fast"
    • alternativeCycle boolean: Option to determine whether to return alternative cycling journey
    • alternativeWalking boolean: Option to determine whether to return alternative walking journey
    • applyHtmlMarkup boolean: Flag to determine whether certain text (e.g. walking instructions) should be output with HTML tags or not.
    • useMultiModalCall boolean: A boolean to indicate whether or not to return 3 public transport journeys, a bus journey, a cycle hire journey, a personal cycle journey and a walking journey
    • walkingOptimization boolean: A boolean to indicate whether to optimize journeys using walking
    • taxiOnlyTrip boolean: A boolean to indicate whether to return one or more taxi journeys. Note, setting this to true will override "useMultiModalCall".

Output

Journey_Meta

Gets a list of all of the available journey planner modes

tfl_gov_uk.Journey_Meta(null, context)

Input

This action has no parameters

Output

Line_MetaDisruptionCategories

Gets a list of valid disruption categories

tfl_gov_uk.Line_MetaDisruptionCategories(null, context)

Input

This action has no parameters

Output

  • output array
    • items string

Line_MetaModes

Gets a list of valid modes

tfl_gov_uk.Line_MetaModes(null, context)

Input

This action has no parameters

Output

Line_MetaServiceTypes

Gets a list of valid ServiceTypes to filter on

tfl_gov_uk.Line_MetaServiceTypes(null, context)

Input

This action has no parameters

Output

  • output array
    • items string

Line_MetaSeverity

Gets a list of valid severity codes

tfl_gov_uk.Line_MetaSeverity(null, context)

Input

This action has no parameters

Output

Line_GetByMode

Gets lines that serve the given modes.

tfl_gov_uk.Line_GetByMode({
  "modes": []
}, context)

Input

  • input object
    • modes required array: A comma-separated list of modes e.g. tube,dlr

Output

Line_DisruptionByMode

Get disruptions for all lines of the given modes.

tfl_gov_uk.Line_DisruptionByMode({
  "modes": []
}, context)

Input

  • input object
    • modes required array: A comma-separated list of modes e.g. tube,dlr

Output

Line_RouteByMode

Gets all lines and their valid routes for given modes, including the name and id of the originating and terminating stops for each route

tfl_gov_uk.Line_RouteByMode({
  "modes": []
}, context)

Input

  • input object
    • modes required array: A comma-separated list of modes e.g. tube,dlr
    • serviceTypes array: A comma seperated list of service types to filter on. Supported values: Regular, Night. Defaulted to 'Regular' if not specified

Output

Line_StatusByMode

Gets the line status of for all lines for the given modes

tfl_gov_uk.Line_StatusByMode({
  "modes": []
}, context)

Input

  • input object
    • modes required array: A comma-separated list of modes to filter by. e.g. tube,dlr
    • detail boolean: Include details of the disruptions that are causing the line status including the affected stops and routes

Output

Line_Route

Get all valid routes for all lines, including the name and id of the originating and terminating stops for each route.

tfl_gov_uk.Line_Route({}, context)

Input

  • input object
    • serviceTypes array: A comma seperated list of service types to filter on. Supported values: Regular, Night. Defaulted to 'Regular' if not specified

Output

Line_Search

Search for lines or routes matching the query string

tfl_gov_uk.Line_Search({
  "query": ""
}, context)

Input

  • input object
    • query required string: Search term e.g victoria
    • modes array: Optionally filter by the specified modes
    • serviceTypes array: A comma seperated list of service types to filter on. Supported values: Regular, Night. Defaulted to 'Regular' if not specified

Output

Line_StatusBySeverity

Gets the line status for all lines with a given severity A list of valid severity codes can be obtained from a call to Line/Meta/Severity

tfl_gov_uk.Line_StatusBySeverity({
  "severity": 0
}, context)

Input

  • input object
    • severity required integer: The level of severity (eg: a number from 0 to 14)

Output

Line_Get

Gets lines that match the specified line ids.

tfl_gov_uk.Line_Get({
  "ids": []
}, context)

Input

  • input object
    • ids required array: A comma-separated list of line ids e.g. victoria,circle,N133. Max. approx. 20 ids.

Output

Line_Arrivals

Get the list of arrival predictions for given line ids based at the given stop

tfl_gov_uk.Line_Arrivals({
  "ids": [],
  "stopPointId": ""
}, context)

Input

  • input object
    • ids required array: A comma-separated list of line ids e.g. victoria,circle,N133. Max. approx. 20 ids.
    • stopPointId required string: Optional. Id of stop to get arrival predictions for (station naptan code e.g. 940GZZLUASL, you can use /StopPoint/Search/{query} endpoint to find a stop point id from a station name)
    • direction string (values: inbound, outbound, all): Optional. The direction of travel. Can be inbound or outbound or all. If left blank, and destinationStopId is set, will default to all
    • destinationStationId string: Optional. Id of destination stop

Output

Line_Disruption

Get disruptions for the given line ids

tfl_gov_uk.Line_Disruption({
  "ids": []
}, context)

Input

  • input object
    • ids required array: A comma-separated list of line ids e.g. victoria,circle,N133. Max. approx. 20 ids.

Output

Line_LineRoutesByIds

Get all valid routes for given line ids, including the name and id of the originating and terminating stops for each route.

tfl_gov_uk.Line_LineRoutesByIds({
  "ids": []
}, context)

Input

  • input object
    • ids required array: A comma-separated list of line ids e.g. victoria,circle,N133. Max. approx. 20 ids.
    • serviceTypes array: A comma seperated list of service types to filter on. Supported values: Regular, Night. Defaulted to 'Regular' if not specified

Output

Line_StatusByIds

Gets the line status of for given line ids e.g Minor Delays

tfl_gov_uk.Line_StatusByIds({
  "ids": []
}, context)

Input

  • input object
    • ids required array: A comma-separated list of line ids e.g. victoria,circle,N133. Max. approx. 20 ids.
    • detail boolean: Include details of the disruptions that are causing the line status including the affected stops and routes

Output

Line_Status

Gets the line status for given line ids during the provided dates e.g Minor Delays

tfl_gov_uk.Line_Status({
  "ids": [],
  "startDate": "",
  "endDate": "",
  "StartDate": "",
  "EndDate": ""
}, context)

Input

  • input object
    • ids required array: A comma-separated list of line ids e.g. victoria,circle,N133. Max. approx. 20 ids.
    • detail boolean: Include details of the disruptions that are causing the line status including the affected stops and routes
    • startDate required string
    • endDate required string
    • dateRange.startDate string
    • dateRange.endDate string
    • StartDate required string
    • EndDate required string

Output

Line_RouteSequence

Gets all valid routes for given line id, including the sequence of stops on each route.

tfl_gov_uk.Line_RouteSequence({
  "id": "",
  "direction": ""
}, context)

Input

  • input object
    • id required string: A single line id e.g. victoria
    • direction required string (values: inbound, outbound, all): The direction of travel. Can be inbound or outbound.
    • serviceTypes array: A comma seperated list of service types to filter on. Supported values: Regular, Night. Defaulted to 'Regular' if not specified
    • excludeCrowding boolean: That excludes crowding from line disruptions. Can be true or false.

Output

Line_StopPoints

Gets a list of the stations that serve the given line id

tfl_gov_uk.Line_StopPoints({
  "id": ""
}, context)

Input

  • input object
    • id required string: A single line id e.g. victoria
    • tflOperatedNationalRailStationsOnly boolean: If the national-rail line is requested, this flag will filter the national rail stations so that only those operated by TfL are returned

Output

Line_Timetable

Gets the timetable for a specified station on the give line

tfl_gov_uk.Line_Timetable({
  "fromStopPointId": "",
  "id": ""
}, context)

Input

  • input object
    • fromStopPointId required string: The originating station's stop point id (station naptan code e.g. 940GZZLUASL, you can use /StopPoint/Search/{query} endpoint to find a stop point id from a station name)
    • id required string: A single line id e.g. victoria

Output

Line_TimetableTo

Gets the timetable for a specified station on the give line with specified destination

tfl_gov_uk.Line_TimetableTo({
  "fromStopPointId": "",
  "id": "",
  "toStopPointId": ""
}, context)

Input

  • input object
    • fromStopPointId required string: The originating station's stop point id (station naptan code e.g. 940GZZLUASL, you can use /StopPoint/Search/{query} endpoint to find a stop point id from a station name)
    • id required string: A single line id e.g. victoria
    • toStopPointId required string: The destination stations's Naptan code

Output

Mode_GetActiveServiceTypes

Returns the service type active for a mode. Currently only supports tube

tfl_gov_uk.Mode_GetActiveServiceTypes(null, context)

Input

This action has no parameters

Output

Mode_Arrivals

Gets the next arrival predictions for all stops of a given mode

tfl_gov_uk.Mode_Arrivals({
  "mode": ""
}, context)

Input

  • input object
    • mode required string: A mode name e.g. tube, dlr
    • count integer: A number of arrivals to return for each stop, -1 to return all available.

Output

Occupancy_GetBikePointsOccupancies

Get the occupancy for bike points.

tfl_gov_uk.Occupancy_GetBikePointsOccupancies({
  "ids": []
}, context)

Input

  • input object
    • ids required array

Output

Occupancy.CarPark.get

Gets the occupancy for all car parks that have occupancy data

tfl_gov_uk.Occupancy.CarPark.get(null, context)

Input

This action has no parameters

Output

Occupancy.CarPark.id.get

Gets the occupancy for a car park with a given id

tfl_gov_uk.Occupancy.CarPark.id.get({
  "id": ""
}, context)

Input

  • input object
    • id required string

Output

Occupancy_GetAllChargeConnectorStatus

Gets the occupancy for all charge connectors

tfl_gov_uk.Occupancy_GetAllChargeConnectorStatus(null, context)

Input

This action has no parameters

Output

Occupancy_GetChargeConnectorStatus

Gets the occupancy for a charge connectors with a given id (sourceSystemPlaceId)

tfl_gov_uk.Occupancy_GetChargeConnectorStatus({
  "ids": []
}, context)

Input

  • input object
    • ids required array

Output

Place_GetByGeo

Gets the places that lie within a geographic region. The geographic region of interest can either be specified by using a lat/lon geo-point and a radius in metres to return places within the locus defined by the lat/lon of its centre or alternatively, by the use of a bounding box defined by the lat/lon of its north-west and south-east corners. Optionally filters on type and can strip properties for a smaller payload.

tfl_gov_uk.Place_GetByGeo({}, context)

Input

  • input object
    • radius number: The radius of the bounding circle in metres when only lat/lon are specified.
    • categories array: An optional list of comma separated property categories to return in the Place's property bag. If null or empty, all categories of property are returned. Pass the keyword "none" to return no properties (a valid list of categories can be obtained from the /Place/Meta/categories endpoint)
    • includeChildren boolean: Defaults to false. If true child places e.g. individual charging stations at a charge point while be included, otherwise just the URLs of any child places will be returned
    • type array: Place types to filter on, or null to return all types
    • activeOnly boolean: An optional parameter to limit the results to active records only (Currently only the 'VariableMessageSign' place type is supported)
    • numberOfPlacesToReturn integer: If specified, limits the number of returned places equal to the given value
    • placeGeo.swLat number
    • placeGeo.swLon number
    • placeGeo.neLat number
    • placeGeo.neLon number
    • placeGeo.lat number
    • placeGeo.lon number

Output

Place_GetStreetsByPostCode

Gets the set of streets associated with a post code.

tfl_gov_uk.Place_GetStreetsByPostCode({
  "postcode": "",
  "Postcode": ""
}, context)

Input

  • input object
    • postcode required string
    • postcodeInput.postcode string
    • Postcode required string

Output

Place_MetaCategories

Gets a list of all of the available place property categories and keys.

tfl_gov_uk.Place_MetaCategories(null, context)

Input

This action has no parameters

Output

Place_MetaPlaceTypes

Gets a list of the available types of Place.

tfl_gov_uk.Place_MetaPlaceTypes(null, context)

Input

This action has no parameters

Output

Place_Search

Gets all places that matches the given query

tfl_gov_uk.Place_Search({
  "name": ""
}, context)

Input

  • input object
    • name required string: The name of the place, you can use the /Place/Types/{types} endpoint to get a list of places for a given type including their names.
    • types array: A comma-separated list of the types to return. Max. approx 12 types.

Output

Place_GetByType

Gets all places of a given type

tfl_gov_uk.Place_GetByType({
  "types": []
}, context)

Input

  • input object
    • types required array: A comma-separated list of the types to return. Max. approx 12 types.
    • activeOnly boolean: An optional parameter to limit the results to active records only (Currently only the 'VariableMessageSign' place type is supported)

Output

Place_Get

Gets the place with the given id.

tfl_gov_uk.Place_Get({
  "id": ""
}, context)

Input

  • input object
    • id required string: The id of the place, you can use the /Place/Types/{types} endpoint to get a list of places for a given type including their ids
    • includeChildren boolean: Defaults to false. If true child places e.g. individual charging stations at a charge point while be included, otherwise just the URLs of any child places will be returned

Output

Place_GetAt

Gets any places of the given type whose geography intersects the given latitude and longitude. In practice this means the Place must be polygonal e.g. a BoroughBoundary.

tfl_gov_uk.Place_GetAt({
  "type": [],
  "lat": "",
  "lon": "",
  "location.lat": 0,
  "location.lon": 0,
  "Lat": "",
  "Lon": ""
}, context)

Input

  • input object
    • type required array: The place type (a valid list of place types can be obtained from the /Place/Meta/placeTypes endpoint)
    • lat required string
    • lon required string
    • location.lat required number
    • location.lon required number
    • Lat required string
    • Lon required string

Output

Place_GetOverlay

Gets the place overlay for a given set of co-ordinates and a given width/height.

tfl_gov_uk.Place_GetOverlay({
  "z": 0,
  "type": [],
  "width": 0,
  "height": 0,
  "lat": "",
  "lon": "",
  "location.lat": 0,
  "location.lon": 0,
  "Lat": "",
  "Lon": ""
}, context)

Input

  • input object
    • z required integer: The zoom level
    • type required array: The place type (a valid list of place types can be obtained from the /Place/Meta/placeTypes endpoint)
    • width required integer: The width of the requested overlay.
    • height required integer: The height of the requested overlay.
    • lat required string
    • lon required string
    • location.lat required number
    • location.lon required number
    • Lat required string
    • Lon required string

Output

Road.get

Gets all roads managed by TfL

tfl_gov_uk.Road.get(null, context)

Input

This action has no parameters

Output

Road_MetaCategories

Gets a list of valid RoadDisruption categories

tfl_gov_uk.Road_MetaCategories(null, context)

Input

This action has no parameters

Output

  • output array
    • items string

Road_MetaSeverities

Gets a list of valid RoadDisruption severity codes

tfl_gov_uk.Road_MetaSeverities(null, context)

Input

This action has no parameters

Output

Road_DisruptionById

Gets a list of active disruptions filtered by disruption Ids.

tfl_gov_uk.Road_DisruptionById({
  "disruptionIds": []
}, context)

Input

  • input object
    • disruptionIds required array: Comma-separated list of disruption identifiers to filter by.
    • stripContent boolean: Optional, defaults to false. When true, removes every property/node except for id, point, severity, severityDescription, startDate, endDate, corridor details, location and comments.

Output

Road_DisruptedStreets

Gets a list of disrupted streets. If no date filters are provided, current disruptions are returned.

tfl_gov_uk.Road_DisruptedStreets({
  "startDate": "",
  "endDate": ""
}, context)

Input

  • input object
    • startDate required string: Optional, the start time to filter on.
    • endDate required string: Optional, The end time to filter on.

Output

Road.ids.get

Gets the road with the specified id (e.g. A1)

tfl_gov_uk.Road.ids.get({
  "ids": []
}, context)

Input

  • input object
    • ids required array: Comma-separated list of road identifiers e.g. "A406, A2" (a full list of supported road identifiers can be found at the /Road/ endpoint)

Output

Road_Disruption

Get active disruptions, filtered by road ids

tfl_gov_uk.Road_Disruption({
  "ids": []
}, context)

Input

  • input object
    • ids required array: Comma-separated list of road identifiers e.g. "A406, A2" use all for all to ignore id filter (a full list of supported road identifiers can be found at the /Road/ endpoint)
    • stripContent boolean: Optional, defaults to false. When true, removes every property/node except for id, point, severity, severityDescription, startDate, endDate, corridor details, location, comments and streets
    • severities array: an optional list of Severity names to filter on (a valid list of severities can be obtained from the /Road/Meta/severities endpoint)
    • categories array: an optional list of category names to filter on (a valid list of categories can be obtained from the /Road/Meta/categories endpoint)
    • closures boolean: Optional, defaults to true. When true, always includes disruptions that have road closures, regardless of the severity filter. When false, the severity filter works as normal.

Output

Road_Status

Gets the specified roads with the status aggregated over the date range specified, or now until the end of today if no dates are passed.

tfl_gov_uk.Road_Status({
  "ids": []
}, context)

Input

  • input object
    • ids required array: Comma-separated list of road identifiers e.g. "A406, A2" or use "all" to ignore id filter (a full list of supported road identifiers can be found at the /Road/ endpoint)
    • dateRangeNullable.startDate string
    • dateRangeNullable.endDate string

Output

Search_Get

Search the site for occurrences of the query string. The maximum number of results returned is equal to the maximum page size of 100. To return subsequent pages, use the paginated overload.

tfl_gov_uk.Search_Get({
  "query": ""
}, context)

Input

  • input object
    • query required string: The search query

Output

Search_BusSchedules

Searches the bus schedules folder on S3 for a given bus number.

tfl_gov_uk.Search_BusSchedules({
  "query": ""
}, context)

Input

  • input object
    • query required string: The search query

Output

Search_MetaCategories

Gets the available search categories.

tfl_gov_uk.Search_MetaCategories(null, context)

Input

This action has no parameters

Output

  • output array
    • items string

Search_MetaSearchProviders

Gets the available searchProvider names.

tfl_gov_uk.Search_MetaSearchProviders(null, context)

Input

This action has no parameters

Output

  • output array
    • items string

Search_MetaSorts

Gets the available sorting options.

tfl_gov_uk.Search_MetaSorts(null, context)

Input

This action has no parameters

Output

  • output array
    • items string

StopPoint_GetByGeoPoint

Gets a list of StopPoints within {radius} by the specified criteria

tfl_gov_uk.StopPoint_GetByGeoPoint({
  "stopTypes": [],
  "location.lat": 0,
  "location.lon": 0
}, context)

Input

  • input object
    • stopTypes required array: a list of stopTypes that should be returned (a list of valid stop types can be obtained from the StopPoint/meta/stoptypes endpoint)
    • radius integer: the radius of the bounding circle in metres (default : 200)
    • useStopPointHierarchy boolean: Re-arrange the output into a parent/child hierarchy
    • modes array: the list of modes to search (comma separated mode names e.g. tube,dlr)
    • categories array: an optional list of comma separated property categories to return in the StopPoint's property bag. If null or empty, all categories of property are returned. Pass the keyword "none" to return no properties (a valid list of categories can be obtained from the /StopPoint/Meta/categories endpoint)
    • returnLines boolean: true to return the lines that each stop point serves as a nested resource
    • location.lat required number
    • location.lon required number

Output

StopPoint_MetaCategories

Gets the list of available StopPoint additional information categories

tfl_gov_uk.StopPoint_MetaCategories(null, context)

Input

This action has no parameters

Output

StopPoint_MetaModes

Gets the list of available StopPoint modes

tfl_gov_uk.StopPoint_MetaModes(null, context)

Input

This action has no parameters

Output

StopPoint_MetaStopTypes

Gets the list of available StopPoint types

tfl_gov_uk.StopPoint_MetaStopTypes(null, context)

Input

This action has no parameters

Output

  • output array
    • items string

StopPoint_GetByMode

Gets a list of StopPoints filtered by the modes available at that StopPoint.

tfl_gov_uk.StopPoint_GetByMode({
  "modes": []
}, context)

Input

  • input object
    • modes required array: A comma-seperated list of modes e.g. tube,dlr
    • page integer: The data set page to return. Page 1 equates to the first 1000 stop points, page 2 equates to 1001-2000 etc. Must be entered for bus mode as data set is too large.

Output

StopPoint_DisruptionByMode

Gets a distinct list of disrupted stop points for the given modes

tfl_gov_uk.StopPoint_DisruptionByMode({
  "modes": []
}, context)

Input

  • input object
    • modes required array: A comma-seperated list of modes e.g. tube,dlr
    • includeRouteBlockedStops boolean

Output

StopPoint.Search.get

Search StopPoints by their common name, or their 5-digit Countdown Bus Stop Code.

tfl_gov_uk.StopPoint.Search.get({
  "query": ""
}, context)

Input

  • input object
    • query required string: The query string, case-insensitive. Leading and trailing wildcards are applied automatically.
    • modes array: An optional, parameter separated list of the modes to filter by
    • faresOnly boolean: True to only return stations in that have Fares data available for single fares to another station.
    • maxResults integer: An optional result limit, defaulting to and with a maximum of 50. Since children of the stop point heirarchy are returned for matches,
    • lines array: An optional, parameter separated list of the lines to filter by
    • includeHubs boolean: If true, returns results including HUBs.
    • tflOperatedNationalRailStationsOnly boolean: If the national-rail mode is included, this flag will filter the national rail stations so that only those operated by TfL are returned

Output

StopPoint.Search.query.get

Search StopPoints by their common name, or their 5-digit Countdown Bus Stop Code.

tfl_gov_uk.StopPoint.Search.query.get({
  "query": ""
}, context)

Input

  • input object
    • query required string: The query string, case-insensitive. Leading and trailing wildcards are applied automatically.
    • modes array: An optional, parameter separated list of the modes to filter by
    • faresOnly boolean: True to only return stations in that have Fares data available for single fares to another station.
    • maxResults integer: An optional result limit, defaulting to and with a maximum of 50. Since children of the stop point heirarchy are returned for matches,
    • lines array: An optional, parameter separated list of the lines to filter by
    • includeHubs boolean: If true, returns results including HUBs.
    • tflOperatedNationalRailStationsOnly boolean: If the national-rail mode is included, this flag will filter the national rail stations so that only those operated by TfL are returned

Output

StopPoint_GetServiceTypes

Gets the service types for a given stoppoint

tfl_gov_uk.StopPoint_GetServiceTypes({
  "id": ""
}, context)

Input

  • input object
    • id required string: The Naptan id of the stop
    • lineIds array: The lines which contain the given Naptan id (all lines relevant to the given stoppoint if empty)
    • modes array: The modes which the lines are relevant to (all if empty)

Output

StopPoint_GetBySms

Gets a StopPoint for a given sms code.

tfl_gov_uk.StopPoint_GetBySms({
  "id": ""
}, context)

Input

  • input object
    • id required string: A 5-digit Countdown Bus Stop Code e.g. 73241, 50435, 56334.
    • output string: If set to "web", a 302 redirect to relevant website bus stop page is returned. Valid values are : web. All other values are ignored.

Output

StopPoint_GetByType

Gets all stop points of a given type

tfl_gov_uk.StopPoint_GetByType({
  "types": []
}, context)

Input

  • input object
    • types required array: A comma-separated list of the types to return. Max. approx. 12 types.

Output

StopPoint_GetByTypeWithPagination

Gets all the stop points of given type(s) with a page number

tfl_gov_uk.StopPoint_GetByTypeWithPagination({
  "types": [],
  "page": 0
}, context)

Input

  • input object
    • types required array
    • page required integer

Output

StopPoint.ids.get

Gets a list of StopPoints corresponding to the given list of stop ids.

tfl_gov_uk.StopPoint.ids.get({
  "ids": []
}, context)

Input

  • input object
    • ids required array: A comma-separated list of stop point ids (station naptan code e.g. 940GZZLUASL). Max. approx. 20 ids.
    • includeCrowdingData boolean: Include the crowding data (static). To Filter further use: /StopPoint/{ids}/Crowding/{line}

Output

StopPoint_Disruption

Gets all disruptions for the specified StopPointId, plus disruptions for any child Naptan records it may have.

tfl_gov_uk.StopPoint_Disruption({
  "ids": []
}, context)

Input

  • input object
    • ids required array: A comma-seperated list of stop point ids. Max. approx. 20 ids.
    • getFamily boolean: Specify true to return disruptions for entire family, or false to return disruptions for just this stop point. Defaults to false.
    • includeRouteBlockedStops boolean
    • flattenResponse boolean: Specify true to associate all disruptions with parent stop point. (Only applicable when getFamily is true).

Output

StopPoint_ArrivalDepartures

Gets the list of arrival and departure predictions for the given stop point id (overground and tfl rail only)

tfl_gov_uk.StopPoint_ArrivalDepartures({
  "id": "",
  "lineIds": []
}, context)

Input

  • input object
    • id required string: A StopPoint id (station naptan code e.g. 940GZZLUASL, you can use /StopPoint/Search/{query} endpoint to find a stop point id from a station name)
    • lineIds required array: A comma-separated list of line ids e.g. tfl-rail, london-overground

Output

StopPoint_Arrivals

Gets the list of arrival predictions for the given stop point id

tfl_gov_uk.StopPoint_Arrivals({
  "id": ""
}, context)

Input

  • input object
    • id required string: A StopPoint id (station naptan code e.g. 940GZZLUASL, you can use /StopPoint/Search/{query} endpoint to find a stop point id from a station name)

Output

StopPoint_ReachableFrom

Gets Stopoints that are reachable from a station/line combination.

tfl_gov_uk.StopPoint_ReachableFrom({
  "id": "",
  "lineId": ""
}, context)

Input

  • input object
    • id required string: The id (station naptan code e.g. 940GZZLUASL, you can use /StopPoint/Search/{query} endpoint to find a stop point id from a station name) of the stop point to filter by
    • lineId required string: Line id of the line to filter by (e.g. victoria)
    • serviceTypes array: A comma-separated list of service types to filter on. If not specified. Supported values: Regular, Night. Defaulted to 'Regular' if not specified

Output

StopPoint_Crowding

Gets all the Crowding data (static) for the StopPointId, plus crowding data for a given line and optionally a particular direction.

tfl_gov_uk.StopPoint_Crowding({
  "id": "",
  "line": "",
  "direction": ""
}, context)

Input

  • input object
    • id required string: The Naptan id of the stop
    • line required string: A particular line e.g. victoria, circle, northern etc.
    • direction required string (values: inbound, outbound, all): The direction of travel. Can be inbound or outbound.

Output

StopPoint_Direction

Returns the canonical direction, "inbound" or "outbound", for a given pair of stop point Ids in the direction from -> to.

tfl_gov_uk.StopPoint_Direction({
  "id": "",
  "toStopPointId": ""
}, context)

Input

  • input object
    • id required string: Originating stop id (station naptan code e.g. 940GZZLUASL, you can use /StopPoint/Search/{query} endpoint to find a stop point id from a station name)
    • toStopPointId required string: Destination stop id (station naptan code e.g. 940GZZLUASL, you can use /StopPoint/Search/{query} endpoint to find a stop point id from a station name)
    • lineId string: Optional line id filter e.g. victoria

Output

  • output string

StopPoint_Route

Returns the route sections for all the lines that service the given stop point ids

tfl_gov_uk.StopPoint_Route({
  "id": ""
}, context)

Input

  • input object
    • id required string: A stop point id (station naptan codes e.g. 940GZZLUASL, you can use /StopPoint/Search/{query} endpoint to find a stop point id from a station name)
    • serviceTypes array: A comma-separated list of service types to filter on. If not specified. Supported values: Regular, Night. Defaulted to 'Regular' if not specified

Output

StopPoint.id.placeTypes.get

Get a list of places corresponding to a given id and place types.

tfl_gov_uk.StopPoint.id.placeTypes.get({
  "id": "",
  "placeTypes": []
}, context)

Input

  • input object
    • id required string: A naptan id for a stop point (station naptan code e.g. 940GZZLUASL).
    • placeTypes required array: A comcomma-separated value representing the place types.

Output

StopPoint_GetCarParksById

Get car parks corresponding to the given stop point id.

tfl_gov_uk.StopPoint_GetCarParksById({
  "stopPointId": ""
}, context)

Input

  • input object
    • stopPointId required string: stopPointId is required to get the car parks.

Output

StopPoint_GetTaxiRanksByIds

Gets a list of taxi ranks corresponding to the given stop point id.

tfl_gov_uk.StopPoint_GetTaxiRanksByIds({
  "stopPointId": ""
}, context)

Input

  • input object
    • stopPointId required string: stopPointId is required to get the taxi ranks.

Output

TravelTime_GetCompareOverlay

Gets the TravelTime overlay.

tfl_gov_uk.TravelTime_GetCompareOverlay({
  "z": 0,
  "pinLat": 0,
  "pinLon": 0,
  "mapCenterLat": 0,
  "mapCenterLon": 0,
  "scenarioTitle": "",
  "timeOfDayId": "",
  "modeId": "",
  "width": 0,
  "height": 0,
  "direction": "",
  "travelTimeInterval": 0,
  "compareType": "",
  "compareValue": ""
}, context)

Input

  • input object
    • z required integer: The zoom level.
    • pinLat required number: The latitude of the pin.
    • pinLon required number: The longitude of the pin.
    • mapCenterLat required number: The map center latitude.
    • mapCenterLon required number: The map center longitude.
    • scenarioTitle required string: The title of the scenario.
    • timeOfDayId required string: The id for the time of day (AM/INTER/PM)
    • modeId required string: The id of the mode.
    • width required integer: The width of the requested overlay.
    • height required integer: The height of the requested overlay.
    • direction required string (values: Average, From, To): The direction of travel.
    • travelTimeInterval required integer: The total minutes between the travel time bands
    • compareType required string
    • compareValue required string

Output

TravelTime_GetOverlay

Gets the TravelTime overlay.

tfl_gov_uk.TravelTime_GetOverlay({
  "z": 0,
  "pinLat": 0,
  "pinLon": 0,
  "mapCenterLat": 0,
  "mapCenterLon": 0,
  "scenarioTitle": "",
  "timeOfDayId": "",
  "modeId": "",
  "width": 0,
  "height": 0,
  "direction": "",
  "travelTimeInterval": 0
}, context)

Input

  • input object
    • z required integer: The zoom level.
    • pinLat required number: The latitude of the pin.
    • pinLon required number: The longitude of the pin.
    • mapCenterLat required number: The map center latitude.
    • mapCenterLon required number: The map center longitude.
    • scenarioTitle required string: The title of the scenario.
    • timeOfDayId required string: The id for the time of day (AM/INTER/PM)
    • modeId required string: The id of the mode.
    • width required integer: The width of the requested overlay.
    • height required integer: The height of the requested overlay.
    • direction required string (values: Average, From, To): The direction of travel.
    • travelTimeInterval required integer: The total minutes between the travel time bands

Output

Vehicle_GetEmissionsSurchargeCompliance

Gets the Emissions Surcharge compliance for the Vehicle

tfl_gov_uk.Vehicle_GetEmissionsSurchargeCompliance({
  "vrm": ""
}, context)

Input

  • input object
    • vrm required string: The Vehicle Registration Mark

Output

Vehicle_GetUlezCompliance

Gets the Ulez Surcharge compliance for the Vehicle

tfl_gov_uk.Vehicle_GetUlezCompliance({
  "vrm": ""
}, context)

Input

  • input object
    • vrm required string: The Vehicle Registration Mark

Output

Vehicle_Get

Gets the predictions for a given list of vehicle Id's.

tfl_gov_uk.Vehicle_Get({
  "ids": []
}, context)

Input

  • input object
    • ids required array: A comma-separated list of vehicle ids e.g. LX58CFV,LX11AZB,LX58CFE. Max approx. 25 ids.

Output

Definitions

System.Data.Spatial.DbGeography

System.Data.Spatial.DbGeographyWellKnownValue

  • System.Data.Spatial.DbGeographyWellKnownValue object
    • coordinateSystemId integer
    • wellKnownBinary string
    • wellKnownText string

System.Object

  • System.Object object

Tfl.Api.Common.ApiVersionInfo

  • Tfl.Api.Common.ApiVersionInfo object
    • assemblies array
      • items string
    • label string
    • timestamp string
    • version string

Tfl.Api.Common.DateRange

  • Tfl.Api.Common.DateRange object
    • endDate string
    • startDate string

Tfl.Api.Common.DateRangeNullable

  • Tfl.Api.Common.DateRangeNullable object
    • endDate string
    • startDate string

Tfl.Api.Common.GeoPoint

  • Tfl.Api.Common.GeoPoint object
    • lat required number
    • lon required number

Tfl.Api.Common.JourneyPlanner.JpElevation

  • Tfl.Api.Common.JourneyPlanner.JpElevation object
    • distance integer
    • endLat number
    • endLon number
    • gradient number
    • heightFromPreviousPoint integer
    • startLat number
    • startLon number

Tfl.Api.Common.PlaceGeo

  • Tfl.Api.Common.PlaceGeo object
    • lat number
    • lon number
    • neLat number
    • neLon number
    • swLat number
    • swLon number

Tfl.Api.Common.PostcodeInput

  • Tfl.Api.Common.PostcodeInput object
    • postcode string

Tfl.Api.Presentation.Entities.AccidentStats.AccidentDetail

Tfl.Api.Presentation.Entities.AccidentStats.AccidentStatsOrderedSummary

  • Tfl.Api.Presentation.Entities.AccidentStats.AccidentStatsOrderedSummary object
    • accidents integer
    • borough string
    • year integer

Tfl.Api.Presentation.Entities.AccidentStats.Casualty

  • Tfl.Api.Presentation.Entities.AccidentStats.Casualty object
    • age integer
    • ageBand string
    • class string
    • mode string
    • severity string

Tfl.Api.Presentation.Entities.AccidentStats.Vehicle

  • Tfl.Api.Presentation.Entities.AccidentStats.Vehicle object
    • type string

Tfl.Api.Presentation.Entities.ActiveServiceType

  • Tfl.Api.Presentation.Entities.ActiveServiceType object
    • mode string
    • serviceType string

Tfl.Api.Presentation.Entities.AdditionalProperties

  • Tfl.Api.Presentation.Entities.AdditionalProperties object
    • category string
    • key string
    • modified string
    • sourceSystemKey string
    • value string

Tfl.Api.Presentation.Entities.ArrivalDeparture

  • Tfl.Api.Presentation.Entities.ArrivalDeparture object: DTO to capture the prediction details
    • cause string: Reason for cancellation or delay
    • departureStatus string (values: OnTime, Delayed, Cancelled, NotStoppingAtStation): Status of departure
    • destinationName string: Name of the destination
    • destinationNaptanId string: Naptan Identifier for the prediction's destination
    • estimatedTimeOfArrival string: Estimated time of arrival
    • estimatedTimeOfDeparture string: Estimated time of arrival
    • minutesAndSecondsToArrival string: Estimated time of arrival
    • minutesAndSecondsToDeparture string: Estimated time of arrival
    • naptanId string: Identifier for the prediction
    • platformName string: Platform name (for bus, this is the stop letter)
    • scheduledTimeOfArrival string: Estimated time of arrival
    • scheduledTimeOfDeparture string: Estimated time of arrival
    • stationName string: Station name
    • timing Tfl.Api.Presentation.Entities.PredictionTiming

Tfl.Api.Presentation.Entities.Bay

  • Tfl.Api.Presentation.Entities.Bay object
    • bayCount integer
    • bayType string
    • free integer
    • occupied integer

Tfl.Api.Presentation.Entities.BikePointOccupancy

  • Tfl.Api.Presentation.Entities.BikePointOccupancy object: Bike point occupancy
    • bikesCount integer: Total bike counts
    • emptyDocks integer: Empty docks
    • id string: Id of the bike point such as BikePoints_1
    • name string: Name / Common name of the bike point
    • totalDocks integer: Total docks available

Tfl.Api.Presentation.Entities.CarParkOccupancy

Tfl.Api.Presentation.Entities.ChargeConnectorOccupancy

  • Tfl.Api.Presentation.Entities.ChargeConnectorOccupancy object
    • id integer
    • sourceSystemPlaceId string
    • status string

Tfl.Api.Presentation.Entities.Coordinate

  • Tfl.Api.Presentation.Entities.Coordinate object
    • easting number
    • latitude number
    • longitude number
    • northing number
    • xCoord integer
    • yCoord integer

Tfl.Api.Presentation.Entities.Crowding

Tfl.Api.Presentation.Entities.CycleSuperhighway

  • Tfl.Api.Presentation.Entities.CycleSuperhighway object
    • geography System.Data.Spatial.DbGeography
    • id string: The Id
    • label string: The long label to show on maps when zoomed in
    • labelShort string: The short label to show on maps
    • modified string: When the data was last updated
    • routeType string (values: Unknown, All, Cycle Superhighways, Quietways, Cycleways, Mini-Hollands, Central London Grid): Type of cycle route e.g CycleSuperhighways, Quietways, MiniHollands etc
    • segmented boolean: True if the route is split into segments
    • status string (values: Unknown, All, Open, In Progress, Planned, Planned - Subject to feasibility and consultation., Not Open): Cycle route status i.e Proposed, Existing etc

Tfl.Api.Presentation.Entities.DisruptedPoint

  • Tfl.Api.Presentation.Entities.DisruptedPoint object
    • additionalInformation string
    • appearance string
    • atcoCode string
    • commonName string
    • description string
    • fromDate string
    • mode string
    • stationAtcoCode string
    • toDate string
    • type string

Tfl.Api.Presentation.Entities.Disruption

  • Tfl.Api.Presentation.Entities.Disruption object: Represents a disruption to a route within the transport network.
    • additionalInfo string: Gets or sets the additionaInfo of this disruption.
    • affectedRoutes array: Gets or sets the routes affected by this disruption
    • affectedStops array: Gets or sets the stops affected by this disruption
    • category string (values: Undefined, RealTime, PlannedWork, Information, Event, Crowding, StatusAlert): Gets or sets the category of this dispruption.
    • categoryDescription string: Gets or sets the description of the category.
    • closureText string: Text describing the closure type
    • created string: Gets or sets the date/time when this disruption was created.
    • description string: Gets or sets the description of this disruption.
    • lastUpdate string: Gets or sets the date/time when this disruption was last updated.
    • summary string: Gets or sets the summary of this disruption.
    • type string: Gets or sets the disruption type of this dispruption.

Tfl.Api.Presentation.Entities.Fares.Fare

  • Tfl.Api.Presentation.Entities.Fares.Fare object
    • cap number
    • cost string
    • description string
    • id integer
    • mode string
    • passengerType string
    • ticketTime string
    • ticketType string
    • validFrom string
    • validUntil string
    • zone string

Tfl.Api.Presentation.Entities.Fares.FareBounds

  • Tfl.Api.Presentation.Entities.Fares.FareBounds object
    • description string
    • displayName string
    • displayOrder integer
    • from string
    • id integer
    • isPopularFare boolean
    • isPopularTravelCard boolean
    • isTour boolean
    • messages array
    • operator string
    • routeCode string
    • to string
    • via string

Tfl.Api.Presentation.Entities.Fares.FareDetails

  • Tfl.Api.Presentation.Entities.Fares.FareDetails object
    • boundsId integer
    • contactlessPAYGOnlyFare boolean
    • displayName string
    • displayOrder integer
    • endDate string
    • from string
    • fromStation string
    • isTour boolean
    • messages array
    • mode string
    • operator string
    • passengerType string
    • routeCode string
    • routeDescription string
    • specialFare boolean
    • startDate string
    • throughFare boolean
    • ticketsAvailable array
    • to string
    • toStation string
    • validatorInformation string
    • via string

Tfl.Api.Presentation.Entities.Fares.FareStation

  • Tfl.Api.Presentation.Entities.Fares.FareStation object
    • atcoCode string
    • commonName string
    • fareCategory string (values: Cash, Oyster, Contactless, ContactlessOnly, All)

Tfl.Api.Presentation.Entities.Fares.FaresMode

  • Tfl.Api.Presentation.Entities.Fares.FaresMode object
    • description string
    • id integer
    • name string

Tfl.Api.Presentation.Entities.Fares.FaresPeriod

  • Tfl.Api.Presentation.Entities.Fares.FaresPeriod object
    • endDate string
    • id integer
    • isFuture boolean
    • startDate string
    • viewableDate string

Tfl.Api.Presentation.Entities.Fares.FaresSection

Tfl.Api.Presentation.Entities.Fares.Journey

Tfl.Api.Presentation.Entities.Fares.PassengerType

  • Tfl.Api.Presentation.Entities.Fares.PassengerType object
    • description string
    • displayName string
    • displayOrder integer
    • type string

Tfl.Api.Presentation.Entities.Fares.Recommendation

Tfl.Api.Presentation.Entities.Fares.RecommendationResponse

Tfl.Api.Presentation.Entities.Fares.Ticket

Tfl.Api.Presentation.Entities.Fares.TicketTime

  • Tfl.Api.Presentation.Entities.Fares.TicketTime object
    • description string
    • type string

Tfl.Api.Presentation.Entities.Fares.TicketType

  • Tfl.Api.Presentation.Entities.Fares.TicketType object
    • description string
    • type string

Tfl.Api.Presentation.Entities.GeoCodeSearchMatch

  • Tfl.Api.Presentation.Entities.GeoCodeSearchMatch object
    • address string: A string describing the formatted address of the place. Adds additional context to the place's Name.
    • id string
    • lat number
    • lon number
    • name string
    • types array: The type of the place e.g. "street_address"
      • items string
    • url string

Tfl.Api.Presentation.Entities.Identifier

  • Tfl.Api.Presentation.Entities.Identifier object
    • crowding Tfl.Api.Presentation.Entities.Crowding
    • fullName string
    • id string
    • name string
    • routeType string (values: Unknown, All, Cycle Superhighways, Quietways, Cycleways, Mini-Hollands, Central London Grid)
    • status string (values: Unknown, All, Open, In Progress, Planned, Planned - Subject to feasibility and consultation., Not Open)
    • type string
    • uri string

Tfl.Api.Presentation.Entities.Instruction

  • Tfl.Api.