Skip to content
Web APIReferences / Users / Get User's Top Items

Get User's Top Items

Get the current user's top artists or tracks based on calculated affinity.

Authorization scopes

Request

  • type
    string
    Required

    The type of entity to return. Valid values: artists or tracks

    Allowed values: "artists", "tracks"
  • time_range
    string

    Over what time frame the affinities are computed. Valid values: long_term (calculated from several years of data and including all new data as it becomes available), medium_term (approximately last 6 months), short_term (approximately last 4 weeks). Default: medium_term

    Example value: "medium_term"Default value: "medium_term"
  • limit
    integer

    The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.

    Example value: 10Default value: 20Range: 0 - 50
  • offset
    integer

    The index of the first item to return. Default: 0 (the first item). Use with limit to get the next set of items.

    Example value: 5Default value: 0

Response

Pages of artists or tracks

  • href
    string
    Required

    A link to the Web API endpoint returning the full result of the request

    Example value: "https://api.spotify.com/v1/me/shows?offset=0&limit=20"
  • limit
    integer
    Required

    The maximum number of items in the response (as set in the query or by default).

    Example value: 20
  • next
    string
    Required
    Nullable

    URL to the next page of items. ( null if none)

    Example value: "https://api.spotify.com/v1/me/shows?offset=1&limit=1"
  • offset
    integer
    Required

    The offset of the items returned (as set in the query or by default)

    Example value: 0
  • previous
    string
    Required
    Nullable

    URL to the previous page of items. ( null if none)

    Example value: "https://api.spotify.com/v1/me/shows?offset=1&limit=1"
  • total
    integer
    Required

    The total number of items available to return.

    Example value: 4
  • items
    array of oneOfs
    Required
    Will be one of the following: