Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • BrowseApi

Index

Constructors

constructor

Properties

Private http

http: Http

Methods

getAvailableGenreSeeds

  • getAvailableGenreSeeds(): Promise<string[]>
  • Retrieve a list of available genres seed parameter values for recommendations.

    Required Scopes: None.

    example
    console.log(await spotify.browse.getAvailableGenreSeeds());
    // Array [ "acoustic", "afrobeat", ... ]

    Returns Promise<string[]>

getCategories

  • Get a list of categories used to tag items in Spotify (on, for example, the Spotify player's "Browse" tab).

    Required Scopes: None.

    example
    const categories = await spotify.browse.getCategories();
    console.log(categories.items.map(category => category.name));
    // Array [ "Top Lists", "Black History Is Now", ... ]

    Parameters

    Returns Promise<Paging<Category>>

getCategory

  • Get a single category used to tag items in Spotify (on, for example, the Spotify player's "Browse" tab).

    Required Scopes: None.

    example
    const category = await spotify.browse.getCategory('at_home');
    console.log(category.name);
    // "At Home"

    Parameters

    • categoryId: string

      The Spotify category ID for the category.

    • Optional options: GetCategoryOptions

      Optional request information.

    Returns Promise<Category>

getCategoryPlaylists

  • Get a list of Spotify playlists tagged with a particular category.

    Required Scopes: None.

    example
    const playlists = await spotify.browse.getCategoryPlaylists('sleep');
    console.log(playlists.items.map(playlist => playlist.name));
    // Array [ "Sleep", "Deep Sleep", "Night Rain", ... ]

    Parameters

    • categoryId: string

      The Spotify category ID for the category.

    • Optional options: GetCategoryPlaylistsOptions

      Optional request information.

    Returns Promise<Paging<SimplifiedPlaylist>>

getFeaturedPlaylists

getNewReleases

  • Get a list of new album releases featured in Spotify (shown, for example, on a Spotify player's "Browse" tab).

    Required Scopes: None.

    example
    const releases = await spotify.browse.getNewReleases();
    console.log(releases.items.map(release => release.name));
    // Array [ "POPSTAR (feat. Drake)", "Brightest Blue", ... ]

    Parameters

    Returns Promise<Paging<SimplifiedAlbum>>

getRecommendations

  • Create a playlist-style listening experience based on seed artists, tracks, and genres.

    Recommendations are generated based on the available information for a given seed entity and matched against similar artists and tracks. If there is sufficient information about the provided seeds, a list of tracks will be returned together with pool size details.

    For artists and tracks that are very new or obscure there might not be enough data to generate a list of tracks.

    Required Scopes: None.

    example
    const recommendations = await spotify.browse.getRecommendations({
      seed_artists: ['5LhTec3c7dcqBvpLRWbMcf', '0IVcLMMbm05VIjnzPkGCyp'],
    });
    console.log(recommendations.tracks.map(track => track.name));
    // [ "J's Day Theme #3 (Support)", "People", "Guv'nor", ... ]

    Parameters

    Returns Promise<GetRecommendationsResponse>

Generated using TypeDoc