A Beginners Guide to APIs
A Beginners Guide to APIs
What exactly is an API?
API is an acronym for Application Programming Interface. It is defined as a system of tools and resources in an operating system which enable developers to create software applications. Typically, APIs use JSON (Javascript Object Notation) as the main language which provides methods designed to extract and manipulate data stored in HTML documents.
APIs aggregate data and complete processes over completely disparate systems, allowing them to interact with each other. In laymans terms, think of them as a waiter in a restaurant.
A waiter takes the order from the customer which is then relayed to the chef. Once the chef completes the meal, the waiter brings the meal to the customer. Similarly, an API receives a request from an application. It then interacts with a foreign server/data source to collect and process a response, which is then returned to the application.
In recent years, the popularity and usage of APIs have increased exponentially. A recent study found that two-thirds of developers expected to increase their usage of APIs in 2020. Additionally, companies across industries continue to develop and use APIs as a critical part of their strategy. By exposing often complex services as simplified code, APIs are easy to integrate and potential use cases are unlimited.
Its highly likely that youve used an application or viewed a website today that uses an API, so lets see it in action.
Real World Examples
When you search for directions on Google Maps, have you ever noticed that there is an option to book a ride from different ride services?
In the example to the left, Google Maps is using Ubers API to request information by sending a HTTP request function with the start and end points of the ride.
Ubers API then sends information back such as how many cars are available, where are they currently located, and the costs for the various ride options.
This information is then processed by Google Maps and is available to the user directly linking them the the Uber app if it is previously downloaded.
Similarly booking websites such as Travelocity, Kayak, Expedia, Booking.com, etc. all use APIs provided by airlines and hotel companies to get information on availabilities, pricing, and other variables to allow users to make reservations directly through the online travel service.
Nowadays, many apps and websites offer the option to register through an existing account on another application like Google or Facebook. An example of this are dating applications, like Tinder, where users can create an account through Facebook with just one tap.
Tinder uses the Facebook API to verify the users identity, as well as access valuable user information such as gender, age, mutual friends, and photos to build their profile.
Lastly, one of the most commonly used APIs is Google Maps Geocoding API. Applications that use it are able to convert addresses to geographic coordinates on a map.
Yelp in particular uses the Google Map API to access the users current location, as well as locate destinations nearby or afar and mark them on a map directly integrated into the application.
In Conclusion
APIs connect the world like never before. They remove previous barriers with just a few taps or clicks and can easily be integrated. Just think of them as waiters going back and forth between delivering data and creating interconnectivity.
The possibilities are truly endless.
What exactly is an API?
API is an acronym for Application Programming Interface. It is defined as a system of tools and resources in an operating system which enable developers to create software applications. Typically, APIs use JSON (Javascript Object Notation) as the main language which provides methods designed to extract and manipulate data stored in HTML documents.
APIs aggregate data and complete processes over completely disparate systems, allowing them to interact with each other. In laymans terms, think of them as a waiter in a restaurant.
A waiter takes the order from the customer which is then relayed to the chef. Once the chef completes the meal, the waiter brings the meal to the customer. Similarly, an API receives a request from an application. It then interacts with a foreign server/data source to collect and process a response, which is then returned to the application.
In recent years, the popularity and usage of APIs have increased exponentially. A recent study found that two-thirds of developers expected to increase their usage of APIs in 2020. Additionally, companies across industries continue to develop and use APIs as a critical part of their strategy. By exposing often complex services as simplified code, APIs are easy to integrate and potential use cases are unlimited.
Its highly likely that youve used an application or viewed a website today that uses an API, so lets see it in action.
Real World Examples
When you search for directions on Google Maps, have you ever noticed that there is an option to book a ride from different ride services?
In the example to the left, Google Maps is using Ubers API to request information by sending a HTTP request function with the start and end points of the ride.
Ubers API then sends information back such as how many cars are available, where are they currently located, and the costs for the various ride options.
This information is then processed by Google Maps and is available to the user directly linking them the the Uber app if it is previously downloaded.
Similarly booking websites such as Travelocity, Kayak, Expedia, Booking.com, etc. all use APIs provided by airlines and hotel companies to get information on availabilities, pricing, and other variables to allow users to make reservations directly through the online travel service.
Nowadays, many apps and websites offer the option to register through an existing account on another application like Google or Facebook. An example of this are dating applications, like Tinder, where users can create an account through Facebook with just one tap.
Tinder uses the Facebook API to verify the users identity, as well as access valuable user information such as gender, age, mutual friends, and photos to build their profile.
Lastly, one of the most commonly used APIs is Google Maps Geocoding API. Applications that use it are able to convert addresses to geographic coordinates on a map.
Yelp in particular uses the Google Map API to access the users current location, as well as locate destinations nearby or afar and mark them on a map directly integrated into the application.
In Conclusion
APIs connect the world like never before. They remove previous barriers with just a few taps or clicks and can easily be integrated. Just think of them as waiters going back and forth between delivering data and creating interconnectivity.
The possibilities are truly endless.
Comentarios
Publicar un comentario