Hi everybody, quick q about the pagination functi...
# help
g
Hi everybody, quick q about the pagination function in the API - how would you calculate the amount of pages to retrieve since there is not total_pages parameter? I would get total_results and divide it by the amount of results per page - is that the correct approach? Another thing I am wondering is the “limit” parameter - is 25 the default max per page?
c
Hi Gilbert, You have two pagination modes: page based or offset based What is your use case? Do you want to fetch a specific number of record or all of them?
If you want to fetch a specific number of records we recommend you offset based pagination. Let's imagine you need 1.250 records 1. Request (limit= 500, offset=0) 2. Request (limit=500, offset=500) 3. Request(limit=250, offest=1000)
g
Ok, great and If I for example want to scrape recurring all new jobs that had been posted in the last week for a specific industry I would use the total_results and divide by 25 to get the number of pages to retrieve?
c
Yes, but i recommend you to divide by 500
g
Ok, so the max limit per page is 500?
c
yes
🙌 1
g
Thanks