API Application Programming Interface

Thread Starter

mukesh1

Joined Mar 22, 2020
68
I am trying to understand what's API in python or in any language. I'm trying to figure out when to use API?

But I still haven't understood when and why to use the API.

can anyone help me
 

ZCochran98

Joined Jul 24, 2018
303
An API is an application programming interface (that's the acronym). What that means is it's the interface between the user (whether the user is a programmer or the end user) and the program or application. For an end-user, that may include the front-end stuff (what the user actually interacts with). With a programmer - and more to the point of your question - that may include libraries and the documentation behind them. For instance, if you want to some webscraping via python by having a program automatically go out to Amazon and check the prices on certain things, collect that data, and send it back to you, then Amazon has an API which will allow you to do this. What this may include is libraries already built to do the scraping, documentation on how to use those libraries, or documentation that instructs you how to interact with their web services.

Basically, any time you are creating or using and interface that will connect you to the computer or some program, you are working with an API, whether made by yourself (e.g.: a program you wrote using your own libraries to make your computer do something) or by someone else (e.g.: a set of libraries and documentations that allow you to do more complicated things or interact with other programs entirely). So you use an API whenever you do any kind of programming.

Another example (taken from the Wikipedia article on an API) is this: a button in software is an API for the end user to do something (like the "send" button in an email client), while the libraries and functions designed to handle actually making the button is the API for the programmer.

Hope this helps!
 
Top