You do it by changing the offset.
How to paginate data from a 3rd party api
I am working on a project where i get data from mediastack api, it is a news api.
when i fetch data from api it gives a json format with pagination object and data array containing different objects. By default the api limit is set to 25, means it only show 25 result with pagination object.
now how can i paginate the data help me
json snippet
"pagination": { "limit": 25, "offset": 0, "count": 25, "total": 6860 }, "data": [ { "author": "Reuters", "title": "'Pray floods don't kill us': A day on Rohingya's remote Bangladesh island", "description": "'Pray floods don't kill us': A day on Rohingya's remote Bangladesh island", "url": "https://www.investing.com/news/world-news/pray-floods-dont-kill-us-a-day-on-rohingyas-remote-bangladesh-island-2376819", "source": "Investing.com | Stock Market Quotes & Financial News", "image": "https://i-invdn-com.akamaized.net/trkd-images/LYNXMPEGBS0PQ_L.jpg", "category": "business", "language": "en", "country": "us", "published_at": "2020-12-29T14:50:19+00:00" },
Please or to participate in this conversation.