APIful Blog We're obsessed with Web APIs


Summarizing requests

Apr 27, 2017 •

A few programmers will dispute the usefulness in looking at code examples when learning about a Web API (such as the Instagram API), or even reminding themselves on the usage of an API. GitHub has a ton of usage examples, but they are dispersed in many different files in many different repositories. For example, there are over 1300 code usages in JavaScript code using JQuery to call the Instagram API alone on GitHub. 1300 are too many for a human to make sense of! What if there is a way to get a summary of these usages? Here in API Harmony we have a alpha feature that does just that.

The above is a summary of the query parameter usage on the Instagram /locations/search endpoint. It turns out that there are three main types of usages on this endpoint: usages that specify the search location via the lng and the lat query parameters, usage that specify the location via the foursquare_v2_id parameter, and usages that don’t use these query parameters. The pie chart summarizes this information nicely.

The bullet list expands on the information from the pie chart. Of the 13 requests containing lng and lat, 3 usages contain an additional parameter distance. Of the 5 usages containing the query parameter foursquare_v2_id, there’s one usage that contains the additional parameter callback. You can see we’ve picked an example from GitHub that is a representative example.

What challenges do you have in using an web API? We would love to hear especially those challenges where there is a technological gap, where you can’t resolve using current practices like searching on Stack Overflow or GitHub! May be we can help bridging the gap one day!

Share via a Tweet or follow us for everything APIs!