IndexAPI Resource

GET /otp/routers/{routerId}/index/clusters

Return all clusters of stops. A cluster is not the same thing as a GTFS parent station. Clusters are an unsupported experimental feature that was added to assist in "profile routing". As such the stop clustering method probably only works right with one or two GTFS data sets in the world.

Request Parameters
name type description constraints
detail query Choose short or long form of results. boolean
refs query Include GTFS entities referenced by ID in the result. boolean
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/clusters
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /otp/routers/{routerId}/index/feeds

Request Parameters
name type description constraints
detail query Choose short or long form of results. boolean
refs query Include GTFS entities referenced by ID in the result. boolean
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/feeds
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /otp/routers/{routerId}/index/flexAreas

Return all GTFS-Flex area IDs. Areas are defined in GTFS-Flex to be a lat/lon polygon in which certain kinds of flex service take place (deviated-route and call-and-ride).

Request Parameters
name type description constraints
detail query Choose short or long form of results. boolean
refs query Include GTFS entities referenced by ID in the result. boolean
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/flexAreas
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

POST /otp/routers/{routerId}/index/graphql

Request Parameters
name type description constraints
detail query Choose short or long form of results. boolean
refs query Include GTFS entities referenced by ID in the result. boolean
Request Body
media type data type
application/json map of object (JSON)
Response Body
media type data type description
application/json object (JSON)

Example

Request
POST /routers/{routerId}/index/graphql
Content-Type: application/json
Accept: application/json

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
...
                
              

POST /otp/routers/{routerId}/index/graphql

Request Parameters
name type description constraints
detail query Choose short or long form of results. boolean
refs query Include GTFS entities referenced by ID in the result. boolean
Request Body
media type data type
application/graphql (custom)
Response Body
media type data type description
application/json object (JSON)

Example

Request
POST /routers/{routerId}/index/graphql
Content-Type: application/graphql
Accept: application/json

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
...
                
              

GET /otp/routers/{routerId}/index/patterns

Request Parameters
name type description constraints
detail query Choose short or long form of results. boolean
refs query Include GTFS entities referenced by ID in the result. boolean
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/patterns
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /otp/routers/{routerId}/index/routes

Return a list of all routes in the graph.

Request Parameters
name type description constraints multivalued
detail query Choose short or long form of results. boolean no
hasStop query   yes
refs query Include GTFS entities referenced by ID in the result. boolean no
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/routes
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /otp/routers/{routerId}/index/services

List basic information about all service IDs. This is a placeholder endpoint and is not implemented yet.

Request Parameters
name type description constraints
detail query Choose short or long form of results. boolean
refs query Include GTFS entities referenced by ID in the result. boolean
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/services
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /otp/routers/{routerId}/index/stops

Return a list of all stops within a circle around the given coordinate.

Request Parameters
name type description constraints
detail query Choose short or long form of results. boolean
lat query double
lon query double
maxLat query double
maxLon query double
minLat query double
minLon query double
radius query double
refs query Include GTFS entities referenced by ID in the result. boolean
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/stops
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /otp/routers/{routerId}/index/agencies/{feedId}

Return a list of all agencies in the graph.

