As I have seen that the discover response returns total_pages in the API response like 3032, 2045, 891. But What's the point of showing it, If I can't go to that range. In simple words, User can't access or go to pages more than 500 otherwise it will return
{"success":false,"status_code":22,"status_message":"Invalid page: Pages start at 1 and max at 500. They are expected to be an integer."}
And There is no solution to get or access the pages more than 500. so You're stuck with only 500 pages.
.לא מצאת סרט או סדרה? היכנס כדי ליצור אותם
?רוצה לדרג או להוסיף פריט אל רשימה
?לא חבר אתר
תגובה מאת bambhaniya_dheeru
ב-ספטמבר 19, 2023 ב-2:02אחרי חצות יום
תגובה מאת Travis Bell
ב-ספטמבר 19, 2023 ב-4:42אחרי חצות יום
It is still often very useful to have the
total_results
, regardless if you can't retrieve all of the pages. You can always break up your query into smaller groups in order to get whatever data you're looking for (by release date as an example) so that queries stay below 10,000 results.תגובה מאת jhhomjhhom
ב-ספטמבר 19, 2023 ב-11:58אחרי חצות יום
What do you mean into smaller groups?
If I am using discover endpoint and there are 3000 total_pages available and after 500 pages, I don't know what's after it then How can I even know about the next result's(pages. 743, 554, 2952) release dates, genres, ids?
תגובה מאת Travis Bell
ב-ספטמבר 20, 2023 ב-11:05לפני חצות יום
Let's assume you have this query (
with_genres=28
):There are
373379
results. But you can easily split it up by release date (by year in this example):All of these queries should yield less than 10,000 items so you can page through each of these as a way to get all of the results. Using dates is a simple way to accomplish this, but depending on your query, there could be alternative approaches.
תגובה מאת jhhomjhhom
ב-ספטמבר 20, 2023 ב-1:35אחרי חצות יום
@travisbell Now I understand, this is good solution too. But this can take too long to query about 1000 to 2000 results. API endpoint's speed is very nice and it doesn't take long to query any kind of result but querying this large number of calls might lower the speed.