Available in version 0.13.2 and later.
Filter endpoints
Each collection has a dedicated filter endpoint:Request format
Send a POST request with a JSON body containing your filters, sorting, and pagination options:Response format
The response format depends on whetherinclude_count is enabled.
Filter object
Each filter in thefilters array follows this structure:
Supported operators
Blnk provides a range of operators to match, compare, and filter your data precisely:Sorting
Control how results are ordered using thesort_by and sort_order parameters:
For information on which fields are indexed and how to add custom indexes, see Performance Tuning.
Pagination
Manage large result sets with pagination:Filterable fields
Each collection exposes specific fields you can filter on. Select a tab below to see the available fields for each collection.- Transactions
- Balances
- Ledgers
- Identities
Filtering metadata
To filter on custom metadata, use dot notation for the field name:Response
Error handling
Structured errors are available from Blnk Core 0.15.0 and later.
400 Bad Request with error_detail.code set to GEN_BAD_REQUEST. The error message includes details about the field, operator, or value that failed validation.
400 Bad Request
For the full error catalogue, see API error codes.
Best practices
- Use specific filters: The more specific your filters, the faster your queries. Combine multiple filters to narrow results.
- Paginate large results: Always use pagination when expecting many results. This improves performance and reduces response times.
-
Use
include_countsparingly: Only request counts when necessary, as it adds overhead on large datasets. -
Use appropriate operators: Use
eqfor exact matches,ilikefor case-insensitive searches, andinfor multiple values. - Consider Typesense for complex queries: For advanced operations like grouping, joins, or full-text search, consider using the Search API instead.
- Optimize indexes: For frequently filtered or sorted fields, ensure proper indexes are in place. See Performance Tuning for details.