Overview
DAS API methods return up to 1,000 records per call. To retrieve more, you paginate — making multiple calls and crawling through pages of data. Helius supports two mechanisms: page-based and keyset pagination. Page-based pagination is the simplest way to get started. Keyset pagination is for advanced users querying across large (500k+) datasets efficiently.When to use this
- Page-based — static views, dashboards, and most everyday queries. Easy and intuitive.
- Keyset (cursor or range) — large datasets (entire collections, 500k+ assets) where page-based crawling becomes slow.
- Parallel keyset — the fastest option for scanning an entire collection by partitioning the address range.
Sorting options
You can sort results by different fields using thesortBy field:
| Value | Sorts by | Recommended? |
|---|---|---|
id | Asset ID in binary (default) | Yes |
created | Date the asset was created | Yes |
recent_action | Date the asset was last updated | No |
none | No sorting | No |
Page-based pagination
You specify the page number and the number of items per page. To move to the next page, increment the page number. This is easy, intuitive, and fast for most use cases.Example
Example
Keyset pagination
You define pages by providing conditions that filter the dataset. For example, “get me all assets with an ID > X but an ID < Y.” You traverse the entire dataset by modifying X or Y on each call. There are two methods of keyset pagination:- Cursor-based — easier to use but less flexible.
- Range-based — more complex but very flexible.
id.
Cursor-based
A DAS query without any pagination parameters returns a cursor. Pass the cursor back to the DAS API to continue from where you left off.Example
Example
Range-based
To query across a range, specifybefore and/or after. The query is essentially “get me all assets after X but before Y.” You traverse the dataset by updating the before or after parameter on each call.
Example
Example
Parallel querying with keysets (advanced)
Advanced users querying large datasets (for example, entire compressed NFT collections) should use keyset-based pagination for performance. The following example shows how to query in parallel by partitioning the Solana address range and using thebefore/after parameters. This method is fast, efficient, and safe.
Example
Example
In the example below, we scan the entire Tensorian collection (~10k records). It partitions the Solana address space into 8 ranges and scans those ranges concurrently. This is far faster than the other approaches.
Next steps
Search Assets
Filter assets by owner, collection, and tokenType.
Get Assets (NFTs)
Retrieve NFTs, collections, editions, and proofs.
DAS API reference
Full schemas for every DAS method.