What’s an API and Why Do You Need to Know?

Last Updated: October 31, 2021

Geoffrey

Geoffrey

You could go through your entire life without knowing that API is the acronym for application programming interface. But you might not realize that you use APIs all the time in your day-to-day life. APIs power the apps on your phone, deliver your weather reports, make it easy for you to book flights or hotels, and even make it possible for you to click that “Pay with PayPal” button.
EarthWeb is reader-supported. When you buy through links on our site, we may earn an affiliate commission.

Okay, so you could go through your entire life without knowing that API is the acronym for application programming interface. But you might not realize that you use APIs all the time in your day-to-day life.

APIs power the apps on your phone, deliver your weather reports, make it easy for you to book flights or hotels, and even make it possible for you to click that “Pay with PayPal” button.

So what is an API? It’s just a way for a computer program, or application, to talk to another program.

It’s like a set of rules that make it possible for systems built using sometimes completely different technology to communicate, even if they’re on the other side of the world.

Whenever an application needs something from another application, it can send a message. That message, or API request, has to be worded in just the right way to get a response.

The API tells developers how to word their messages and clearly explains what response they will get. That means that they can use those responses or data in their own applications and programs.

The One-Minute History of The API

APIs have a pretty short official history. Although the first reference to “application programming interface” was back in the 1970s, APIs really only came into their own in the internet era.

With lots of new applications springing up all over the web, developers wanted to communicate with these programs and use the data in their own websites and applications.

Some of the earliest e-commerce API examples were from Salesforce, eBay, and Amazon. The Google Maps API came along just as mobiles took off, giving users access to map data in a host of other apps.

But it was social media APIs that really kicked off the API explosion. The Flickr, Twitter, Facebook APIs made it possible for developers to use content from those websites all over the web.

douglas lopes ehyV XOZ4iA unsplash

The Basic API Terms You Need to Know

You might not think that you need to know anything about APIs if you’re not a developer. But you owe it to yourself to become familiar with at least the basic terminology and understand how and why APIs are used.

Eventually, you’ll end up in a meeting or discussion where people are talking about API keys, API endpoints, or API calls, and you’ll at least be able to hold your own.

You’ll often come across mention of requesting an API key on everyday websites. Or you might see a reference to an API token. An API key and API token are much the same things these days.

They’re secret alphanumerical codes used by developers to send messages via the API. So if your application needs to request data from Google Maps, you’ll use your unique Google Maps API key to authorize the request.

An API endpoint is basically an address in the form of a URL. When you send a message through an API, you use the URL to tell the message where to go.

That saves time and resources, because the system receiving the message doesn’t have to expend any effort on deciding where to send it. The API endpoint URL will usually also include the API token or API key so that the system knows who is sending the message.

The message that’s sent is an API call or API request. API calls are usually very simple. They allow the external program to request, add, change, or delete data. That’s almost always it.

But if you think about it, that’s enough, as it means that the API enables the external program to interact with its database and get any information it needs.

For example, an API call can be used to get information about a user, data about locations on a map, prices from a website, or photos from a social media site. If the API allows, an API call can change or even delete that information.

Armed with these simple commands, the application using the API can make use of data coming from a completely different application that might be anywhere in the world and might contain millions of terabytes of data.

And that application can use multiple APIs to bring together that data in sometimes surprising ways.

4 Examples of Some Great APIs

  1. IBM Watson: At the cutting edge of artificial intelligence and natural language processing, the IBM Watson APIs enable third-party applications to use conversation, language, and advanced text analytics.
  2. Google Maps API: One of the biggest and best APIs out there is the Google Maps API. It’s been around for over 15 years and it has powered everything from navigation to crisis relief efforts. Google does impose some restrictions on developers using its API, so there are unofficial alternatives that let you do more. If you need to extract data at scale from Google Maps, you can always use something like this Google Maps Scraper.
  3. Facebook API: With over 2.85 billion monthly active users, it’s easy to see why developers want to use the Facebook API to connect with customers and access the vast amounts of data that Facebook collects. Again, Facebook can be pretty restrictive when it comes to how quickly you can extract data, so it’s worth exploring unofficial Facebook API options such as this Facebook Pages Scraper
  4. Stripe API: Stripe is revolutionizing the world of internet payments for millions of businesses of all sizes. It brings together everything you could possibly need to build an app or website that accepts or sends payments anywhere in the world in over 135 currencies. It also helps that Stripe is committed to creating the “world’s most powerful and easy-to-use APIs”. Clean, organized, and predictable, the Stripe API is truly a world-class example of how to create an API.

Those are just four examples of some outstanding APIs.

And as the internet becomes more closely entwined with every part of our lives, you can be sure that you’ll see some amazing new APIs appearing in the future.

Now that you know the basics, you’ll be as excited as any developer when you come across API news.

Written by Geoffrey