crate.search(params)
search(params?: SearchParams, opts?: RequestOptions): Promise<SearchResponse>Faceted discovery across the whole catalogue. Filter by genre, style, format, country, label and year range — each multi-value facet combines with AND or OR via its *_mode sibling. The response also tells you whether the total count is exact or estimated from a sample.
| Endpoint | GET /api/v2/search |
| Auth | key |
| Returns | SearchResponse |
| Retryable | yes |
| Idempotent | yes |
Example
Section titled “Example”const hits = await crate.search({ genre: ['idm', 'ambient'], genre_mode: 'or', year_from: 2000, limit: 20 });// → hits.results: ResultRow[]; hits.pagination.total_results / total_results_modeThrows
Section titled “Throws”CrateAPIError— on a non-2xx response.