Using the APIs really aren't as hard to use as it might seem. Here's how to make use of APIs to do things like gathering data with little or no advanced programming.
Step 1: Constructing the URL
The first part of incorporating APIs is understand the URL the API is contained in. Each API is slightly different, so review the supplied documentation for the API you’re interested in. Most of the time, the documentation will include examples that can be tweaked to get the desired output.
Here is an example URL the contains an API call.
https://www.ironpaper.com/w/api.php?action=query&list=backlinks&bltitle=Ironpaper&bllimit=10
Break down that URL to see how it’s made up:
Step 2: Available Formats
API calls can return a variety of formats depending on the service. Start out by returning the data in HTML or XML format that I to make sure the query is correct and that you're getting the expected results from the API. Other formats, like JSON, download the data to use for other purposes later.
Here's another example for Twitter's GET users/show function, which returns information about a user, such as description, URL, link to profile image, last tweet, count of friends / followers, etc.
https://api.twitter.com/1/users/show.xml?screen_name=geekygirldawn
Step 3: Rate Limiting
Most APIs have some kind of rate limiting, which means they can only make so many calls to the API from a given IP address in a given amount of time. For Twitter this limit is 150 API calls per hour. This is to prevent people from abusing the API or putting too heavy a load on the servers.
Step 4: API Keys
Some APIs require that you sign up for an API key. This is usually to keep track of requests. Think of it as a password that shouldn’t be shared. In many cases, an API key is what the API uses to rate limit requests.
Step 5: Combination for Power
APIs can be combined to get information that can’t easily be gathered in other ways. For example, combining APIs can: