How does an API work?

908 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

It stands for “Application Programming Interface.” It’s the way that programs communicate with each other. The “interface” is the set of things you can ask a program to do, and the format of the data you will send to it or receive from it. For example, the twitter API lets you get the content of tweets, post tweets, get profiles, etc. It defines how you make requests, and how it will respond to them.

Lots of bot accounts and third-party apps use the twitter API. Getting rid of the free tier will likely reduce the “ecosystem” of apps that use it. It probably won’t affect bot traffic much because the people who run those can afford to pay. It will more likely affect people who are developing apps or websites that integrate with twitter as hobby projects or startups. It will make the barrier to entry higher, which means less people will try out their ideas, which ultimately means twitter will have a narrower reach.

Most large companies that are interested in growing and especially in selling user’s data provide a free tier of API access so that they can increase the number of people using the service. Getting rid of the free tier is probably a way to try to get more revenue, but I bet they are assuming that it won’t negatively impact their user counts and reach. I also bet that is a bad assumption.

Anonymous 0 Comments

In basic terms, an API (Application Programming Interface) is a way for two different applications to talk to each other, through some standard means. In most modern cases an API is accessed via HTTP(S) request (it’s the same kind of message you send via the internet to access a web page, for example. You navigate to ‘[https://www.reddit.com](https://www.reddit.com)’ and the reddit’s server delivers back a web page to your internet browser)

For instance (*and I don’t know the ins and outs of the twitter’s api so I’m just making a hypothetical example*), Twitter ‘s API could have a ‘GetLatestTweets’ function, which when accessed, returns information about the user’s most recent tweets, or something like that.

Some services will offer their API as a service- for example, a lot of the ‘lookup postcode’ things you see on websites will talk to an API by a software company that deals exclusively with address lookups, that requires payment to use.

Anonymous 0 Comments

Reading Twitter’s API (usually with documentation) tells a developer what to write in their own software so that it will communicate properly with Twitter.

Being unable to access this information means that any developer who wants their software to exchange data with Twitter will just not be able to do it, or be very limited. It limits functionality of third-party apps – anything that is built for Twitter but isn’t a part of Twitter.

Anonymous 0 Comments

Do you really, really know the details of how your car actually works?

Do you know how to use a steering wheel?

The steering wheel is the api here. It takes a complex thing and makes it consistent and simple to use. Even if you buy a new car, there is still a steering wheel.

Computer stuff works the same way.

Anonymous 0 Comments

[removed]

Anonymous 0 Comments

One of the reasons why it sucks is because their API works really well as an example for how to interact with web-based APIs as a whole. Pretty much everyone knows what a “Tweet” is, so it’s really easy to come up with examples of how to use different technologies along with APIs. I’ve used it myself in my professional life for proofs-of-concept for data pipelines, enterprise service buses, authentication, and probably a dozen other things that I can’t think of right now.

If I had to guess, I would say that they’re getting rid of it because of all the bots who use it. It’s pretty easy to write a little script which uses Twitter’s API to listen for new tweets and automatically respond to them. I used to have a bot running that would read out loud any of Donald Trump’s tweets as soon as they went out, but others use them for more nefarious purposes.

Anonymous 0 Comments

An API is basically a website for programs. You can get the content for your program from the human website, but it’s more complex and breaks all the time because of bugs and changes on the website. An API is much simpler for a program because it usually has no graphics, just text.

Anonymous 0 Comments

API stands for “Application Programming Interface”. It’s basically a way for one system to communicate to another system. In the case of twitter, it’s a way for someone to create their own “Twitter” app, that can send tweets, read tweets, like, share, etc all without being the official Twitter app.

Other uses would be things like having an API that lets you control your smart lights in your house. You can use the app that is built for your specific lights. But if you want to use your google assistant or whatever, what is actually happening is you’re telling google to “talk to” your lights. It does this “talking” with the API. So you tell google “Turn off my lights”, and Google in turn sends a message using the API to the lights to do that action.

People are “up in arms” about Twitter removing their API because it means that you can’t make your own Twitter app, you’d be forced to use their official app or the website. There are a few third-party (e.g. made by people who don’t work for Twitter) apps for Twitter that extend functionality and/or look “better”, and people want the option to use those apps. Once the API is removed though, those apps have no way to communicate with the Twitter servers, so they wont be able to do a lot of what they do.

Anonymous 0 Comments

I think others have explained well what’s an API, let me give you the context.

Ever wonder how you can view Twitter posts or post tweets on another app that is not ‘Twitter’? This is because there is this thing calls ‘API’. API is how two different apps communicate with each other. These third party apps uses Twitter API to get those Twitter posts for you and display them on their app. It also tells Twitter to post your tweet for you, via the API.

P/S: If Twitter API is no longer free, you probably have to pay the guys who made those alternative Twitter app if you want to continue use it.

Of course you can do much more with Twitter API, you can program something to get Twitter posts and do something creative with it on your own, as others who have shared here.

There are tons of free APIs on the internet too, such as weather api where u can make your own weather app by getting weather information via the API and do something creative with it like reminding you to bring umbrella when is going to rain.

Anonymous 0 Comments

My favorite way to explain an API (application programming interface) is to compare it to the much more familiar interface, UI (user interface).

A UI is how an application or piece of software interacts with its human users. It’s all the text, buttons, colors and images that allow you to read and interact with information in the app, and is designed for humans to use.

On the other hand, an API is also an interface, so it also allows ‘something else’ to interact with your application or piece of software, but in this case the ‘something else’ is another piece of software instead of a human.

Some examples include:

* When you use an app on your phone that uses the camera, the app uses an API to ask the phone’s operating system for camera access
* When you go on the weather app, the app sends a request over the network to some server with an API that provides real time data on what the weather is like

For a twitter specific example, if you want to use twitter, you would use a UI (the twitter app or the twitter website), because you’re a human and UI’s are built to be easy for humans to use. But, if you wrote a bot that uses twitter, it would use the API, because its a piece of software and API’s are built to be easy for pieces of software to use.

To sum it all up, humans interact with pieces of software using user interfaces, pieces of software interact with other pieces of software using application programming interfaces.