๐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 TakeCopied!
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.
SkipCopied!
skip
The number of items to bypass (or "skip") before returning the results.
Minimum value: 0
Examples:
skip=0
retrieves results from the first item.skip=10
skips the first 10 items and starts from the 11th.skip=-10
โ Invalid: negative values are not allowed.
TakeCopied!
take
The number of items to retrieve after skipping.
Minimum: 0
, Maximum: 1000
Examples:
take=5
returns 5 items following the skipped ones.take=1000
returns 1000 items following the skipped ones.take=-50
โ Invalid: negative values are not allowed.
Example Requests Skip and TakeCopied!
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 UntilCopied!
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.
SinceCopied!
since
(for specific endpoints)
Filters results based on a timestamp, returning only records created after the given time.
since=2025-01-01T00:00:00Z
returns records created since January 1, 2025.since=2233-03-22T00:00:00Z
โ Invalid: future dates are not allowed.
UntilCopied!
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:00Z
returns records created before February 1, 2025.since=2233-03-22T00:00:00Z
โ Invalid: future dates are not allowed.
Performance - Fetch new itemsCopied!
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
since
from 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 UntilCopied!
- 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
ConsiderationsCopied!
Bounds and Validation:Copied!
Ensure that the values for skip
and take
are within valid ranges:
- Negative values in
skip
ortake
will return a HTTP 400 Bad Request response - If
skip
value exceed exceed the total number of available items, no items will be returned.
SummaryCopied!
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.