In the last post, I ended by saying that developer time is valuable and to be selective about which APIs to work with. This post is going to talk about how to choose an API.
Why are you using the API?
If you’re building something for educational purposes or for fun, then the last two questions matter less. The questions are more geared towards people who want to build something that will be a good business or a feature that you want the company to add to their app.
What would be fun to work on?
If I’m into restaurants, Yelp and Foursquare easily come to mind.
Does the API solve your problem?
API limit what functionality they provide, called endpoints. Let’s say that I want to look at photos for restaurants. Do the Yelp and Foursquare APIs give me photos? They both do.
If I was looking for check-in information, Foursquare would have the edge because they were built on the check-in functionality.
What are the rules around API usage?
In their documentation, API typically have rules around how they can be used.
Foursquare’s rules are pretty open and clear on exceptions. I’m not sure if I would be “recreat[ing] the functionality of Yelp’s own website or mobile apps,” with the photo idea, which they say not to do.
Both APIs require attribution.
Foursquare only allows 4 pictures or tips to be shown from any one business.
With Yelp’s API, no data can be stored, while Foursquare requires that you refresh the data.
How easy is it to use? How well is it documented?
Good documentation is super helpful when you’re first starting out. I like that Yelp shows an example of their business response. Clarity around rules is also a must because it reduces hesitation over ambiguity.
How does the company treat it’s developers?
Do they communicate changes early in advance? Who owns the app that you make?
Foursquare seems to remove functionality and gives a few months for developers to adjust.
What is the longevity of the platform?
Deprecation of API features does make you wonder what they will remove next. How long do you think you can continue to use the API? How long before something else comes along that’s more popular?
In my hypothetical example, I have seen that Yelp has better search results though. In the end, I would choose Foursquare because it seems like you are free to do more with it.