Skip to content

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.

EndpointGET /api/v2/search
Authkey
ReturnsSearchResponse
Retryableyes
Idempotentyes
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_mode
  • CrateAPIError — on a non-2xx response.