What is an API?
API (Application Program Interface) is how different software programs interact with each other. Let’s take an interesting example which makes things much simpler and clearer. You are at the office and in a party mood and decide to order some pizzas from a pizza hut. To give yourself and your friends a yummy delight, you will interact with Pizza Hut to place the order. Pizza Hut will receive your order. Your dish will be prepared in Pizza Hut Kitchen.
My mouth is already watering. Have you received your order? The Pizza’s might have been yummy! So what exactly is API? It’s when you(program) are interacting with another program(Pizza Hut) to receive your food. To receive the desired thing, you need to make sure that you request it in the right way.
API’s are a list of commands, one program uses one of command, the other program follows the command, does the task and returns what is required.