How does an API work?

946 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

API stands for application program interface. API’s are bits of code which allow you to interact with things with your own code that you don’t have access to normally. They “expose” new data sources or outputs to your code.

Imagine you’re a programmer. You’ve just learned how to code in javascript, the language of the web. You can add numbers, you can do complex calculations, you can print to a console, because that’s what javascript is made to do.

However, what if you wanted to pull data from a site like Twitter, lets say for a research project? You can’t just write a program that does that because your program has no way of interfacing with the entity called Twitter.

So, javascript has an API which lets you send and receive “requests” over the internet. Twitter also has an API which will answer requests that are worded correctly with data from their site. So, these tools allow you to write a simple javascript program that pulls data from Twitter, a source that would be totally inaccessible otherwise.

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