NextBus XML Data Feed

From Robertjd

Jump to: navigation, search

Instructions from

SF muni has released instructions on how to use the NextBus XML feed. Their instructions are more complete than mine:

This information is within the context of the San Francisco Municipal Railway feed.

URL format

The base URL is:

Possible parameters:


(required) possible values:

  • vehicleLocations
Get a list of vehicle locations. Requires
  • routeConfig
returns stop locations, direction definitions, and route paths
  • predictionsForMultiStops
used to ask for arrival predictions for a stop. stops must be specified with the stops parameter

(required) The agency name of the transit agency. In the case of SF, this is sf-muni


"last time", not sure what this is but I always set it to 0


the route tag of the specific route you want to inquire about


Used to request one or more stops. the format is an array like so:


dirtag can be empty to get all directions for a given route at a given stop. For example:


will give you all directions of the 38 bus for those two stops. Also note that trying to limit by dirtag doesnt always seem to actually work.

Personal tools