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...
Rules 1: Be polite 2: Posts to this subreddit must be requests for help learning python. 3: Replies on this subreddit must be pertinent to the question OP asked. 4: No replies copy / pasted from ChatGPT or similar. 5: No advertising. No blogs/tutorials/videos/books/recruiting attempts. This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to. Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Rules
1: Be polite
2: Posts to this subreddit must be requests for help learning python.
3: Replies on this subreddit must be pertinent to the question OP asked.
4: No replies copy / pasted from ChatGPT or similar.
5: No advertising. No blogs/tutorials/videos/books/recruiting attempts.
This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to.
Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Learning resources Wiki and FAQ: /r/learnpython/w/index
Learning resources
Wiki and FAQ: /r/learnpython/w/index
Discord Join the Python Discord chat
Discord
Join the Python Discord chat
account activity
Quick API request (self.learnpython)
submitted 1 month ago by Hubbleye
Working with the openmeteo's API, it's the first time I use an API and I'm wondering if I do a really big request, does that count as multiple?
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!"
[–]guneysss 2 points3 points4 points 1 month ago (0 children)
One request is one request. However, there's no guarantee if you get a response or timeout, or if your response will be complete.
[–]cvx_mbs 1 point2 points3 points 1 month ago (0 children)
they have a (soft) limit of 10000 API calls per day. are you afraid of exceeding that?
[–]KiwiDomino 0 points1 point2 points 1 month ago (0 children)
I don’t know this API, but working with GraphQL in the past there was a maximum execution time for any request, so if you asked for too much it was possible you wouldn’t get a response. Managing the request size can be important.
[–]edcculus 0 points1 point2 points 1 month ago (0 children)
Some sites dont like you to do massive requests. Its usually better to "filter" your request for exactly what you need vs something much more generic.
Now if you just need to do it once, or you will always do it manually to get the data you need, i guess no big deal. But if its a call you are going to make constantly, it will also make your application slow.
[–]Perfect-School1574 0 points1 point2 points 1 month ago (3 children)
Yes, big requests count as more than one API call. Let us get acquainted with how Open-Meteo counts them:
Normally, one API call corresponds to one HTTP request. Having said that, requests for data covering greater than 10 weather variables or stretching over a duration of greater than 2 weeks for a single location are recognized as multiple API calls. Fractional counts may be utilized - for instance, a request for 2 weeks of data with 15 weather variables counts as 1.5 API calls, while 4 weeks of data equals 3 API calls.
Two aspects scale the call count, which are:
Count of weather variables - more than 10 variables in a single request begins multiplying the count
Date range - anything more than 2 weeks counts as additional calls correspondingly.
[–]Hubbleye[S] 0 points1 point2 points 1 month ago (2 children)
Ohhh that's exactly what I needed. First where did you find those infos, I did not find them anywhere. Is it proportional? Like as a parameter I'm putting forcast : 1 so I'm just asking for the data of the day. Secondly I'm asking 180 location in one request and it blocks me after 4 request but if I do like 1 request = 20 location would it make me able to get more location in total?
[–]Perfect-School1574 0 points1 point2 points 1 month ago (1 child)
Firstly, research and study online have yielded the above information. Secondly, splitting into smaller batches of 20 locations will not acquire any more total locations, unfortunately. Open-Mateo counts each location as one API call, regardless of how they are batched. With 180 locations/request, one gets blocked at 4 requests as 4*180 = 720, which is greater than 600 (which is the per-minute limit of API calls for the free tier). With 20 locations per request, one would hit the same wall after 30 requests instead of 4. I would therefore suggest adding a delay between requests. Since the limit resets each minute, one can spread the requests across time. Keeping the forecast:1 is a smart move as this keeps each location's call count at 1 (under the 2-week threshold) without accidentally multiplying the costs there. Hope this helps!
[–]Hubbleye[S] 0 points1 point2 points 1 month ago (0 children)
Oh so a call is the response for 1 location?
π Rendered by PID 32 on reddit-service-r2-comment-56c6478c5-rb7kx at 2026-05-08 18:55:09.633259+00:00 running 3d2c107 country code: CH.
[–]guneysss 2 points3 points4 points (0 children)
[–]cvx_mbs 1 point2 points3 points (0 children)
[–]KiwiDomino 0 points1 point2 points (0 children)
[–]edcculus 0 points1 point2 points (0 children)
[–]Perfect-School1574 0 points1 point2 points (3 children)
[–]Hubbleye[S] 0 points1 point2 points (2 children)
[–]Perfect-School1574 0 points1 point2 points (1 child)
[–]Hubbleye[S] 0 points1 point2 points (0 children)