Forum Discussion
How to fetch data page by page from API
PhilipTreacy Kindly help. Im really in need of help here.
I looked at their documentation. Note that you can return 100 records per call instead of the default 10. Use &max=100 in your url. Also, i don't see mention of "top", so you may need to use "max" in place of that in your web calls. Also, why are you using top/max in your count call?
Regards,
Pat
- LP28035 years agoResponsive Resident
mahoneypat Hi, First of all thanks a bunch for taking a look at this.
Yes. the documentation says i can fetch 100 records at a time with parameter &max=100.
I can also provide &offset=1 (1 is the page number 1) to fetch the records based on the pagenumbers.
However, I being an anlyst require all the data in PowerBI to analyse it. So I need every record from the dataset. so im trying to make API Calls with pagination. I searched online and got this snippet of code and I tried to modify it to my requirement. Still, I dont have idea about few lines in this code as what they actually do (im so naive sorry about it).
It would be really helpful if you could help me to modify this code and help me to fetch all the data.
Please please help.