There are two special parameters called _limit and _offset, they allow you to paginate the results from the API.
Parameter | Description |
---|---|
_limit | Limits the number of rows returned |
_offset | Skips a number of rows before start reading the sheet |
Example:
Querying https://sheet.best/api/sheets/cf969697-682a-40e3-bad4-d54803eeeacf?_limit=2&_offset=1
will skip the first row, and return the next 2 rows.
Shorthand Alternative
If you want to return a single row, you can use the /<Row Index>
suffix.
This is similar to using the _limit=1&offset=<Row Index>
queryingstring.
Example of equivalent requests:
https://sheet.best/api/sheets/cf969697-682a-40e3-bad4-d54803eeeacf?_limit=1&_offset=2
https://sheet.best/api/sheets/cf969697-682a-40e3-bad4-d54803eeeacf/2
You can also use: /<Row Index Start>:<Row Index End>
instead of explicitly telling the _limit
and _offset
.
Example of equivalent requests:
https://sheet.best/api/sheets/cf969697-682a-40e3-bad4-d54803eeeacf/2:4
https://sheet.best/api/sheets/cf969697-682a-40e3-bad4-d54803eeeacf?_limit=2&_offset=2
_____________________
Shell
Python
Javascript
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article