OneBusAway · Example Payload

Getarrivalsanddeparturesforlocation

Returns real-time arrival and departure data for stops within a bounding box or radius centered on a specific location.

default

Getarrivalsanddeparturesforlocation is an example object payload from OneBusAway, with 7 top-level fields. It illustrates the shape of data this provider's APIs accept or return.

Top-level fields

operationIdmethodpathsummarydescriptiontagsparameters

Example Payload

Raw ↑
{
  "operationId": "getArrivalsAndDeparturesForLocation",
  "method": "GET",
  "path": "/api/where/arrivals-and-departures-for-location.json",
  "summary": "arrivals-and-departures-for-location",
  "description": "Returns real-time arrival and departure data for stops within a bounding box or radius centered on a specific location.",
  "tags": [
    "default"
  ],
  "parameters": [
    {
      "name": "lat",
      "in": "query",
      "required": true,
      "description": "The latitude coordinate of the search center.",
      "schema": {
        "type": "number",
        "format": "double"
      }
    },
    {
      "name": "lon",
      "in": "query",
      "required": true,
      "description": "The longitude coordinate of the search center.",
      "schema": {
        "type": "number",
        "format": "double"
      }
    },
    {
      "name": "radius",
      "in": "query",
      "required": false,
      "description": "The search radius in meters.",
      "schema": {
        "type": "number",
        "format": "double"
      }
    },
    {
      "name": "latSpan",
      "in": "query",
      "required": false,
      "description": "Sets the latitude limits of the search bounding box.",
      "schema": {
        "type": "number",
        "format": "double"
      }
    },
    {
      "name": "lonSpan",
      "in": "query",
      "required": false,
      "description": "Sets the longitude limits of the search bounding box.",
      "schema": {
        "type": "number",
        "format": "double"
      }
    },
    {
      "name": "time",
      "in": "query",
      "required": false,
      "description": "By default, returns the status right now. Can be queried at a specific time (milliseconds since epoch) for testing.",
      "schema": {
        "type": "integer",
        "format": "int64"
      }
    },
    {
      "name": "minutesBefore",
      "in": "query",
      "required": false,
      "description": "Include arrivals and departures this many minutes before the query time.",
      "schema": {
        "type": "integer",
        "default": 5
      }
    },
    {
      "name": "minutesAfter",
      "in": "query",
      "required": false,
      "description": "Include arrivals and departures this many minutes after the query time.",
      "schema": {
        "type": "integer",
        "default": 35
      }
    },
    {
      "name": "maxCount",
      "in": "query",
      "required": false,
      "description": "The max size of the list of nearby stops and arrivals to return. Defaults to 250, max 1000.",
      "schema": {
        "type": "integer",
        "default": 250,
        "maximum": 1000
      }
    },
    {
      "name": "routeType",
      "in": "query",
      "required": false,
      "description": "Optional list of GTFS routeTypes to filter by (comma delimited) e.g. \"1,2,3\".",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "emptyReturnsNotFound",
      "in": "query",
      "required": false,
      "description": "If true, returns a 404 Not Found error instead of an empty result.",
      "schema": {
        "type": "boolean"
      }
    }
  ]
}