r/AskProgramming • • Mar 26 '20

APIs Explained ...

I dunno but I don't understand APIs fluently. Does anyone know of an informative article or perhaps a website or just personally explain to me frankly wtf APIs are an why we need them ...

Edit: Thanks everyone for your empathetic contributions. Guess what; I have a better understanding of APIs now than I did before.

53 Upvotes

60 comments sorted by

View all comments

1

u/scandii Mar 26 '20

I feel people are giving you really long word salads of responses worthy of a wiki article.

an API is simply a program located behind an address somewhere that takes data. say you send the data "hello there" to an API located at myapi.com/myapi, it takes the data and if programmed to do so returns the data "general Kenobi".

that's it.

there's of course a bazillion layers of complexity on top of this but all we're doing is sending data (called payload in API lingo) and getting responses.

the reason we do this is so that we can ask other software about things like getting weather data from a weather service.

0

u/[deleted] Mar 26 '20

[deleted]

1

u/cellwall-999 Mar 26 '20

Phew! This was hard to take in but really helpful. Thank you for your time and assistance. 👊