All calls to OBA require a key, you can just use TEST to start with.
/api/where/trips-for-location.json?key=TEST&lat=47.653&lon=-122.307&latSpan=0.008&lonSpan=0.008
Example:
http://api.tampa.onebusaway.org/api/where/trips-for-location.json?key=TEST&lat=27.9681&lon=-82.4764&latSpan=0.08&lonSpan=0.08
Params
lat,lon- Your locationlatSpan,lonSpan(bounding box around your location provided above)
The response has a list of the nearby trips accessible as data.list. The ID for these trips are named tripId.
/api/where/trip-details/<trip_id>.json?key=TEST
Example:
http://api.tampa.onebusaway.org/api/where/trip-details/Hillsborough%20Area%20Regional%20Transit_102717.json?key=TEST
Get a list of arrival times from the response:
data.entry.schedule.stopTimesNOTE: The arrival times listed are just the seconds after the serviceDate (which is listed in milliseconds). So to compute the actual arrival time in milliseconds, do ((serviceDate / 1000) + arrivalTime) * 1000.
Info for agencies is included in most responses from OBA as a list in responses at data.references.agencies.
You can also call:
/api/where/agency/<agency-id>.json?key=TEST
Example:
http://api.tampa.onebusaway.org/api/where/agency/Hillsborough%20Area%20Regional%20Transit.json?key=TEST
Get nearby routes:
/api/where/routes-for-location.json?key=TEST&lat=27.9681&lon=-82.4764&latSpan=0.08&lonSpan=0.08
Example:
http://api.tampa.onebusaway.org/api/where/routes-for-location.json?key=TEST&lat=27.9681&lon=-82.4764&latSpan=0.08&lonSpan=0.08
Get the route data from a response at data.list.
/api/where/arrivals-and-departures-for-stop/<stop-id>.json?key=TEST
Get the predicted (based on real-time data not scheduled data) at data.entry.arrivalsAndDepartures[i].predictedArrivalTime.
Example:
http://api.tampa.onebusaway.org/api/where/arrivals-and-departures-for-stop/Hillsborough%20Area%20Regional%20Transit_6891.json?key=TEST