[Music] API stands for application programming interface an API is a set of protocols that let different pieces of software communicate with each other and share data developers use apis to connect chunks of code from different places in order to create the web and mobile applications we use every day you can think of an API like a restaurant in this metaphor the customer is the application the waiter is the API and the kitchen staff is the API server the customer starts off by reading the menu which lists all of the food that's available and describes each
of the options the restaurant curated this list based on what they wanted to offer when the customer places their order with the waiter they're making an API request the waiter the API takes the customer's order and relays it to the kitchen that is the API server the kitchen makes the customer food according to their instructions and then hands it off to the waiter who delivers it back to the customer when the waiter brings the customer their order what they are delivering is the API response by Design the customer is able to get exactly what they
need from the kitchen just by talking to the waiter they don't have to go into the kitchen talk to the chefs take inventory of the ingredients and supplies or check the status of any cooking appliances in order to know what food is available they just need to communicate with the waiter the API there are many different types of apis including rest soap graphql grpc mqtt and more and each one could be the right fit for a given application the differences between these architectural Styles and Protocols are in the way requests are made and handled for
example rest apis use HTTP verbs to create and retrieve resources like our waiter running back and forth between the kitchen and the restaurant patrons grpc on the other hand uses the newer HTT gp2 web protocol and can handle larger volumes of complex data very well think of it like a catering service compared to a typical restaurant in the end it's still all about getting food from a kitchen to a hungry customer and an API offers the path to make it happen developers use apis to add features and functionality to their applications without having to rewrite
code that can be found Elsewhere for example if you want users to be able to translate text within your app it's probably not reasonable to include a multi dictionary within your application but you can easily have the app called the Google translate API to seamlessly provide the service to your users the same idea applies to accepting payments or sharing to social media or using location services these are all challenges that have been solved already and you can save time and money by leveraging an existing API to handle these functions for you in your app hopefully
this video gave you a solid introduction to the world of apis including what they are how they work and how they can help you build featur resilient applications that users can depend on apis are used everywhere across every industry and there's no limit to what you can create [Music]