I Thought I Knew What an API Was. I Was Wrong.
For a long time, I had this feeling that I basically knew what an API was. I mean, I’ve used APIs before. In frontend projects, I used things like a weather API and got JSON data. In backend, I cre...

Source: DEV Community
For a long time, I had this feeling that I basically knew what an API was. I mean, I’ve used APIs before. In frontend projects, I used things like a weather API and got JSON data. In backend, I created routes and heard people call them REST APIs. Sometimes an API looked like a URL. Sometimes it looked like a function. Sometimes it looked like just a JSON response. So I was honestly confused: What is an API actually? Is the weather JSON file the API? Is an Express route the API? Is an API just a way to fetch data? Today I properly studied it, and finally the confusion became much smaller. So this post is basically me sharing what I understood in simple words. what is an API, really? API stands for Application Programming Interface. That sounds fancy, but the simple meaning is: An API is a way for one software to talk to another software using defined rules. That’s it. Think of it like this: your frontend wants data your backend has that data the API is the way they communicate Or: your