SIGN IN YOUR ACCOUNT TO HAVE ACCESS TO DIFFERENT FEATURES

FORGOT YOUR PASSWORD?

FORGOT YOUR DETAILS?

AAH, WAIT, I REMEMBER NOW!

The API CompanyThe API Company

  • Home
  • API’s
    • Device detection API
    • IP Location API
  • FAQ
  • Contact
  • Blog
  • My account
SIGN IN
  • No products in cart.
  • Home
  • Blog
  • API
  • What is API: Application programming interface
Thursday, 23 April 2020 / Published in API, Company information, Device detection, geolocation, JavaScript

What is API: Application programming interface

Tweet
Pin
Share
API's in a technical and conceptual sense
source

What is an API

API stands for Application programming interface. To explain this concept I like to use a metaphor. Imagine going to your local bakery. At the counter you ask for the things that you want to buy. The guy at the counter will pack these items for you. You only get the specific bread that you want.

Just like ordering a bread, an application programming interface is a way to ask for things from someone else. On the internet API’s deliver the information to you that you ask from them.

Developers use API’s as way to get information from other services on the internet. Let’s say you are a web developer and want to know the weather in a certain city. You can use a weather API for this. The API will be requested to give the current temperature in city X. In milliseconds the API will lookup the temperature in a database and sends you the current temperature in city X.

conceptual overview of an API

To get a more in-depth understanding of API’s I will explain the technical details below. Scroll down to see some examples of API’s.


API’s are here for speed, security, and consistency

Most of the times API’s are created by organisations to exchange information with clients or machines. API’s make in fast, secure, and consistant for organisations to share their information. Why? Read the explanation of each concept below:

speed icon

Fast: Let’s imagine you are a bank and you want to share information about the stock market. Many years ago, someone at the bank could call you and tell you the current stock prices. This banking guy has a hard job since the information changes all the time. Nowadays, an API could automate this process. Just in milliseconds someone at home could use an API to request the stock prices at that time. No person is needed.

security icon

Secure: Let’s stick to the banking example. The guy that calls the stock investor to present the stock prices – could by mistake – share some sensitive information about the bank. This is impossible with an API. The API shares only predefined information. There is no middle-man between the information and the client/computer.

consistency icon

Consistant : probably you can guess this already. API’s use some predefined format to deliver the information to you. For example in an excel sheet or JSON format.


How does an API work?

To really understand the concept on an API we need to get a bit more technical. API’s needs to be implemented by developers. Although API’s are fairly easy to implement, some small coding experience is needed.

Often API’s are available for many programming languages like JavaScript, Python or PHP. Generally API providers have some documentation about how to implement their API. A piece of codes provided by the API creator needs to be placed inside your application.

Once implemented you are able to request for information. Requests need to be in a predefined format. Mainly JSON format. See the JSON request example below:

{
   city-information: 
   { 
      city-name: "New York City",
      city-country: "US",
   }
}

This piece of JSON information is send to the API. It understands this information. Subsequently, the requested information is send back to the user in JSON format.

Process of an API

The diagram below explains all the different steps of an API in detail

in-depth process of an application programming interface

The steps in this diagram are:

  1. You implement the code on your website in your preferred programming language.
  2. If the code runs and the data is presented in the right format, the JSON data is send to the server of the application programming interface.
  3. The API only works for authorised users. Some API’s are not free or limit the amount of requests per month.
  4. If authorised, your requested data is processed.
  5. The requests is looked up in a database.
  6. The requested information is send back to your website (in JSON format).

Examples of API’s

I am the founder of www.theapicompany.com. We create easy and simple API’s for web developers. Below I like to show you two of our API’s

1. Device detection API (click here)

This tool detects the mobile device type of a user. For example: Apple iPhone XS or Samsung Galaxy S20. The device detection API needs to be implemented on your website with JavaScript. This tool is often user for personalisation in a web-shop. Imagine a web-shop selling phone-cases. The device of the visiter on the website can be detected. Subsequently, the users sees only phone cases for that specific type.

2. Geolocation API (click here)

The geolocation API detects the location of someone on your website. This tool detects the city, timezone, currency, and IP-address of the user. Image the many applications of this. For example, an advertiser only shows ads to persons in the city of the shop. Alternatively, automatic conversion of prices in a web-shop based on the local valuta of the customer.

Conclusion

An Application Programming interface is used to share information between services. This is done fast, secure and consistant. Try the device detection API or Geolocation API. Happy coding 🙂

Tweet
Pin
Share
Tagged under: API, device detection, geolocation, theapicompany

2 Comments to “ What is API: Application programming interface”

  1. Hugo says :
    May 4, 2020 at 2:31 pm

    I do agree with all of the ideas you have presented to your post. They’re very convincing and can definitely work. Still, the posts are very brief for newbies. May you please lengthen them a little from subsequent time? Thank you for the post.|

    1. admin says :
      May 4, 2020 at 2:51 pm

      Thanks for reading the Post Hugo! This was the first post about API’s. The following posts will be more in-depth about REST and SOAP API’s.

Recent Posts

  • REST & SOAP API USAGE IN 2020

    This infographic illustrates REST and SOAP API ...
  • What is an IP address: concept & technology

    IP-address is short for “Internet protoco...
  • What is geolocation: History and use-cases

    A brief history For already thousand of years p...
  • New: Geolocation detection API

    Today we launched a new API for our platform: T...
  • New mobile devices March 2020

    An overview of new mobile devices for March 202...

Archives

  • April 2020
  • March 2020
  • February 2020
  • March 2019
  • February 2019

Categories

  • API
  • AWS
  • browser detection
  • Company information
  • Device detection
  • geolocation
  • IP-address
  • JavaScript
  • new devices
  • User-Agent String
Links
Blog
Device Detection API
IP Location API
Privacy Policy
Information
Contact
About
FAQ
Sitemap

© 2021 - The API Company

TOP