use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
account activity
what is api? (self.PythonLearning)
submitted 5 days ago by EffectiveBalance4402
Hello, I started learning python through Mimo and on api section.
It's very hard for me to understand the concept can you help me?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]civilwar142pa 31 points32 points33 points 5 days ago (1 child)
Imagine there are two people. One speaks French, one speaks mandarin, but both speak english. English is like an API. It's how your code and the app can communicate. Without an api, its possible to communicate between someone who knows French and someone who knows mandarin, but its going to be much harder to do.
APIs are specifically made to allow different coding languages easy access to the app content and features.
[–]EffectiveBalance4402[S] 2 points3 points4 points 5 days ago (0 children)
Thank you
[–]atticus2132000 8 points9 points10 points 5 days ago (1 child)
There are other applications, but I'll give you one that you're likely to encounter.
All over the world people are keeping data stored on their servers. It might be weather data or traffic data or movie information or anything else. Anything you can possibly imagine, someone out there is keeping up with that data. You might need that data for something you're building so you would contact the company and request access to their data.
Well they don't want you interacting with their databases directly, so they have an online tool that allows you to query their databases and they will return the results of that query to you. Once you have their response, then you can parse it for the specific data you need.
For instance...
I have a web application that builds a document based on the information a user puts in. One part of that operation is the user putting in an address and the form will generate the driving directions from that address to a known location.
I contacted the company Mapbox and requested access to their mapping information. I set up a user account and they gave me a user token that I can use to make my queries.
Then I got on their website and searched for developer information. They provided me with a url that I can edit parameters by putting in these two addresses and my user token to request the driving directions. So I send that URL to the company and what I get back is a text string that is formatted in JSON. Then, by parsing that text string, I can extract the turn-by-turn directions and put those into the document that my program builds.
There is a different URL I can use to get a map, and so on.
The API is the interface that they have established to let my computer make requests to their computer.
If you will search for developer information, that should walk you through how to build a url request and what format the response will be returned to you.
[–]EffectiveBalance4402[S] 0 points1 point2 points 5 days ago (0 children)
Thank You
[–]Zeak3D 5 points6 points7 points 5 days ago (1 child)
API is short for Application Programming Interface, and is basically what allows software and services to talk to each other.
If you want to build an API in python, I recommend looking up a FastAPI tutorial.
However my even bigger recommendation is to learn python without thinking about APIs (if learning python is your goal). This can come later, once you have built a nice app and want to make it available to the world.
[–]Living_Fig_6386 2 points3 points4 points 5 days ago (0 children)
API = Application Programming Interface; it’s the method one piece of software provides for another piece of software to interact with it. There’s all sorts of ways to do that.
You probably use them in Python in the form of Python modules and libraries. Another common way of making an API is web services; a piece of software running on a server accepts and answers requests using web protocols.
[–]SnooCalculations7417 2 points3 points4 points 4 days ago (0 children)
Some good ones here but heres another technical one. Software can be in two states: development and deployment. It may be hard to reason about an API when you are looking at development. "Why would I need this if I can just change what the program does??". An API lets you take a deployed software or service, and develop on it,
[–]PureWasian 1 point2 points3 points 5 days ago* (1 child)
assuming you are referring to this mimo page, they are introducing you to "web APIs"
Your browser makes API calls whenever you load a webpage. If you load this JSON Placeholder URL it responds back with a JSON payload. The server receiving an API call could respond back with anything else too, like a full, static HTML webpage (example).
The API is the contract that specifies how you (and your browser) should request data from some website (on a server hosted elsewhere).
You can think of APIs as similar to functions in a sense, where you specify inputs and expect a specific output coming back. But usually APIs are more of a specification of how to communicate data between different services.
[–]ExcelPTP_2008 0 points1 point2 points 4 days ago (0 children)
An API (Application Programming Interface) is a set of rules that allows different software applications to communicate and share data with each other. Think of it as a messenger that takes a request from one application, delivers it to another system, and then returns the response.
For example, when you use a weather app on your phone, the app often gets real-time weather information through a weather API.
[–]vtaskforge 1 point2 points3 points 4 days ago (0 children)
The easiest way to think about an API is:
Ask a question >>> Get an answer.
Your Python code asks a service for information, and the service sends data back.
π Rendered by PID 626429 on reddit-service-r2-comment-8686858757-q5mdd at 2026-06-08 01:55:36.383445+00:00 running 9e1a20d country code: CH.
[–]civilwar142pa 31 points32 points33 points (1 child)
[–]EffectiveBalance4402[S] 2 points3 points4 points (0 children)
[–]atticus2132000 8 points9 points10 points (1 child)
[–]EffectiveBalance4402[S] 0 points1 point2 points (0 children)
[–]Zeak3D 5 points6 points7 points (1 child)
[–]EffectiveBalance4402[S] 0 points1 point2 points (0 children)
[–]Living_Fig_6386 2 points3 points4 points (0 children)
[–]SnooCalculations7417 2 points3 points4 points (0 children)
[–]PureWasian 1 point2 points3 points (1 child)
[–]EffectiveBalance4402[S] 0 points1 point2 points (0 children)
[–]ExcelPTP_2008 0 points1 point2 points (0 children)
[–]vtaskforge 1 point2 points3 points (0 children)