Request Parameters
name type description constraints
feedId path  
detail query Choose short or long form of results. boolean
refs query Include GTFS entities referenced by ID in the result. boolean
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/agencies/{feedId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /otp/routers/{routerId}/index/clusters/{clusterId}

Return a cluster of stops by its ID. A cluster is not the same thing as a GTFS parent station. Clusters are an unsupported experimental feature that was added to assist in "profile routing". As such the stop clustering method probably only works right with one or two GTFS data sets in the world.

Request Parameters
name type description constraints
clusterId path  
detail query Choose short or long form of results. boolean
refs query Include GTFS entities referenced by ID in the result. boolean
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/clusters/{clusterId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /otp/routers/{routerId}/index/feeds/{feedId}

Request Parameters
name type description constraints
feedId path  
detail query Choose short or long form of results. boolean
refs query Include GTFS entities referenced by ID in the result. boolean
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/feeds/{feedId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /otp/routers/{routerId}/index/flexAreas/{id}

Return a specific GTFS-Flex area given an ID in Agency:ID format.

Request Parameters
name type description constraints
id path  
detail query Choose short or long form of results. boolean
refs query Include GTFS entities referenced by ID in the result. boolean
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/flexAreas/{id}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /otp/routers/{routerId}/index/patterns/{patternId}

Request Parameters
name type description constraints
patternId path  
detail query Choose short or long form of results. boolean
refs query Include GTFS entities referenced by ID in the result. boolean
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/patterns/{patternId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /otp/routers/{routerId}/index/routes/{routeId}

Return specific route in the graph, for the given ID.

Request Parameters
name type description constraints
routeId path  
detail query Choose short or long form of results. boolean
refs query Include GTFS entities referenced by ID in the result. boolean
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/routes/{routeId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /otp/routers/{routerId}/index/services/{serviceId}

List details about a specific service ID including which dates it runs on. Replaces the old /calendar. This is a placeholder endpoint and is not implemented yet.

Request Parameters
name type description constraints
serviceId path  
detail query Choose short or long form of results. boolean
refs query Include GTFS entities referenced by ID in the result. boolean
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/services/{serviceId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /otp/routers/{routerId}/index/stops/{stopId}

Return specific transit stop in the graph, by ID.

Request Parameters
name type description constraints
stopId path  
detail query Choose short or long form of results. boolean
refs query Include GTFS entities referenced by ID in the result. boolean
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/stops/{stopId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /otp/routers/{routerId}/index/trips/{tripId}

Request Parameters
name type description constraints
tripId path  
detail query Choose short or long form of results. boolean
refs query Include GTFS entities referenced by ID in the result. boolean
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/trips/{tripId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /otp/routers/{routerId}/index/agencies/{feedId}/{agencyId}

Return specific agency in the graph, by ID.

Request Parameters
name type description constraints
agencyId path  
feedId path  
detail query Choose short or long form of results. boolean
refs query Include GTFS entities referenced by ID in the result. boolean
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/agencies/{feedId}/{agencyId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /otp/routers/{routerId}/index/patterns/{patternId}/geometry

Return geometry for the pattern as a packed coordinate sequence

Request Parameters
name type description constraints
patternId path  
detail query Choose short or long form of results. boolean
refs query Include GTFS entities referenced by ID in the result. boolean
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/patterns/{patternId}/geometry
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /otp/routers/{routerId}/index/patterns/{patternId}/semanticHash

Request Parameters
name type description constraints
patternId path  
detail query Choose short or long form of results. boolean
refs query Include GTFS entities referenced by ID in the result. boolean
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/patterns/{patternId}/semanticHash
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /otp/routers/{routerId}/index/patterns/{patternId}/stops

Request Parameters
name type description constraints
patternId path  
detail query Choose short or long form of results. boolean
refs query Include GTFS entities referenced by ID in the result. boolean
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/patterns/{patternId}/stops
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /otp/routers/{routerId}/index/patterns/{patternId}/trips

Request Parameters
name type description constraints
patternId path  
detail query Choose short or long form of results. boolean
refs query Include GTFS entities referenced by ID in the result. boolean
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/patterns/{patternId}/trips
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /otp/routers/{routerId}/index/routes/{routeId}/patterns

Return all stop patterns used by trips on the given route.

Request Parameters
name type description constraints
routeId path  
detail query Choose short or long form of results. boolean
refs query Include GTFS entities referenced by ID in the result. boolean
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/routes/{routeId}/patterns
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /otp/routers/{routerId}/index/routes/{routeId}/stops

Return all stops in any pattern on a given route.

Request Parameters
name type description constraints
routeId path  
detail query Choose short or long form of results. boolean
refs query Include GTFS entities referenced by ID in the result. boolean
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/routes/{routeId}/stops
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /otp/routers/{routerId}/index/routes/{routeId}/trips

Return all trips in any pattern on the given route.

Request Parameters
name type description constraints
routeId path  
detail query Choose short or long form of results. boolean
refs query Include GTFS entities referenced by ID in the result. boolean
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/routes/{routeId}/trips
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /otp/routers/{routerId}/index/stops/{stopId}/patterns

Request Parameters
name type description constraints
stopId path  
detail query Choose short or long form of results. boolean
refs query Include GTFS entities referenced by ID in the result. boolean
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/stops/{stopId}/patterns
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /otp/routers/{routerId}/index/stops/{stopId}/routes

Request Parameters
name type description constraints
stopId path  
detail query Choose short or long form of results. boolean
refs query Include GTFS entities referenced by ID in the result. boolean
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/stops/{stopId}/routes
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /otp/routers/{routerId}/index/stops/{stopId}/stoptimes

Return upcoming vehicle arrival/departure times at the given stop.

Request Parameters
name type description default constraints
stopId path Stop ID in Agency:Stop ID format    
detail query Choose short or long form of results.   boolean
numberOfDepartures query Number of departures to fetch per pattern 2 int
omitNonPickups query   boolean
refs query Include GTFS entities referenced by ID in the result.   boolean
startTime query Start time for the search. Seconds from UNIX epoch   long
timeRange query Searches forward for timeRange seconds from startTime 86400 int
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/stops/{stopId}/stoptimes
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /otp/routers/{routerId}/index/stops/{stopId}/transfers

Return the generated transfers a stop in the graph, by stop ID

Request Parameters
name type description constraints
stopId path  
detail query Choose short or long form of results. boolean
refs query Include GTFS entities referenced by ID in the result. boolean
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/stops/{stopId}/transfers
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /otp/routers/{routerId}/index/trips/{tripId}/geometry

Return geometry for the trip as a packed coordinate sequence

Request Parameters
name type description constraints
tripId path  
detail query Choose short or long form of results. boolean
refs query Include GTFS entities referenced by ID in the result. boolean
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/trips/{tripId}/geometry
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /otp/routers/{routerId}/index/trips/{tripId}/semanticHash

Request Parameters
name type description constraints
tripId path  
detail query Choose short or long form of results. boolean
refs query Include GTFS entities referenced by ID in the result. boolean
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/trips/{tripId}/semanticHash
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /otp/routers/{routerId}/index/trips/{tripId}/stops

Request Parameters
name type description constraints
tripId path  
detail query Choose short or long form of results. boolean
refs query Include GTFS entities referenced by ID in the result. boolean
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/trips/{tripId}/stops
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /otp/routers/{routerId}/index/trips/{tripId}/stoptimes

Request Parameters
name type description constraints
tripId path  
detail query Choose short or long form of results. boolean
refs query Include GTFS entities referenced by ID in the result. boolean
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/trips/{tripId}/stoptimes
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /otp/routers/{routerId}/index/agencies/{feedId}/{agencyId}/routes

Return all routes for the specific agency.

Request Parameters
name type description constraints
agencyId path  
feedId path  
detail query Choose short or long form of results. boolean
refs query Include GTFS entities referenced by ID in the result. boolean
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/agencies/{feedId}/{agencyId}/routes
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /otp/routers/{routerId}/index/stops/{stopId}/stoptimes/{date}

Return upcoming vehicle arrival/departure times at the given stop.

Request Parameters
name type description constraints
date path in YYYYMMDD format  
stopId path  
detail query Choose short or long form of results. boolean
omitNonPickups query boolean
refs query Include GTFS entities referenced by ID in the result. boolean
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /routers/{routerId}/index/stops/{stopId}/stoptimes/{date}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...