Streaming Availability

FREEMIUM
Por Movie of the Night | Actualizada 6ๆ—ฅๅ‰ | Movies
Popularidad

9.9 / 10

Latencia

591ms

Nivel de servicio

100%

Health Check

N/A

Volver a todas las conversaciones

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.

รšnase a la conversaciรณn, aรฑada un comentario a continuaciรณn:

Inicie sesiรณ/Regรญstrese para publicar nuevos comentarios