Is JSONP affected by the 10-second rate limit?

58 views
Skip to first unread message

Paul Swartz

unread,
Aug 19, 2014, 9:38:13 PM8/19/14
to massdotd...@googlegroups.com
Ideally, I'd like to build a frontend-only app which talks to the MBTA API via JSONP.  While I can make the individual clients not poll more than once every 10 seconds, I can't globally prevent all the clients with my API key from polling together more frequently.

Is that going to run afoul of my API agreement?

-p

Developer at MBTA

unread,
Aug 20, 2014, 11:50:43 AM8/20/14
to massdotd...@googlegroups.com
Paul, thanks for asking. No, that would not run afoul of the API agreement. The approach you're describing is one of the ways we intend the API to be used. What would violate the agreement is if one individual client was running the same query over and over again every five seconds. 

Sincerely,
developer at MBTA

Paul Swartz

unread,
Aug 23, 2014, 12:03:14 PM8/23/14
to massdotd...@googlegroups.com
Another related question: if I'm asking for predictions for multiple stops, do I need to have the client make no more than 1 API request every 10 seconds across all the stops, or just every 10 seconds per stop I'm querying?

thanks,
-p

Developer at MBTA

unread,
Aug 25, 2014, 11:48:33 AM8/25/14
to massdotd...@googlegroups.com
Paul, thanks for asking. The policy states that you may not run the same query from the same source more often than once every 10 seconds. So having the same client rapidly run several queries for several different stops is fine. (Of course, if you're doing something like retrieving predictions for all stops along a route, you're better off using the predictionsbyroute call.)

Sincerely,
developer at MBTA
Reply all
Reply to author
Forward
0 new messages