← Spotify

Get a Track with Spotify API

Pipedream makes it easy to connect APIs for Spotify and 2,000+ other apps remarkably fast.

Trigger workflow on
HTTP requests, schedules and app events
Next, do this
Get a Track with the Spotify API
No credit card required
Intro to Pipedream
Watch us build a workflow
Watch us build a workflow
4 min
Watch now ➜

Trusted by 800,000+ developers from startups to Fortune 500 companies

Adyen logo
Appcues logo
Bandwidth logo
Checkr logo
ChartMogul logo
Dataminr logo
Gopuff logo
Gorgias logo
LinkedIn logo
Logitech logo
Replicated logo
Rudderstack logo
SAS logo
Scale AI logo
Webflow logo
Warner Bros. logo
Adyen logo
Appcues logo
Bandwidth logo
Checkr logo
ChartMogul logo
Dataminr logo
Gopuff logo
Gorgias logo
LinkedIn logo
Logitech logo
Replicated logo
Rudderstack logo
SAS logo
Scale AI logo
Webflow logo
Warner Bros. logo

Developers Pipedream

Getting Started

Create a workflow to Get a Track with the Spotify API. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Configure the Get a Track action
    1. Connect your Spotify account
    2. Select a Track ID
    3. Optional- Select a Market
  2. Select a trigger to run your workflow on HTTP requests, schedules or app events
  3. Deploy the workflow
  4. Send a test event to validate your setup
  5. Turn on the trigger

Integrations

Get a Track with Spotify API on New Requests (Payload Only) from HTTP / Webhook API
HTTP / Webhook + Spotify
 
Try it
Get a Track with Spotify API on New Submission from Typeform API
Typeform + Spotify
 
Try it
Get a Track with Spotify API on Custom Events from Zoom API
Zoom + Spotify
 
Try it
Get a Track with Spotify API on New Submission (Instant) from Jotform API
Jotform + Spotify
 
Try it
Get a Track with Spotify API on New Custom Webhook Events from Stripe API
Stripe + Spotify
 
Try it

Details

This is a pre-built, source-available component from Pipedream's GitHub repo. The component is developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

Get a Track on Spotify
Description:Get a track by its name or ID. [See the docs here](https://developer.spotify.com/documentation/web-api/reference/#/operations/search)
Version:0.1.1
Key:spotify-get-track

Code

import { axios } from "@pipedream/platform";
import get from "lodash/get.js";
import spotify from "../../spotify.app.mjs";

export default {
  name: "Get a Track",
  description: "Get a track by its name or ID. [See the docs here](https://developer.spotify.com/documentation/web-api/reference/#/operations/search)",
  key: "spotify-get-track",
  version: "0.1.1",
  type: "action",
  props: {
    spotify,
    trackId: {
      propDefinition: [
        spotify,
        "trackId",
      ],
    },
    market: {
      propDefinition: [
        spotify,
        "market",
      ],
      optional: true,
    },
  },
  async run({ $ }) {
    const {
      trackId,
      market,
    } = this;

    const res = await axios($, this.spotify._getAxiosParams({
      method: "GET",
      path: `/tracks/${get(trackId, "value", trackId)}`,
      params: {
        market,
      },
    }));

    $.export("$summary", `Successfully fetched info for the track, "${res.name}"`);

    return res;
  },
};

Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
LabelPropTypeDescription
SpotifyspotifyappThis component uses the Spotify app.
Track IDtrackIdstringSelect a value from the drop down menu.
MarketmarketstringSelect a value from the drop down menu:{ "label": "Andorra", "value": "AD" }{ "label": "United Arab Emirates", "value": "AE" }{ "label": "Afghanistan", "value": "AF" }{ "label": "Antigua and Barbuda", "value": "AG" }{ "label": "Anguilla", "value": "AI" }{ "label": "Albania", "value": "AL" }{ "label": "Armenia", "value": "AM" }{ "label": "Angola", "value": "AO" }{ "label": "Antarctica", "value": "AQ" }{ "label": "Argentina", "value": "AR" }{ "label": "American Samoa", "value": "AS" }{ "label": "Austria", "value": "AT" }{ "label": "Australia", "value": "AU" }{ "label": "Aruba", "value": "AW" }{ "label": "Åland Islands", "value": "AX" }{ "label": "Azerbaijan", "value": "AZ" }{ "label": "Bosnia and Herzegovina", "value": "BA" }{ "label": "Barbados", "value": "BB" }{ "label": "Bangladesh", "value": "BD" }{ "label": "Belgium", "value": "BE" }{ "label": "Burkina Faso", "value": "BF" }{ "label": "Bulgaria", "value": "BG" }{ "label": "Bahrain", "value": "BH" }{ "label": "Burundi", "value": "BI" }{ "label": "Benin", "value": "BJ" }{ "label": "Saint Barthélemy", "value": "BL" }{ "label": "Bermuda", "value": "BM" }{ "label": "Brunei Darussalam", "value": "BN" }{ "label": "Bolivia (Plurinational State of)", "value": "BO" }{ "label": "Bonaire, Sint Eustatius and Saba", "value": "BQ" }{ "label": "Brazil", "value": "BR" }{ "label": "Bahamas", "value": "BS" }{ "label": "Bhutan", "value": "BT" }{ "label": "Bouvet Island", "value": "BV" }{ "label": "Botswana", "value": "BW" }{ "label": "Belarus", "value": "BY" }{ "label": "Belize", "value": "BZ" }{ "label": "Canada", "value": "CA" }{ "label": "Cocos (Keeling) Islands", "value": "CC" }{ "label": "Congo, Democratic Republic of the", "value": "CD" }{ "label": "Central African Republic", "value": "CF" }{ "label": "Congo", "value": "CG" }{ "label": "Switzerland", "value": "CH" }{ "label": "Côte d'Ivoire", "value": "CI" }{ "label": "Cook Islands", "value": "CK" }{ "label": "Chile", "value": "CL" }{ "label": "Cameroon", "value": "CM" }{ "label": "China", "value": "CN" }{ "label": "Colombia", "value": "CO" }{ "label": "Costa Rica", "value": "CR" }{ "label": "Cuba", "value": "CU" }{ "label": "Cabo Verde", "value": "CV" }{ "label": "Curaçao", "value": "CW" }{ "label": "Christmas Island", "value": "CX" }{ "label": "Cyprus", "value": "CY" }{ "label": "Czechia", "value": "CZ" }{ "label": "Germany", "value": "DE" }{ "label": "Djibouti", "value": "DJ" }{ "label": "Denmark", "value": "DK" }{ "label": "Dominica", "value": "DM" }{ "label": "Dominican Republic", "value": "DO" }{ "label": "Algeria", "value": "DZ" }{ "label": "Ecuador", "value": "EC" }{ "label": "Estonia", "value": "EE" }{ "label": "Egypt", "value": "EG" }{ "label": "Western Sahara", "value": "EH" }{ "label": "Eritrea", "value": "ER" }{ "label": "Spain", "value": "ES" }{ "label": "Ethiopia", "value": "ET" }{ "label": "Finland", "value": "FI" }{ "label": "Fiji", "value": "FJ" }{ "label": "Falkland Islands (Malvinas)", "value": "FK" }{ "label": "Micronesia (Federated States of)", "value": "FM" }{ "label": "Faroe Islands", "value": "FO" }{ "label": "France", "value": "FR" }{ "label": "Gabon", "value": "GA" }{ "label": "United Kingdom of Great Britain and Northern Ireland", "value": "GB" }{ "label": "Grenada", "value": "GD" }{ "label": "Georgia", "value": "GE" }{ "label": "French Guiana", "value": "GF" }{ "label": "Guernsey", "value": "GG" }{ "label": "Ghana", "value": "GH" }{ "label": "Gibraltar", "value": "GI" }{ "label": "Greenland", "value": "GL" }{ "label": "Gambia", "value": "GM" }{ "label": "Guinea", "value": "GN" }{ "label": "Guadeloupe", "value": "GP" }{ "label": "Equatorial Guinea", "value": "GQ" }{ "label": "Greece", "value": "GR" }{ "label": "South Georgia and the South Sandwich Islands", "value": "GS" }{ "label": "Guatemala", "value": "GT" }{ "label": "Guam", "value": "GU" }{ "label": "Guinea-Bissau", "value": "GW" }{ "label": "Guyana", "value": "GY" }{ "label": "Hong Kong", "value": "HK" }{ "label": "Heard Island and McDonald Islands", "value": "HM" }{ "label": "Honduras", "value": "HN" }{ "label": "Croatia", "value": "HR" }{ "label": "Haiti", "value": "HT" }{ "label": "Hungary", "value": "HU" }{ "label": "Indonesia", "value": "ID" }{ "label": "Ireland", "value": "IE" }{ "label": "Israel", "value": "IL" }{ "label": "Isle of Man", "value": "IM" }{ "label": "India", "value": "IN" }{ "label": "British Indian Ocean Territory", "value": "IO" }{ "label": "Iraq", "value": "IQ" }{ "label": "Iran (Islamic Republic of)", "value": "IR" }{ "label": "Iceland", "value": "IS" }{ "label": "Italy", "value": "IT" }{ "label": "Jersey", "value": "JE" }{ "label": "Jamaica", "value": "JM" }{ "label": "Jordan", "value": "JO" }{ "label": "Japan", "value": "JP" }{ "label": "Kenya", "value": "KE" }{ "label": "Kyrgyzstan", "value": "KG" }{ "label": "Cambodia", "value": "KH" }{ "label": "Kiribati", "value": "KI" }{ "label": "Comoros", "value": "KM" }{ "label": "Saint Kitts and Nevis", "value": "KN" }{ "label": "Korea (Democratic People's Republic of)", "value": "KP" }{ "label": "Korea, Republic of", "value": "KR" }{ "label": "Kuwait", "value": "KW" }{ "label": "Cayman Islands", "value": "KY" }{ "label": "Kazakhstan", "value": "KZ" }{ "label": "Lao People's Democratic Republic", "value": "LA" }{ "label": "Lebanon", "value": "LB" }{ "label": "Saint Lucia", "value": "LC" }{ "label": "Liechtenstein", "value": "LI" }{ "label": "Sri Lanka", "value": "LK" }{ "label": "Liberia", "value": "LR" }{ "label": "Lesotho", "value": "LS" }{ "label": "Lithuania", "value": "LT" }{ "label": "Luxembourg", "value": "LU" }{ "label": "Latvia", "value": "LV" }{ "label": "Libya", "value": "LY" }{ "label": "Morocco", "value": "MA" }{ "label": "Monaco", "value": "MC" }{ "label": "Moldova, Republic of", "value": "MD" }{ "label": "Montenegro", "value": "ME" }{ "label": "Saint Martin (French part)", "value": "MF" }{ "label": "Madagascar", "value": "MG" }{ "label": "Marshall Islands", "value": "MH" }{ "label": "North Macedonia", "value": "MK" }{ "label": "Mali", "value": "ML" }{ "label": "Myanmar", "value": "MM" }{ "label": "Mongolia", "value": "MN" }{ "label": "Macao", "value": "MO" }{ "label": "Northern Mariana Islands", "value": "MP" }{ "label": "Martinique", "value": "MQ" }{ "label": "Mauritania", "value": "MR" }{ "label": "Montserrat", "value": "MS" }{ "label": "Malta", "value": "MT" }{ "label": "Mauritius", "value": "MU" }{ "label": "Maldives", "value": "MV" }{ "label": "Malawi", "value": "MW" }{ "label": "Mexico", "value": "MX" }{ "label": "Malaysia", "value": "MY" }{ "label": "Mozambique", "value": "MZ" }{ "label": "Namibia", "value": "NA" }{ "label": "New Caledonia", "value": "NC" }{ "label": "Niger", "value": "NE" }{ "label": "Norfolk Island", "value": "NF" }{ "label": "Nigeria", "value": "NG" }{ "label": "Nicaragua", "value": "NI" }{ "label": "Netherlands", "value": "NL" }{ "label": "Norway", "value": "NO" }{ "label": "Nepal", "value": "NP" }{ "label": "Nauru", "value": "NR" }{ "label": "Niue", "value": "NU" }{ "label": "New Zealand", "value": "NZ" }{ "label": "Oman", "value": "OM" }{ "label": "Panama", "value": "PA" }{ "label": "Peru", "value": "PE" }{ "label": "French Polynesia", "value": "PF" }{ "label": "Papua New Guinea", "value": "PG" }{ "label": "Philippines", "value": "PH" }{ "label": "Pakistan", "value": "PK" }{ "label": "Poland", "value": "PL" }{ "label": "Saint Pierre and Miquelon", "value": "PM" }{ "label": "Pitcairn", "value": "PN" }{ "label": "Puerto Rico", "value": "PR" }{ "label": "Palestine, State of", "value": "PS" }{ "label": "Portugal", "value": "PT" }{ "label": "Palau", "value": "PW" }{ "label": "Paraguay", "value": "PY" }{ "label": "Qatar", "value": "QA" }{ "label": "Réunion", "value": "RE" }{ "label": "Romania", "value": "RO" }{ "label": "Serbia", "value": "RS" }{ "label": "Russian Federation", "value": "RU" }{ "label": "Rwanda", "value": "RW" }{ "label": "Saudi Arabia", "value": "SA" }{ "label": "Solomon Islands", "value": "SB" }{ "label": "Seychelles", "value": "SC" }{ "label": "Sudan", "value": "SD" }{ "label": "Sweden", "value": "SE" }{ "label": "Singapore", "value": "SG" }{ "label": "Saint Helena, Ascension and Tristan da Cunha", "value": "SH" }{ "label": "Slovenia", "value": "SI" }{ "label": "Svalbard and Jan Mayen", "value": "SJ" }{ "label": "Slovakia", "value": "SK" }{ "label": "Sierra Leone", "value": "SL" }{ "label": "San Marino", "value": "SM" }{ "label": "Senegal", "value": "SN" }{ "label": "Somalia", "value": "SO" }{ "label": "Suriname", "value": "SR" }{ "label": "South Sudan", "value": "SS" }{ "label": "Sao Tome and Principe", "value": "ST" }{ "label": "El Salvador", "value": "SV" }{ "label": "Sint Maarten (Dutch part)", "value": "SX" }{ "label": "Syrian Arab Republic", "value": "SY" }{ "label": "Eswatini", "value": "SZ" }{ "label": "Turks and Caicos Islands", "value": "TC" }{ "label": "Chad", "value": "TD" }{ "label": "French Southern Territories", "value": "TF" }{ "label": "Togo", "value": "TG" }{ "label": "Thailand", "value": "TH" }{ "label": "Tajikistan", "value": "TJ" }{ "label": "Tokelau", "value": "TK" }{ "label": "Timor-Leste", "value": "TL" }{ "label": "Turkmenistan", "value": "TM" }{ "label": "Tunisia", "value": "TN" }{ "label": "Tonga", "value": "TO" }{ "label": "Turkey", "value": "TR" }{ "label": "Trinidad and Tobago", "value": "TT" }{ "label": "Tuvalu", "value": "TV" }{ "label": "Taiwan, Province of China", "value": "TW" }{ "label": "Tanzania, United Republic of", "value": "TZ" }{ "label": "Ukraine", "value": "UA" }{ "label": "Uganda", "value": "UG" }{ "label": "United States Minor Outlying Islands", "value": "UM" }{ "label": "United States of America", "value": "US" }{ "label": "Uruguay", "value": "UY" }{ "label": "Uzbekistan", "value": "UZ" }{ "label": "Holy See", "value": "VA" }{ "label": "Saint Vincent and the Grenadines", "value": "VC" }{ "label": "Venezuela (Bolivarian Republic of)", "value": "VE" }{ "label": "Virgin Islands (British)", "value": "VG" }{ "label": "Virgin Islands (U.S.)", "value": "VI" }{ "label": "Viet Nam", "value": "VN" }{ "label": "Vanuatu", "value": "VU" }{ "label": "Wallis and Futuna", "value": "WF" }{ "label": "Samoa", "value": "WS" }{ "label": "Yemen", "value": "YE" }{ "label": "Mayotte", "value": "YT" }{ "label": "South Africa", "value": "ZA" }{ "label": "Zambia", "value": "ZM" }{ "label": "Zimbabwe", "value": "ZW" }

Authentication

Spotify uses OAuth authentication. When you connect your Spotify account, Pipedream will open a popup window where you can sign into Spotify and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Spotify API.

Pipedream requests the following authorization scopes when you connect your account:

playlist-read-collaborativeplaylist-modify-privateplaylist-modify-publicplaylist-read-privateuser-modify-playback-stateuser-read-currently-playinguser-read-playback-stateuser-read-privateuser-read-emailuser-library-modifyuser-library-readuser-follow-modifyuser-follow-readuser-read-recently-playeduser-top-readstreamingapp-remote-controlugc-image-uploaduser-read-playback-position

About Spotify

Spotify is a digital music service that gives you access to millions of songs.

More Ways to Use Spotify

Triggers

New Playlist from the Spotify API

Emit new event when a new playlist is created or followed by the current Spotify user.

 
Try it
New Saved Track from the Spotify API

Emit new event for each new track saved to the current Spotify user's Music Library.

 
Try it
New Track by Artist from the Spotify API

Emit new event for each new Spotify track related with an artist. see docs here

 
Try it
New Track in Playlist from the Spotify API

Emit new event for each new Spotify track added to a playlist

 
Try it

Actions

Add Items to a Playlist with the Spotify API

Add one or more items to a user’s playlist. See the docs here.

 
Try it
Create a Playlist with the Spotify API

Create a playlist for a Spotify user. The playlist will be empty until you add tracks. See the docs here.

 
Try it
Get a Category's Playlists with the Spotify API

Get a list of Spotify playlists tagged with a particular category. See the docs here.

 
Try it
Get a Playlist with the Spotify API

Get a playlist owned by a Spotify user. See the documentation.

 
Try it
Get a Playlist's Items with the Spotify API

Get full details of the items of a playlist owned by a Spotify user. See the docs here.

 
Try it

Explore Other Apps

1
-
24
of
2,000+
apps by most popular

HTTP / Webhook
HTTP / Webhook
Get a unique URL where you can send HTTP or webhook requests
Notion
Notion
Notion is a new tool that blends your everyday work apps into one. It's the all-in-one workspace for you and your team.
OpenAI (ChatGPT)
OpenAI (ChatGPT)
OpenAI is an AI research and deployment company with the mission to ensure that artificial general intelligence benefits all of humanity. They are the makers of popular models like ChatGPT, DALL-E, and Whisper.
Schedule
Schedule
Trigger workflows on an interval or cron schedule.
Google Drive
Google Drive
Google Drive is a file storage and synchronization service which allows you to create and share your work online, and access your documents from anywhere.
Google Sheets
Google Sheets
Use Google Sheets to create and edit online spreadsheets. Get insights together with secure sharing in real-time and from any device.
Filter
Filter
Specify a condition that your workflow must meet and whether you'd like to proceed or end workflow execution.
Python
Python
Anything you can do in Python can be done in a Pipedream Workflow. This includes using any of the 350,000+ PyPi packages available in your Python powered workflows.
Slack
Slack
Slack is a channel-based messaging platform. With Slack, people can work together more effectively, connect all their software tools and services, and find the information they need to do their best work — all within a secure, enterprise-grade environment.
Data Stores
Data Stores
Use Pipedream Data Stores to manage state throughout your workflows.
GitHub
GitHub
Where the world builds software. Millions of developers and companies build, ship, and maintain their software on GitHub—the largest and most advanced development platform in the world.
Formatting
Formatting
Pre-built actions to make formatting and manipulating data within your workflows easier.
Node
Node
Anything you can do with Node.js, you can do in a Pipedream workflow. This includes using most of npm's 400,000+ packages.
Airtable (OAuth)
Airtable (OAuth)
Airtable is a low-code platform to build next-gen apps. Move beyond rigid tools, operationalize your critical data, and reimagine workflows with AI.
Zoom
Zoom
Zoom is the leader in modern enterprise video communications, with an easy, reliable cloud platform for video and audio conferencing, chat, and webinars.
Google Calendar
Google Calendar
With Google Calendar, you can quickly schedule meetings and events and get reminders about upcoming activities, so you always know what’s next.
Gmail
Gmail
Gmail offers private and secure email by Google at no cost, for business and consumer accounts.
Gmail (Developer App)
Gmail (Developer App)
Private and secure email by Google at no cost, for business and consumer accounts. Use this app to connect your own developer account credentials.
Email
Email
Trigger workflows on new emails, and send emails to yourself as part of a Pipedream workflow.
Delay
Delay
Delay, pause, suspend, or have the execution of your workflow wait for as little as one millisecond, or as long as one year.
Go
Go
Anything you can do in Go, you can do in a Pipedream Workflow. You can use any of Go packages available with a simple import.
Premium
Zoom Admin
Zoom Admin
Video conferencing (includes account-level scopes) for Zoom Admins.
Twilio
Twilio
Twilio is a cloud communications platform for building SMS, Voice & Messaging applications on an API built for global scale.
Bash
Bash
Run any Bash in a Pipedream step within your workflow, including making curl requests.