Guides
Search Assets by Multiple Criteria
This guide shows you how to use the DAS API's searchAssets
method to find digital assets using multiple filters and criteria. This powerful method allows you to combine various parameters to create complex queries for finding specific assets.
Method 1: Basic Multi-Criteria Search
The searchAssets
method lets you combine multiple filters—for example, to find assets owned by a given wallet and created by a particular creator.
Method 2: Collection and Owner Search
Find assets from a specific collection owned by a particular wallet:
Method 3: Advanced Filtering with Multiple Conditions
Combine filters for complex queries. For example, find NFTs that:
• belong to a given collection
• are owned by a specific wallet
• are not frozen or compressed
• have a verified creator
• are sorted by creation date (descending)
and include collection metadata:
Tips and Best Practices
- Start simple: Begin with basic criteria and add complexity gradually
- Use Pagination: For large result sets, implement proper pagination
- Cache results: Store frequently accessed search results
- Combine filters wisely: Too many filters may return no results
- Handle empty results: Always check for empty result sets, but keep in mind that some assets may be hidden or not indexed yet
- Use Display Options: Include relevant display options for your use case
- Sort results: Use sorting to present data in meaningful ways
- Test queries: Verify your search criteria with known data
Next Steps
- Get All Tokens in a Collection - Retrieve all assets from a specific collection
- Get NFTs by Owner - Find all NFTs owned by a wallet
- Get Assets By Creator - Discover all tokens created by a specific wallet
Further Reading
- Get Assets By Creator - Discover all tokens created by a specific wallet
- Get All Tokens in a Collection - Retrieve all assets from a specific collection
- Find Compressed NFTs - Discover and work with compressed NFTs