What is API?

Sort:
Deepak_oct

Title.

Tricky_Dicky

Did you read any of the header info?

https://www.chess.com/news/view/published-data-api

Mister_CK

application programmable interface. You get a JSON response

bmacho

https://en.wikipedia.org/wiki/API

Bobcat

A happy Ape! Ap! Happy?

ChessGrandmaster2600

Might be a little late, but this is actually a great question for anyone looking into getting into programming. API stands for Application Programming Interface, and it acts as a middleman between you and the actual data. When you send a request to an API, you are reaching out to the server, which requests the data, and sends it back to you. This can be in the form of a JSON, or just raw text, or sometimes there are more complex things like GraphQL. Most APIs will return a JSON. A good analogy for an API is like a menu at a restaurant. You have a list of meals you can order, along with a description. When you order your food, the kitchen does all the work and provides you with the finished product! This analogy sort of falls apart in more complex scenarios, but this is just a pretty elementary way of phrasing it. For example, with the published data API, you can see your menu with different sections, like player data, clubs, etc. Let's say I wanted to get a players profile! All I need to do is make a web request (order!) to the endpoint (I guess you could call this a waiter) and provide a little extra details, being the username. I suppose you could think of this like special instructions for your meal. The server will prepare the information based on what you provided and then return it, like a dish from a kitchen