Daily API call limit is the sum of all calls everywhere or is it per device?

27 views
Skip to first unread message

Ken Yee

unread,
Jul 21, 2016, 6:04:08 PM7/21/16
to MBTA Developers
The Realtime V2 API has a 10K daily call limit, but this appears to be global?
I had a bug where I was trying to periodically get the trip data for a stop every 5min in the app, but forgot to disable this if the app was in the background :-P

Anyways, blew out my 10K limit for today...emailed the developer@mbta email but no one has responded yet (no one has ever responded to any of my emails there so I wonder if it just goes to /dev/null :-)

Does anyone have a better way to get trip predictions for a bunch of stops?
There seems to be only one API for it..predictionsbystop and you have to ask for info for each stop you're interested in :-(

Developer at MBTA

unread,
Jul 21, 2016, 6:09:19 PM7/21/16
to MBTA Developers
Sorry for the slow reply by email! In answer to your question, predictionsbystop is the best call to use, but remember that you can query for a parent stop instead of each child stop individually. 

Sincerely,
developer@mbta

Ken Yee

unread,
Jul 21, 2016, 6:23:17 PM7/21/16
to MBTA Developers
Thanks for resetting my API counter too :-)

Didn't think of asking the parent for all trips.  It still would have been nice to ask for predictionsbystops though.  Sometimes you want to know what's around you that you can catch and there are a lot of bus stops which means a bunch of queries.

So is this daily API limit per device or per app?  If it's per app and your app is popular, you'll blow through the limit pretty quickly :-(

K Adam White

unread,
Jul 21, 2016, 6:38:19 PM7/21/16
to massdotd...@googlegroups.com
It doesn't solve the problem but option is to stand up a proxy server between your app and the API, that could cache the response for any given stop for 15-30seconds--that way if four people request the same stop at the same time, you only incur one MBTA API request and that request fulfills all four clients. It means server infrastructure where you might not have needed it previously, but I've found this approach scales decently well. 

K. Adam
--
You received this message because you are subscribed to the Google Groups "MBTA Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to massdotdevelop...@googlegroups.com.
To post to this group, send email to massdotd...@googlegroups.com.
Visit this group at https://groups.google.com/group/massdotdevelopers.
For more options, visit https://groups.google.com/d/optout.

Ken Yee

unread,
Jul 22, 2016, 10:47:16 AM7/22/16
to MBTA Developers
Yep, I've thought about that too and had planned it initially, but I thought the API was per device/IP so it wouldn't be needed...exactly what I was hoping to avoid for a V1 of the app :-(
The info on the web site is unclear about this and it really needs to be clarified...

 ken

Developer at MBTA

unread,
Jul 22, 2016, 1:32:16 PM7/22/16
to MBTA Developers
It's per app. But we're happy to increase the API limit if requested. 

Sincerely,
developer@mbta
Reply all
Reply to author
Forward
0 new messages