Skip to content
Web APIReferences / Player / Get Currently Playing Track

Get Currently Playing Track

Get the object currently being played on the user's Spotify account.

Important policy notes
Authorization scopes

Request

  • market
    string

    An ISO 3166-1 alpha-2 country code. If a country code is specified, only content that is available in that market will be returned.
    If a valid user access token is specified in the request header, the country associated with the user account will take priority over this parameter.
    Note: If neither market or user country are provided, the content is considered unavailable for the client.
    Users can view the country that is associated with their account in the account settings.

    Example value: "ES"
  • additional_types
    string

    A comma-separated list of item types that your client supports besides the default track type. Valid types are: track and episode.
    Note: This parameter was introduced to allow existing clients to maintain their current behaviour and might be deprecated in the future.
    In addition to providing this parameter, make sure that your client properly handles cases of new types in the future by checking against the type field of each object.

Response

Information about the currently playing track

  • The device that is currently active.

    • id
      string
      Nullable

      The device ID.

    • is_active
      boolean

      If this device is the currently active device.

    • is_private_session
      boolean

      If this device is currently in a private session.

    • is_restricted
      boolean

      Whether controlling this device is restricted. At present if this is "true" then no Web API commands will be accepted by this device.

    • name
      string

      A human-readable name for the device. Some devices have a name that the user can configure (e.g. "Loudest speaker") and some devices have a generic name associated with the manufacturer or device model.

      Example value: "Kitchen speaker"
    • type
      string

      Device type, such as "computer", "smartphone" or "speaker".

      Example value: "computer"
    • volume_percent
      integer
      Nullable

      The current volume in percent.

      Example value: 59Range: 0 - 100
    • supports_volume
      boolean

      If this device can be used to set the volume.

  • repeat_state
    string

    off, track, context

  • shuffle_state
    boolean

    If shuffle is on or off.

  • A Context Object. Can be null.

    • type
      string

      The object type, e.g. "artist", "playlist", "album", "show".

    • href
      string

      A link to the Web API endpoint providing full details of the track.

    • External URLs for this context.

    • uri
      string

      The Spotify URI for the context.

  • timestamp
    integer

    Unix Millisecond Timestamp when data was fetched.

  • progress_ms
    integer

    Progress into the currently playing track or episode. Can be null.

  • is_playing
    boolean

    If something is currently playing, return true.

  • item
    oneOf

    The currently playing track or episode. Can be null.

    Will be one of the following:
  • currently_playing_type
    string

    The object type of the currently playing item. Can be one of track, episode, ad or unknown.

  • Allows to update the user interface based on which playback actions are available within the current context.

    • interrupting_playback
      boolean

      Interrupting playback. Optional field.

    • pausing
      boolean

      Pausing. Optional field.

    • resuming
      boolean

      Resuming. Optional field.

    • seeking
      boolean

      Seeking playback location. Optional field.

    • skipping_next
      boolean

      Skipping to the next context. Optional field.

    • skipping_prev
      boolean

      Skipping to the previous context. Optional field.

    • toggling_repeat_context
      boolean

      Toggling repeat context flag. Optional field.

    • toggling_shuffle
      boolean

      Toggling shuffle flag. Optional field.

    • toggling_repeat_track
      boolean

      Toggling repeat track flag. Optional field.

    • transferring_playback
      boolean

      Transfering playback between devices. Optional field.