How does an API work?

976 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

An API is the entry point of a system. Imagine the menu of a restaurant. That is the API to the kitchen. It tells you what the kitchen can do and how to access it. This has benefits for both parties. On one hand, you as the client do not need to know how the kitchen works in order to get your food. And the kitchen can more easily control their operation if they don’t have customers walking in their freezers to help themselves to what they want. As a matter of fact the kitchen can now completely forbid anyone that isn’t an employee from accessing their space, thereby making it even more secure and tightly controlled.

The API of an online service does the same. It’s the part of the system that clients like apps and websites can access. It says what data they’re allowed to see and how they can ask for it. Imagine if every app that wants to display a Twitter feed needed to know how to create one by directly accessing the miriad of Twitter databases. It’d never work and it’d be highly unsecure. So the API acts as a contract between the 2 parties to facilitate communication.

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