Skip to content

Mapbox API Limits #4

@brandonfancher

Description

@brandonfancher

Mapbox is turning off their deprecated Distance API on January 15, 2018. To ensure the application continues working, we must use their Matrix API instead. We have switched to this in PR #3.

This may prove problematic. The Matrix API's free tier includes 50,000 API calls per month. Each nearest-station query uses up 16 of these calls. (It was 16 x 16 before I optimized it to include the user's location as the only source!) Still, this allows for only around 104 nearest-station queries per day, across all our users. This will likely not be enough.

Additional API calls cost $0.50 per 1,000. That could add up quickly. I don't currently have a payment method on file with Mapbox, so when we near our limit, we'll get a warning. When we exceed it, we'll get a 10-day grace period before they shut us off.

As for alternatives, the Google Distance Matrix API has a monthly free-tier cap of 75,000 API calls. That's a modest increase, but it's not a viable solution at all; their T&C forbid it being used when displaying another map provider's map.

So, we may need to entertain various options, including, but not limited to:

  • Programmatically find the 3 or 4 nearest stations as-the-crow-flies, and only include those in our Mapbox Distance Matrix API request. (This is probably the best option.)
  • Find another distance matrix API
  • Pay for any additional overage out-of-pocket
  • If overage is modest, collect donations?
  • Charge for the application?
  • Reach out to developers in the community that might want to help? For example, we could link to their apps from ours (I'm thinking maybe apps that are providing ticketing services?)

We may have to get creative.

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions