SPOTIFY API

Playlist

Retrieve playlist from Spotify with a single API request.

GET/api/data/v1/spotify/playlist
1credit base cost

Request parameters

Up to 1 credit

Spotify playlist id. If you'd prefer to use the URL instead, you can use the url parameter instead.

Spotify playlist URL. If you'd prefer to use the id instead, you can use the id parameter instead.

Cursor returned by the previous response. Omit it for the first page.

Try in the console

Live requests use your prepaid balance. Cached responses cost zero where supported.

curl --request GET \
  --url 'https://fetchgoblin.com/api/data/v1/spotify/playlist?id=37i9dQZF1DX4UtSsGT1Sbe' \
  --header 'x-api-key: YOUR_FETCHGOBLIN_API_KEY'

Response

Example
{
  "success": true,
  "id": "37i9dQZF1DX4UtSsGT1Sbe",
  "uri": "spotify:playlist:37i9dQZF1DX4UtSsGT1Sbe",
  "__typename": "Playlist",
  "description": "The biggest songs of the 1980s. Cover: Madonna",
  "followers": 12016730,
  "images": [
    {
      "sources": [
        {
          "height": null,
          "url": "https://i.scdn.co/image/ab67706f00000002fb8e01f2c022ab1a32e2c5a0",
          "width": null
        }
      ]
    }
  ],
  "name": "All Out 80s",
  "ownerV2": {
    "__typename": "User",
    "name": "Spotify",
    "uri": "spotify:user:spotify",
    "username": "spotify"
  },
  "tracks": [
    {
      "id": "6r8k1vznHrzlEKYxL4dZEe",
      "uri": "spotify:track:6r8k1vznHrzlEKYxL4dZEe",
      "name": "La Isla Bonita",
      "albumOfTrack": {
        "name": "True Blue",
        "uri": "spotify:album:6fmnT17jc2Sc69q3nza1eD"
      },
      "artists": [
        {
          "profile": {
            "name": "Madonna"
          },
          "uri": "spotify:artist:6tbjWDEIzxoDsBA1FuhfPW"
        }
      ],
      "duration": {
        "totalMilliseconds": 242733
      },
      "playcount": 785646615
    }
  ],
  "cursor": 50,
  "totalCount": 150,
  "credits_charged": 1,
  "credits_remaining": 1000,
  "request_id": "00000000-0000-4000-8000-000000000000"
}
Example data from the API specification. Run a request to retrieve current data.

Response shape

This schema describes the documented data shape. Some platform fields may be absent or null. The response also includes your FetchGoblin request ID and current credit balance.

View JSON Schema +
{
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean"
    },
    "id": {
      "type": "string"
    },
    "uri": {
      "type": "string"
    },
    "__typename": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "followers": {
      "type": "integer"
    },
    "images": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "height": {
                  "type": [
                    "string",
                    "object",
                    "array",
                    "number",
                    "boolean",
                    "null"
                  ]
                },
                "url": {
                  "type": "string"
                },
                "width": {
                  "type": [
                    "string",
                    "object",
                    "array",
                    "number",
                    "boolean",
                    "null"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "name": {
      "type": "string"
    },
    "ownerV2": {
      "type": "object",
      "properties": {
        "__typename": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "uri": {
          "type": "string"
        },
        "username": {
          "type": "string"
        }
      }
    },
    "tracks": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "uri": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "albumOfTrack": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "uri": {
                "type": "string"
              }
            }
          },
          "artists": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "profile": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    }
                  }
                },
                "uri": {
                  "type": "string"
                }
              }
            }
          },
          "duration": {
            "type": "object",
            "properties": {
              "totalMilliseconds": {
                "type": "integer"
              }
            }
          },
          "playcount": {
            "type": "integer"
          }
        }
      }
    },
    "cursor": {
      "type": "integer"
    },
    "totalCount": {
      "type": "integer"
    },
    "credits_charged": {
      "type": "integer",
      "minimum": 0,
      "description": "FetchGoblin credits charged for this request."
    },
    "credits_remaining": {
      "type": "integer",
      "description": "Your FetchGoblin credit balance after this request."
    },
    "request_id": {
      "type": "string",
      "format": "uuid",
      "description": "FetchGoblin request identifier."
    }
  }
}
Spotify Playlist API | FetchGoblin