How does an API work?

928 views

Twitter recently announced they will no longer support free access to the Twitter API. Everyone seems up in arms about it and I can’t figure out what an API even is. What would doing something like this actually affect?

I’ve tried looking up what an API is, but I can’t really wrap my head around it.

Edit: I’ve had so many responses to read through and there’s been a ton of helpful explanations! Much appreciated everyone 🙂 thanks for keeping this doofus in the know

In: 419

41 Answers

Anonymous 0 Comments

As humans we’re very good at understanding data visually. That’s why we prefer to look at graphs rather than big tables of data. ( Big shout out to r/dataisbeautiful 🙂 )

For that reason we mostly prefer to use a GUI (Graphical User Interface – like a web site for example) to get information. Computers, on the other hand, find it way easier to work with structured data (XML, JSON, etc.. take your pick).

An API (Application Programming Interface) is just a way of bypassing all the messy visual and layout stuff that computers hate and just feed it the raw data it loves.

So why bother? Well if you need an application to consume some data from another application, it’s more predictable and easier for the code get it from an API and access only the raw data, without all the peripheral visual stuff it doesn’t have any use for. It also means you can redesign your GUI (aka website) to the latest in cool, funky design language without changing anything on the API, and so not risk breaking other apps that reply on that data.

Your GUI and your API could very well send exactly the same data to the requester. Or it could be different altogether. Dealer’s choice. You can choose to have either or both depending on your application’s and your customers/consumers needs.

You are viewing 1 out of 41 answers, click here to view all answers.