This post is a high-level overview of APIs, what they do, why they are useful and how they are used.  After reading this you will have a better understanding of the acronym API.

What is an API?

An Application Programming Interface (API), as defined by Wikipedia, is a set of routines, protocols, and tools for building software and applications.  In short an API is a what developers use to interact with an application, like WordPress, but before version 4.4 there was no such API within WordPress.

APIs are used in many different ways like querying data, posting data, computing very large tasks and many other things.  Anyone can create an API and most technology companies today have an API.

Why Are APIs Useful?

APIs are extremely useful to the developer community.  They open up specific functionality that was previous closed.  This means that developers can rely more on other resources to perform a specific function instead of having to create it themselves.  This is just one specific example, but overall APIs give developers access to these functions that they can leverage to make new technologies or improve others.

How Are APIs Used?

API are used in many different ways and for many different things but we will talk briefly about using remote service APIs.  A specific API like Yahoo! Weather allows developers to gather weather data for a certain location.  The way in which developers gather this data is via a HTTP Request that pings Yahoo!’s servers and asks for data based on the given parameters.

Here is an actual example that queries weather data using the Yahoo! Weather API via an HTTP request which returns data in Javascript Object Notation (JSON) format.  Click here to view this endpoint.*%20from%20weather.forecast%20where%20woeid%20in%20(select%20woeid%20from%20geo.places(1)%20where%20text%3D%22nome%2C%20ak%22)&format=json&

As you can see this is fairly simple as all you have to do is ping a server endpoint with specified parameters in order to receive weather data about an area.

API Protocols

Yahoo! created their own system for queuing data via their API and they call it YQL.  This system allows developers to specify a YQL query to gather data instead of using more generic protocols.  One of the other protocols used widely is REST and you can read more about it in our next blog post.

Leave a Reply

Your email address will not be published.