Question: how api works in web application?
Answer: In the most basic sense, a web API works when a client (like a Web browser) makes an HTTP request of some kind to a Web server. The server examines that request to figure out what the user wants, and then returns data in some format (like a page) that the client then examines to get what it wants.