All Projects → microlinkhq → spotify-url-info

microlinkhq / spotify-url-info

Licence: MIT License
Get metadata from Spotify URL.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to spotify-url-info

Ytmdl
A simple app to get songs from YouTube in mp3 format with artist name, album name etc from sources like iTunes, Spotify, LastFM, Deezer, Gaana etc.
Stars: ✭ 2,070 (+5988.24%)
Mutual labels:  metadata, spotify
Ytmdl Web V2
Web version of ytmdl. Allows downloading songs with metadata embedded from various sources like itunes, gaana, LastFM etc.
Stars: ✭ 398 (+1070.59%)
Mutual labels:  metadata, spotify
Spotiflyer
Spotify/Gaana/Youtube Music Downloader For Android!
Stars: ✭ 231 (+579.41%)
Mutual labels:  metadata, spotify
Savify
Download Spotify songs to mp3 with full metadata and cover art!
Stars: ✭ 227 (+567.65%)
Mutual labels:  metadata, spotify
pdftag
A simple metadata editor for PDFs for Linux and Windows
Stars: ✭ 48 (+41.18%)
Mutual labels:  metadata
QueryArrow
A semantically unified SQL and NoSQL query and update system
Stars: ✭ 17 (-50%)
Mutual labels:  metadata
nft.storage
😋 Free decentralized storage and bandwidth for NFTs on IPFS and Filecoin.
Stars: ✭ 309 (+808.82%)
Mutual labels:  metadata
postcss-font-grabber
A postcss plugin, it grabs remote font files and update your CSS, just like that.
Stars: ✭ 26 (-23.53%)
Mutual labels:  metadata
Quaggify
A spotify clone made in Swift 4 consuming the Spotify API
Stars: ✭ 30 (-11.76%)
Mutual labels:  spotify
Spotify-Cards-API
🚀 Unofficial Spotify PromoCards API
Stars: ✭ 13 (-61.76%)
Mutual labels:  spotify
parse-md
Parse Markdown file's metadata from its content
Stars: ✭ 15 (-55.88%)
Mutual labels:  metadata
isogeo-plugin-qgis
Isogeo plugin for QGIS
Stars: ✭ 13 (-61.76%)
Mutual labels:  metadata
Spotify-Song-Recommendation-ML
UC Berkeley team's submission for RecSys Challenge 2018
Stars: ✭ 70 (+105.88%)
Mutual labels:  spotify
169254
📟 A simple API that simulate AWS EC2's metadata endpoint
Stars: ✭ 15 (-55.88%)
Mutual labels:  metadata
spotify ad muter
No description or website provided.
Stars: ✭ 20 (-41.18%)
Mutual labels:  spotify
Developers-Playlist
A drop of musical taste from every contributor... Welcome to the developer's collaborative playlist.
Stars: ✭ 17 (-50%)
Mutual labels:  spotify
audnexus
An audiobook data aggregation API, combining multiple sources of data into one, consistent source.
Stars: ✭ 18 (-47.06%)
Mutual labels:  metadata
audius
🎧 A cross-platform app for downloading songs from YouTube and Spotify
Stars: ✭ 19 (-44.12%)
Mutual labels:  spotify
Easify-iOS
An iOS application to test out Spotify API. It uses SwiftUI and Combine.
Stars: ✭ 15 (-55.88%)
Mutual labels:  spotify
feast-java
Feast Java Components
Stars: ✭ 12 (-64.71%)
Mutual labels:  metadata
microlink logo

Last version Coverage Status NPM Status

Get metadata from Spotify URLs.

Install

npm install spotify-url-info

Usage

const { getData, getPreview, getTracks } = require('spotify-url-info')

There are two functions:

  • .getData: Provides the full available data, in a shape that is very similar to what the spotify API returns.
  • .getPreview: Always returns the same fields for different types of resources (album, artist, playlist, track). The preview track is the first in the Album, Playlist, etc.

Both take a spotify URL (play. or open.) as input and return a Promise.

getPreview('https://open.spotify.com/track/5nTtCOCds6I0PHMNtqelas')
  .then(data => console.log(data))

returns

{
  "title": "Immaterial",
  "type": "track",
  "track": "Immaterial",
  "artist": "SOPHIE",
  "image": "https://i.scdn.co/image/d6f496a6708d22a2f867e5acb84afb0eb0b07bc1",
  "audio": "https://p.scdn.co/mp3-preview/6be8eb12ff18ae09b7a6d38ff1e5327fd128a74e?cid=162b7dc01f3a4a2ca32ed3cec83d1e02",
  "link": "https://open.spotify.com/track/5nTtCOCds6I0PHMNtqelas",
  "embed": "https://embed.spotify.com/?uri=spotify:track:5nTtCOCds6I0PHMNtqelas",
  "date": "2018-06-15",
  "description": "description of a podcast episode"
}

The fields description and date will be undefined for some types of media that don't have this information.

getData('https://open.spotify.com/track/5nTtCOCds6I0PHMNtqelas')
  .then(data => console.log(data))

returns any raw data we can scrape from spotify. There are no guarantees about the shape of this data, because it varies with different media and scraping methods. Handle it carefully.

getTracks('https://open.spotify.com/playlist/3Q4cPwMHY95ZHXtmcU2xvH')
  .then(data => console.log(data))

Returns array with tracks. Below is array with an example track. This data is passed on straight from spotify, so the shape could change. Only the first 100 tracks will be returned.

[
  {
    "artists": [
      {
        "external_urls": {
          "spotify": "https://open.spotify.com/artist/5a2w2tgpLwv26BYJf2qYwu"
        },
        "href": "https://api.spotify.com/v1/artists/5a2w2tgpLwv26BYJf2qYwu",
        "id": "5a2w2tgpLwv26BYJf2qYwu",
        "name": "SOPHIE",
        "type": "artist",
        "uri": "spotify:artist:5a2w2tgpLwv26BYJf2qYwu"
      }
    ],
    "duration_ms": 188520,
    "episode": false,
    "explicit": false,
    "external_urls": {
      "spotify": "https://open.spotify.com/track/18yTgk0VgjB9XDj8h2q6Td"
    },
    "href": "https://api.spotify.com/v1/tracks/18yTgk0VgjB9XDj8h2q6Td",
    "id": "18yTgk0VgjB9XDj8h2q6Td",
    "name": "JUST LIKE WE NEVER SAID GOODBYE",
    "popularity": 34,
    "preview_url": "https://p.scdn.co/mp3-preview/d5790004de973f83756311075125ffc965e522c8?cid=a46f5c5745a14fbf826186da8da5ecc3",
    "type": "track",
    "uri": "spotify:track:18yTgk0VgjB9XDj8h2q6Td"
  }
]

License

spotify-url-info © microlink.io, released under the MIT License.
Authored by Karl Sander and maintained by Kiko Beats with help from contributors.

microlink.io · GitHub microlink.io · Twitter @microlinkhq

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].