DEV Community

Cover image for Getting Started With APIs - Part 1
Abraham Gumba
Abraham Gumba

Posted on • Updated on

Getting Started With APIs - Part 1

This article first appeared on OwenDevs.com


A lot of modern programming requires the use of an API of some sort.

What is an API?

API stands for Application Programming Interface. This is basically an interface (a portion of software that is placed between two systems) that allows programs outside that software to interact with it.

For example, you may develop some software that requires your clients to make some payment through a third party. Your software will therefore send some information to the third party's payment system to initiate the transaction. You will then want to know if the customer has successfully made the payment. The payment system will send some information back to your software with the relevant payment details. The outside-facing parts of the payment system that receive and send information are what is known as an API.

A simpler example is a website that allows you to simply retrieve and read some information from within it. One example is YouTube, which allows you to programmatically find out details of a channel such as the number of videos the channel has, number of subscribers, views and so on.

A system that has an API will usually provide information on what information your program should send in order to request some information or to initiate a transaction. It will usually also specify what kind of information you will get back.

API Keys

The system that allows interaction with outside parties often wants to know who it is interacting with.

key
One of the reasons for this is that some systems offer free services as well as paid services, so they need to know who has paid and therefore what they are entitled to.

Another reason is to place limits on the number of requests each user can send, in order to avoid overwhelming the system.

To identify and keep track of who is using the system without having the user log in each time, the systems usually use what are known as API keys.

An API key is simply a unique set of alphanumeric characters that is assigned to each user. After you have been given your API key, you normally include it in the information that you send to the API, so that it knows who is sending the information.

An API key may be something like: '4fd8mb187d3g1ew29fd62u37abf7n819'
This example is a made-up key. :-)

Some APIs allow free access to their data, without the use of API keys.

Where To Find APIs

There are many APIs available to the public on the Internet. I have already mentioned YouTube. You can find numerous others at the link below.

APIsList.

In the next article, we will look at a program that retrieves some information from an API and presents it as a chart.

One-on-One Lessons

If you wish to have one-on-one lessons in Python or PHP or if you need support from time to time as you go through coding lessons from elsewhere, please consider the lessons/service that I offer.

Top comments (0)