tfl-ts
Version:
🚇 Fully-typed TypeScript client for Transport for London (TfL) API • Zero dependencies • Auto-generated types • Real-time arrivals • Journey planning • Universal compatibility
456 lines (455 loc) • 22.4 kB
TypeScript
export declare const STOPPOINT_DATA: {
readonly section: "StopPoint";
readonly endpoints: readonly [{
readonly path: "/StopPoint/{ids}";
readonly method: "GET";
readonly summary: "Gets a list of StopPoints corresponding to the given list of stop ids.";
readonly parameters: readonly [{
readonly name: "ids";
readonly type: "any";
readonly required: true;
readonly description: "A comma-separated list of stop point ids (station naptan code e.g. 940GZZLUASL). Max. approx. 20 ids.\r\n You can use /StopPoint/Search/{query} endpoint to find a stop point id from a station name.";
}, {
readonly name: "includeCrowdingData";
readonly type: "boolean";
readonly required: false;
readonly description: "Include the crowding data (static). To Filter further use: /StopPoint/{ids}/Crowding/{line}";
}];
readonly returnType: "StopPoint[]";
readonly deprecated: false;
readonly tags: readonly ["StopPoint"];
}, {
readonly path: "/StopPoint/{id}/placeTypes";
readonly method: "GET";
readonly summary: "Get a list of places corresponding to a given id and place types.";
readonly parameters: readonly [{
readonly name: "id";
readonly type: "string";
readonly required: true;
readonly description: "A naptan id for a stop point (station naptan code e.g. 940GZZLUASL).";
}, {
readonly name: "placeTypes";
readonly type: "any";
readonly required: true;
readonly description: "A comcomma-separated value representing the place types.";
}];
readonly returnType: "Place[]";
readonly deprecated: false;
readonly tags: readonly ["StopPoint"];
}, {
readonly path: "/StopPoint/{id}/Crowding/{line}";
readonly method: "GET";
readonly summary: "Gets all the Crowding data (static) for the StopPointId, plus crowding data for a given line and optionally a particular direction.";
readonly parameters: readonly [{
readonly name: "id";
readonly type: "string";
readonly required: true;
readonly description: "The Naptan id of the stop";
}, {
readonly name: "line";
readonly type: "string";
readonly required: true;
readonly description: "A particular line e.g. victoria, circle, northern etc.";
}, {
readonly name: "direction";
readonly type: "string";
readonly required: true;
readonly description: "The direction of travel. Can be inbound or outbound.";
}];
readonly returnType: "StopPoint[]";
readonly deprecated: false;
readonly tags: readonly ["StopPoint"];
}, {
readonly path: "/StopPoint/Type/{types}";
readonly method: "GET";
readonly summary: "Gets all stop points of a given type";
readonly parameters: readonly [{
readonly name: "types";
readonly type: "any";
readonly required: true;
readonly description: "A comma-separated list of the types to return. Max. approx. 12 types. \r\n A list of valid stop types can be obtained from the StopPoint/meta/stoptypes endpoint.";
}];
readonly returnType: "StopPoint[]";
readonly deprecated: false;
readonly tags: readonly ["StopPoint"];
}, {
readonly path: "/StopPoint/Type/{types}/page/{page}";
readonly method: "GET";
readonly summary: "Gets all the stop points of given type(s) with a page number";
readonly parameters: readonly [{
readonly name: "types";
readonly type: "any";
readonly required: true;
readonly description: "";
}, {
readonly name: "page";
readonly type: "number";
readonly required: true;
readonly description: "";
}];
readonly returnType: "StopPoint[]";
readonly deprecated: false;
readonly tags: readonly ["StopPoint"];
}, {
readonly path: "/StopPoint/ServiceTypes";
readonly method: "GET";
readonly summary: "Gets the service types for a given stoppoint";
readonly parameters: readonly [{
readonly name: "id";
readonly type: "string";
readonly required: true;
readonly description: "The Naptan id of the stop";
}, {
readonly name: "lineIds";
readonly type: "any";
readonly required: false;
readonly description: "The lines which contain the given Naptan id (all lines relevant to the given stoppoint if empty)";
}, {
readonly name: "modes";
readonly type: "any";
readonly required: false;
readonly description: "The modes which the lines are relevant to (all if empty)";
}];
readonly returnType: "LineServiceType[]";
readonly deprecated: false;
readonly tags: readonly ["StopPoint"];
}, {
readonly path: "/StopPoint/{id}/Arrivals";
readonly method: "GET";
readonly summary: "Gets the list of arrival predictions for the given stop point id";
readonly parameters: readonly [{
readonly name: "id";
readonly type: "string";
readonly required: true;
readonly description: "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)";
}];
readonly returnType: "Prediction[]";
readonly deprecated: false;
readonly tags: readonly ["StopPoint"];
}, {
readonly path: "/StopPoint/{id}/ArrivalDepartures";
readonly method: "GET";
readonly summary: "Gets the list of arrival and departure predictions for the given stop point id (overground, Elizabeth line and thameslink only)";
readonly parameters: readonly [{
readonly name: "id";
readonly type: "string";
readonly required: true;
readonly description: "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)";
}, {
readonly name: "lineIds";
readonly type: "any";
readonly required: true;
readonly description: "A comma-separated list of line ids e.g. elizabeth, london-overground, thameslink";
}];
readonly returnType: "ArrivalDeparture[]";
readonly deprecated: false;
readonly tags: readonly ["StopPoint"];
}, {
readonly path: "/StopPoint/{id}/CanReachOnLine/{lineId}";
readonly method: "GET";
readonly summary: "Gets Stopoints that are reachable from a station/line combination.";
readonly parameters: readonly [{
readonly name: "id";
readonly type: "string";
readonly required: true;
readonly description: "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";
}, {
readonly name: "lineId";
readonly type: "string";
readonly required: true;
readonly description: "Line id of the line to filter by (e.g. victoria)";
}, {
readonly name: "serviceTypes";
readonly type: "any";
readonly required: false;
readonly description: "A comma-separated list of service types to filter on. If not specified. Supported values: Regular, Night. Defaulted to 'Regular' if not specified";
}];
readonly returnType: "StopPoint[]";
readonly deprecated: false;
readonly tags: readonly ["StopPoint"];
}, {
readonly path: "/StopPoint/{id}/Route";
readonly method: "GET";
readonly summary: "Returns the route sections for all the lines that service the given stop point ids";
readonly parameters: readonly [{
readonly name: "id";
readonly type: "string";
readonly required: true;
readonly description: "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)";
}, {
readonly name: "serviceTypes";
readonly type: "any";
readonly required: false;
readonly description: "A comma-separated list of service types to filter on. If not specified. Supported values: Regular, Night. Defaulted to 'Regular' if not specified";
}];
readonly returnType: "StopPointRouteSection[]";
readonly deprecated: false;
readonly tags: readonly ["StopPoint"];
}, {
readonly path: "/StopPoint/Mode/{modes}/Disruption";
readonly method: "GET";
readonly summary: "Gets a distinct list of disrupted stop points for the given modes";
readonly parameters: readonly [{
readonly name: "modes";
readonly type: "any";
readonly required: true;
readonly description: "A comma-seperated list of modes e.g. tube,dlr";
}, {
readonly name: "includeRouteBlockedStops";
readonly type: "boolean";
readonly required: false;
readonly description: "";
}];
readonly returnType: "DisruptedPoint[]";
readonly deprecated: false;
readonly tags: readonly ["StopPoint"];
}, {
readonly path: "/StopPoint/{ids}/Disruption";
readonly method: "GET";
readonly summary: "Gets all disruptions for the specified StopPointId, plus disruptions for any child Naptan records it may have.";
readonly parameters: readonly [{
readonly name: "ids";
readonly type: "any";
readonly required: true;
readonly description: "A comma-seperated list of stop point ids. Max. approx. 20 ids.\r\n You can use /StopPoint/Search/{query} endpoint to find a stop point id from a station name.";
}, {
readonly name: "getFamily";
readonly type: "boolean";
readonly required: false;
readonly description: "Specify true to return disruptions for entire family, or false to return disruptions for just this stop point. Defaults to false.";
}, {
readonly name: "includeRouteBlockedStops";
readonly type: "boolean";
readonly required: false;
readonly description: "";
}, {
readonly name: "flattenResponse";
readonly type: "boolean";
readonly required: false;
readonly description: "Specify true to associate all disruptions with parent stop point. (Only applicable when getFamily is true).";
}];
readonly returnType: "DisruptedPoint[]";
readonly deprecated: false;
readonly tags: readonly ["StopPoint"];
}, {
readonly path: "/StopPoint/{id}/DirectionTo/{toStopPointId}";
readonly method: "GET";
readonly summary: "Returns the canonical direction, \"inbound\" or \"outbound\", for a given pair of stop point Ids in the direction from -> to.";
readonly parameters: readonly [{
readonly name: "id";
readonly type: "string";
readonly required: true;
readonly description: "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)";
}, {
readonly name: "toStopPointId";
readonly type: "string";
readonly required: true;
readonly description: "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)";
}, {
readonly name: "lineId";
readonly type: "string";
readonly required: false;
readonly description: "Optional line id filter e.g. victoria";
}];
readonly returnType: "string";
readonly deprecated: false;
readonly tags: readonly ["StopPoint"];
}, {
readonly path: "/StopPoint";
readonly method: "GET";
readonly summary: "Gets a list of StopPoints within {radius} by the specified criteria";
readonly parameters: readonly [{
readonly name: "stopTypes";
readonly type: "any";
readonly required: true;
readonly description: "a list of stopTypes that should be returned (a list of valid stop types can be obtained from the StopPoint/meta/stoptypes endpoint)";
}, {
readonly name: "radius";
readonly type: "number";
readonly required: false;
readonly description: "the radius of the bounding circle in metres (default : 200)";
}, {
readonly name: "useStopPointHierarchy";
readonly type: "boolean";
readonly required: false;
readonly description: "Re-arrange the output into a parent/child hierarchy";
}, {
readonly name: "modes";
readonly type: "any";
readonly required: false;
readonly description: "the list of modes to search (comma separated mode names e.g. tube,dlr)";
}, {
readonly name: "categories";
readonly type: "any";
readonly required: false;
readonly description: "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)";
}, {
readonly name: "returnLines";
readonly type: "boolean";
readonly required: false;
readonly description: "true to return the lines that each stop point serves as a nested resource";
}, {
readonly name: "location.lat";
readonly type: "number";
readonly required: true;
}, {
readonly name: "location.lon";
readonly type: "number";
readonly required: true;
}];
readonly returnType: "StopPointsResponse";
readonly deprecated: false;
readonly tags: readonly ["StopPoint"];
}, {
readonly path: "/StopPoint/Mode/{modes}";
readonly method: "GET";
readonly summary: "Gets a list of StopPoints filtered by the modes available at that StopPoint.";
readonly parameters: readonly [{
readonly name: "modes";
readonly type: "any";
readonly required: true;
readonly description: "A comma-seperated list of modes e.g. tube,dlr";
}, {
readonly name: "page";
readonly type: "number";
readonly required: false;
readonly description: "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.";
}];
readonly returnType: "StopPointsResponse";
readonly deprecated: false;
readonly tags: readonly ["StopPoint"];
}, {
readonly path: "/StopPoint/Search/{query}";
readonly method: "GET";
readonly summary: "Search StopPoints by their common name, or their 5-digit Countdown Bus Stop Code.";
readonly parameters: readonly [{
readonly name: "query";
readonly type: "string";
readonly required: true;
readonly description: "The query string, case-insensitive. Leading and trailing wildcards are applied automatically.";
}, {
readonly name: "modes";
readonly type: "any";
readonly required: false;
readonly description: "An optional, parameter separated list of the modes to filter by";
}, {
readonly name: "faresOnly";
readonly type: "boolean";
readonly required: false;
readonly description: "True to only return stations in that have Fares data available for single fares to another station.";
}, {
readonly name: "maxResults";
readonly type: "number";
readonly required: false;
readonly description: "An optional result limit, defaulting to and with a maximum of 50. Since children of the stop point heirarchy are returned for matches,\r\n it is possible that the flattened result set will contain more than 50 items.";
}, {
readonly name: "lines";
readonly type: "any";
readonly required: false;
readonly description: "An optional, parameter separated list of the lines to filter by";
}, {
readonly name: "includeHubs";
readonly type: "boolean";
readonly required: false;
readonly description: "If true, returns results including HUBs.";
}, {
readonly name: "tflOperatedNationalRailStationsOnly";
readonly type: "boolean";
readonly required: false;
readonly description: "If the national-rail mode is included, this flag will filter the national rail stations so that only those operated by TfL are returned";
}];
readonly returnType: "SearchResponse";
readonly deprecated: false;
readonly tags: readonly ["StopPoint"];
}, {
readonly path: "/StopPoint/Search";
readonly method: "GET";
readonly summary: "Search StopPoints by their common name, or their 5-digit Countdown Bus Stop Code.";
readonly parameters: readonly [{
readonly name: "query";
readonly type: "string";
readonly required: true;
readonly description: "The query string, case-insensitive. Leading and trailing wildcards are applied automatically.";
}, {
readonly name: "modes";
readonly type: "any";
readonly required: false;
readonly description: "An optional, parameter separated list of the modes to filter by";
}, {
readonly name: "faresOnly";
readonly type: "boolean";
readonly required: false;
readonly description: "True to only return stations in that have Fares data available for single fares to another station.";
}, {
readonly name: "maxResults";
readonly type: "number";
readonly required: false;
readonly description: "An optional result limit, defaulting to and with a maximum of 50. Since children of the stop point heirarchy are returned for matches,\r\n it is possible that the flattened result set will contain more than 50 items.";
}, {
readonly name: "lines";
readonly type: "any";
readonly required: false;
readonly description: "An optional, parameter separated list of the lines to filter by";
}, {
readonly name: "includeHubs";
readonly type: "boolean";
readonly required: false;
readonly description: "If true, returns results including HUBs.";
}, {
readonly name: "tflOperatedNationalRailStationsOnly";
readonly type: "boolean";
readonly required: false;
readonly description: "If the national-rail mode is included, this flag will filter the national rail stations so that only those operated by TfL are returned";
}];
readonly returnType: "SearchResponse";
readonly deprecated: false;
readonly tags: readonly ["StopPoint"];
}, {
readonly path: "/StopPoint/Sms/{id}";
readonly method: "GET";
readonly summary: "Gets a StopPoint for a given sms code.";
readonly parameters: readonly [{
readonly name: "id";
readonly type: "string";
readonly required: true;
readonly description: "A 5-digit Countdown Bus Stop Code e.g. 73241, 50435, 56334.";
}, {
readonly name: "output";
readonly type: "string";
readonly required: false;
readonly description: "If set to \"web\", a 302 redirect to relevant website bus stop page is returned. Valid values are : web. All other values are ignored.";
}];
readonly returnType: "Object";
readonly deprecated: false;
readonly tags: readonly ["StopPoint"];
}, {
readonly path: "/StopPoint/{stopPointId}/TaxiRanks";
readonly method: "GET";
readonly summary: "Gets a list of taxi ranks corresponding to the given stop point id.";
readonly parameters: readonly [{
readonly name: "stopPointId";
readonly type: "string";
readonly required: true;
readonly description: "stopPointId is required to get the taxi ranks.";
}];
readonly returnType: "Place[]";
readonly deprecated: false;
readonly tags: readonly ["StopPoint"];
}, {
readonly path: "/StopPoint/{stopPointId}/CarParks";
readonly method: "GET";
readonly summary: "Get car parks corresponding to the given stop point id.";
readonly parameters: readonly [{
readonly name: "stopPointId";
readonly type: "string";
readonly required: true;
readonly description: "stopPointId is required to get the car parks.";
}];
readonly returnType: "Place[]";
readonly deprecated: false;
readonly tags: readonly ["StopPoint"];
}];
readonly totalEndpoints: 20;
readonly generatedAt: "2025-07-10T01:28:59.106Z";
};
export type STOPPOINT_DATAType = typeof STOPPOINT_DATA;