Page Size
OptionalWhole number1–50.
50
Tracks the user played lately, newest first.
First, connect Spotify in Services. Then open Actions → + → Spotify and choose Get Recently Played Tracks.
Podcast episodes are not included. A track counts once it has played for more than 30 seconds. Use After or Before, not both, to look at a stretch of time; each takes a Unix time in milliseconds.
Open an input to choose its value. Keep a fixed value with Text, receive it from Shortcuts, ask when the action runs, or use an Earlier Step. Read how input sources work.
1–50.
50
Only tracks played after this Unix time in milliseconds.
1484811043508
Only tracks played before this Unix time in milliseconds. Use instead of After, not with it.
1484811043508
In the action editor, open Output → Returned Value to choose fields for your shortcut. These are the response fields described by the app; a service may omit an optional field or return an empty list. JSON File contains the full response.
| Returned field | Type | Meaning |
|---|---|---|
items | array | A list of values. |
items[].played_at | string | ISO 8601 timestamp. |
items[].track | object | A group of named values. |
items[].track.id | string | Text value. |
items[].track.name | string | Text value. |
items[].track.uri | string | Text value. |
items[].track.duration_ms | integer | Whole-number value. |
items[].track.artists | array | A list of values. |
items[].track.artists[].name | string | Text value. |
items[].track.album | object | A group of named values. |
items[].track.album.name | string | Text value. |
items[].track.album.images | array | A list of values. |
items[].track.album.images[].url | string | Text value. |
items[].context | object | The album, artist or playlist it played from, when there was one. |
items[].context.type | string | Text value. |
items[].context.uri | string | Text value. |
cursors | object | A group of named values. |
cursors.after | string | Text value. |
cursors.before | string | Pass to Before to get the page after this one. |
If the result is unexpected, open Logs in Shortcutify, select the run, and inspect this step’s inputs and response.
This action supports multiple pages of results. Open its Fetch setting to retrieve more pages when one page is not enough. Each page adds a service request.
Request: GET https://api.spotify.com/v1/me/player/recently-played
Action identifier: spotify.player.recentlyPlayed.list.v1
Permissions declared for this action: user-read-recently-played. The account’s own access rules also apply.
| Input | Request key | Location |
|---|---|---|
| Page Size | limit | query |
| After | after | query |
| Before | before | query |