Public Transit API Developer's Guide

Constructing a Request

A typical request to the Public Transit API includes the basic elements shown in the following table and, in addition, it may contain resource-specific query parameters or data.

Table 1. Basic Request Elements
Element Value/Example Description
Base URL Production environment
Path /v3 Common path for all resources
Resource route, mroute, sectionupdate Transit Routing
branding/logos Logo Brands
board Next Nearby Departures
multiboard/by_geocoord, multiboard/by_stn_ids All Next Departures
stations/by_geocoord, stations/by_name, stations/by_ids Station Search
coverage/city, coverage/nearby, coverage/search Coverage Service
isochrone Transit Isoline
lines/by_stn_id Line Info
alerts/nearby Transit Alerts
Format Supported formats:
  • json
  • xml
If not specified in the request, the default response format is XML.
Application ID &app_id={YOUR_APP_ID} Substitute your own unique app_id
Application Code &app_code={YOUR_APP_CODE} Substitute your own unique app_code

Here is an example of a Station Search request, which uses the HTTP GET method:
&name="New York