Forum Settings
Forums
New
Mar 2, 2024 3:06 PM
#1

Offline
Feb 2020
972
is there a known way to request information for many shows all at once?

I'm trying to get the scores of a couple hundred entries, and I know every id. can I save making a couple hundred calls here or is there no support?
Please sign up for MangAlert! It's a little project I made that I'd really like to see the light of day and some users.

MangAlert! (please sign up!)
GitHub Repo (please star!)
Reply Disabled for Non-Club Members
Mar 2, 2024 4:50 PM
#2
Offline
Jul 2023
10
can't you do them in groups of 100?

but you can't give out specific id's for this, it has to be 100 animes that are next to each other in popularity or rating ranking
Mar 4, 2024 8:34 AM
#3
四十二

Offline
Mar 2016
488
As pepeefirat said, you cannot retrieve the details for an arbitrarily large batch of anime with a single API call. You have to request them individually by ID.

Some exceptions are if you're querying one of the rankings or a user's anime list. In those cases, you can collect the anime IDs and all the additional fields you might need with a single request.
HTCPCP/1.0  ★ MetaMAL  ★ Picture credits: Kieed & 1041uuu
Mar 4, 2024 9:42 PM
#4

Offline
Feb 2020
972
Reply to ZeroCrystal
As pepeefirat said, you cannot retrieve the details for an arbitrarily large batch of anime with a single API call. You have to request them individually by ID.

Some exceptions are if you're querying one of the rankings or a user's anime list. In those cases, you can collect the anime IDs and all the additional fields you might need with a single request.
@ZeroCrystal I see, pretty unfortunate. I have a script that makes around 400 calls, but stops before 150 every time, regardless of the time gap I use (up to 1 second between queries). Does this have to do with the rate limit?

this is the script I'm using if it helps: https://github.com/kathirmeyyappan/list-update-scripts/blob/main/python-scripts/update_mal_scores.py
Please sign up for MangAlert! It's a little project I made that I'd really like to see the light of day and some users.

MangAlert! (please sign up!)
GitHub Repo (please star!)
Mar 6, 2024 12:40 PM
#5
Offline
Jul 2023
10
Reply to Uji_Gintoki_Bowl
@ZeroCrystal I see, pretty unfortunate. I have a script that makes around 400 calls, but stops before 150 every time, regardless of the time gap I use (up to 1 second between queries). Does this have to do with the rate limit?

this is the script I'm using if it helps: https://github.com/kathirmeyyappan/list-update-scripts/blob/main/python-scripts/update_mal_scores.py
@Uji_Gintoki_Bowl I came across this as well. I was doing 0.6 sec between requests, and it was stopping around the same time you said. After I upped it to 0.7 it never stopped.
Mar 6, 2024 3:03 PM
#6
四十二

Offline
Mar 2016
488
Reply to Uji_Gintoki_Bowl
@ZeroCrystal I see, pretty unfortunate. I have a script that makes around 400 calls, but stops before 150 every time, regardless of the time gap I use (up to 1 second between queries). Does this have to do with the rate limit?

this is the script I'm using if it helps: https://github.com/kathirmeyyappan/list-update-scripts/blob/main/python-scripts/update_mal_scores.py
@Uji_Gintoki_Bowl A delay of 700 ms should be enough.

I suggest adding a timeout to your requests. If the response times out, wait for a few minutes and then try again.
HTCPCP/1.0  ★ MetaMAL  ★ Picture credits: Kieed & 1041uuu
Mar 6, 2024 11:29 PM
#7

Offline
Feb 2020
972
Reply to ZeroCrystal
@Uji_Gintoki_Bowl A delay of 700 ms should be enough.

I suggest adding a timeout to your requests. If the response times out, wait for a few minutes and then try again.
@ZeroCrystal Good to know, thank you!

I actually ended up finding a workaround. The vast majority of the id's I pull are on my list so I just paged my own anime list (3-4 500 entry calls) and then filled gaps with individual calls. This did not rate limit me, of course.
Please sign up for MangAlert! It's a little project I made that I'd really like to see the light of day and some users.

MangAlert! (please sign up!)
GitHub Repo (please star!)
Reply Disabled for Non-Club Members

More topics from this board

» I built a spotify-styled 'MyAnimeList Wrapped' for a yearly review of your anime and manga

XAvishkar - Dec 14

1 by Joeliazeers »»
Dec 17, 1:01 PM

» [Repost] list of all relation_type and media_type.

Mr_UnknownOtaku - Dec 8

4 by -DxP- »»
Dec 12, 8:43 AM

» How to get author name?

EdibleMuffin - Feb 12

4 by XAvishkar »»
Dec 8, 9:52 AM

» 401 Unauthorized when doing authorization flow

Konng_ - Nov 16

2 by Konng_ »»
Nov 28, 3:24 PM

» [discontinued] I made a webapp to compare plan-to-watch lists

daux - Apr 16, 2022

33 by daux »»
Oct 2, 4:17 PM
It’s time to ditch the text file.
Keep track of your anime easily by creating your own list.
Sign Up Login