Streaming Availability

FREEMIUM
Verified
Durch Movie of the Night | Aktualisiert 6일 전 | Movies
Popularität

9.9 / 10

Latenz

591ms

Service Level

100%

Health Check

N/A

Zurück zu allen Diskussionen

pages total_pages

Rapid account: Awolrob
awolrob
3년 전

I’m selecting several services and only getting limited data. How do I attemtped to receive “unlimited” data back?

'data: { results: [], total_pages: 87 }'

when I do not specify a "pages" parm I only get 25 results

when I specify a "pages" of 100 I go NO data back.

Do I have to call the API once to determine the number of pages then again setting the number of pages?
Rapid account: Cevatbarisyilmaz
cevatbarisyilmaz Commented 3년 전

Hi,

To query the whole data, you need to first send a request with page=1 or without a page parameter (note that there’s no “pages” parameter, there’s only “page”). Consume the data in the results, then check the “total_pages” and send a new request for each page. i.e. if total_pages = 5, then you need to send extra requests with page=2, page=3, page=4, and page=5

Maximum amount of items for each request is 25 for Search Ultra endpoint. So if there’re 100 results, you’ll need to send 4 requests to get them all.

When you are setting “page” to 100, and the total pages are 87, that means you are querying a page that does not exists, thus the endpoint returns an empty array.

Hope this helps. Let me know if you any other questions.

Nehmen Sie an der Diskussion teil - fügen Sie unten einen Kommentar hinzu:

Anmelden / Registrieren, um neue Kommentare zu veröffentlichen