📄 Pagination And DateTime filtering
Pagination is a method for breaking large sets of data into smaller, more manageable pages. The Questback Public API supports pagination using two parameters: skip and take. Certain endpoints also use, since and until parameters for datetime filtering.
🔢 Pagination with Skip and Take
Using skip and take allows you to loop through large datasets efficiently. The API limits responses to a maximum of 1000 items per request.
If the number of returned items is less than the take value, you’ve likely fetched the last page of results.
Skip
skip The number of items to bypass (or "skip") before returning the results.
Minimum value: 0
Examples:
skip=0retrieves results from the first item.skip=10skips the first 10 items and starts from the 11th.skip=-10❌ Invalid: negative values are not allowed.
Take
take The number of items to retrieve after skipping.
Minimum: 0, Maximum: 1000
Examples:
take=5returns 5 items following the skipped ones.take=1000returns 1000 items following the skipped ones.take=-50❌ Invalid: negative values are not allowed.
Example Requests Skip and Take
When you combine these parameters, you can navigate through your data in pages. For example:
- Retrieving the First Page - Fetch the first 10 items
GET https://api.questback.com/v1/resource?skip=0&take=10 - Retrieving the second Page - Fetch the next 10 items
GET https://api.questback.com/v1/resource?skip=10&take=10 - Custom Range - Fetch 5 items starting from and including the 21st item
GET https://api.questback.com/v1/resource?skip=20&take=5
⏱️ Filtering with Since and Until
For faster fetching it is smart to only fetch new items since last time you fetched data.
Using since and until parameters to reduce amount of items to fetch is recommended.
For efficient delta fetching, use since and until to retrieve only updated or newly created records within a time range.
Since
since (for specific endpoints)
Filters results based on a timestamp, returning only records created after the given time.
since=2025-01-01T00:00:00Zreturns records created since January 1, 2025.since=2233-03-22T00:00:00Z❌ Invalid: future dates are not allowed.
Until
until (for specific endpoints)
Filters results based on a timestamp, returning only records created before and including the given time.
since=2025-02-01T00:00:00Zreturns records created before February 1, 2025.since=2233-03-22T00:00:00Z❌ Invalid: future dates are not allowed.
Performance - Fetch new items
Use the until timestamp from the last fetch as the since value in your next request to only fetch new items.
❗ Use precise timestamps (including milliseconds).
❗ If the number of returned items equals take, there may be more to fetch — issue another request with increased skip.
Example requests
-
Day 1 First fetch, until is current datetime:
GET https://api.questback.com/v1/resource?skip=0&take=1000&until=2025-01-01T05:30:22.123Z - Day 2 – Next fetch, using
sincefrom the previousuntil:GET https://api.questback.com/v1/resource?skip=0&take=1000&since=2025-01-01T05:30:22.123Z&until=2025-01-02T05:30:14.345Z - Day 3 (1000 items returned) – More items may exist:
GET https://api.questback.com/v1/resource?skip=0&take=1000&since=2025-01-02T05:30:14.345Z&until=2025-01-03T05:30:42.823Z -
Day 3 Continued (next page) – Fetch remaining items:
GET https://api.questback.com/v1/resource?skip=1000&take=1000&since=2025-01-02T05:30:14.345Z&until=2025-01-03T05:30:42.823Z
. . .
Example Requests Since and Until
- Fetch records since Jan 1, 2025
GET https://api.questback.com/v1/resource?since=2025-01-01T00:00:00.000Z - Fetch records before Feb 1, 2025
GET https://api.questback.com/v1/resource?until=2025-02-01T00:00:00.000Z - Fetch records between Jan 1 and Feb 1, 2025
GET https://api.questback.com/v1/resource?since=2025-01-01T00:00:00.000Z&until=2025-02-01T00:00:00.000Z
Considerations
Bounds and Validation:
Ensure that the values for skip and take are within valid ranges:
- Negative values in
skiportakewill return a HTTP 400 Bad Request response - If
skipvalue exceed exceed the total number of available items, no items will be returned.
Summary
skip= how many items to bypass.take= how many items to return.since= filter items created after a timestamp.until= filter items created before (or equal to) a timestamp.
Use these parameters to build efficient, paginated, and delta-safe integrations.