Api Reference

Search Module

Search for any type of resource on Deezer.
const results = await deezer.search({ q: "Daft Punk" });

All search methods return a PaginationResult containing an array of data.

export interface PaginationResult<T> {
  data: T[];
  total?: number;
  next?: () => Promise<PaginationResult<T>>;
  prev?: () => Promise<PaginationResult<T>>;
}

Limit your search to a specific type. All methods return a PaginationResult containing an array of specific resource types.

These methods accept either a plain query string or a SearchBuilder instance.

// Using a string
await deezer.search.artist({ q: "Daft Punk" });

// Using the builder
const builder = deezer.search.builder("Daft Punk").strict();
await deezer.search.artist({ q: builder });

// All specialized methods share this signature:
await deezer.search.artist({ q, order, limit, index, strict });

Search Builder

For complex queries, use the builder():

const query = deezer.search.builder("Daft Punk")
  .album("Discovery")
  .strict()
  .build();

const results = await deezer.search({ q: query });

Builder Methods

  • .artist(name): Filter by artist.
  • .album(title): Filter by album.
  • .track(title): Filter by track.
  • .label(name): Filter by label.
  • .durMin(seconds) / .durMax(seconds): Filter by duration.
  • .bpmMin(val) / .bpmMax(val): Filter by BPM.
  • .strict(): Enable strict matching.
  • .order(order): Set sorting order.
Copyright © 2026