{"id":21430073,"url":"https://github.com/luuk-dev/spotify-info","last_synced_at":"2026-05-19T00:36:16.503Z","repository":{"id":65810214,"uuid":"600416697","full_name":"Luuk-Dev/Spotify-Info","owner":"Luuk-Dev","description":"A library to receive information about Spotify songs.","archived":false,"fork":false,"pushed_at":"2023-10-24T13:05:01.000Z","size":126,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-25T00:02:31.501Z","etag":null,"topics":["album","albums","api","api-rest","artist","artists","info","information","nodejs","playlist","playlists","scrape","scraper","search","song","songs","spotify","token","track","tracks"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Luuk-Dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-02-11T12:33:08.000Z","updated_at":"2023-03-31T18:35:27.000Z","dependencies_parsed_at":"2023-09-29T00:10:32.120Z","dependency_job_id":"cdb9eb29-5261-4f3c-90b2-0b1275bb584d","html_url":"https://github.com/Luuk-Dev/Spotify-Info","commit_stats":{"total_commits":84,"total_committers":1,"mean_commits":84.0,"dds":0.0,"last_synced_commit":"4a6b2eb62df34f08c2e89d0b80682ed40a6d879e"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luuk-Dev%2FSpotify-Info","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luuk-Dev%2FSpotify-Info/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luuk-Dev%2FSpotify-Info/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luuk-Dev%2FSpotify-Info/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Luuk-Dev","download_url":"https://codeload.github.com/Luuk-Dev/Spotify-Info/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243940063,"owners_count":20372044,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["album","albums","api","api-rest","artist","artists","info","information","nodejs","playlist","playlists","scrape","scraper","search","song","songs","spotify","token","track","tracks"],"created_at":"2024-11-22T22:20:33.841Z","updated_at":"2026-05-19T00:36:16.449Z","avatar_url":"https://github.com/Luuk-Dev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spotify Info\nA library to receive information about Spotify songs and playlists with and without using the API.\n\n## Table of contents:\n\u003cdiv style=\"border: 1px solid gray; padding: 4px;\"\u003e\n    \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#validate-urls\"\u003eValidate Spotify url's\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#get-information-with-the-spotify-api\"\u003eGet information with the Spotify API\u003c/a\u003e\u003c/li\u003e\n        \u003cul\u003e\n            \u003cli\u003e\u003ca href=\"#get-song-information\"\u003eGet information about songs\u003c/a\u003e\u003c/li\u003e\n            \u003cli\u003e\u003ca href=\"#get-playlist-information\"\u003eGet information about playlists\u003c/a\u003e\u003c/li\u003e\n            \u003cli\u003e\u003ca href=\"#get-album-information\"\u003eGet information about albums\u003c/a\u003e\u003c/li\u003e\n            \u003cli\u003e\u003ca href=\"#get-artist-information\"\u003eGet information about artists\u003c/a\u003e\u003c/li\u003e\n            \u003cli\u003e\u003ca href=\"#get-user-information\"\u003eGet information about users\u003c/a\u003e\u003c/li\u003e\n            \u003cli\u003e\u003ca href=\"#search\"\u003eSearch for songs, playlists, albums and artists\u003c/a\u003e\u003c/li\u003e\n        \u003c/ul\u003e\n        \u003cli\u003e\u003ca href=\"#get-information-without-the-spotify-api\"\u003eGet information without the Spotify API\u003c/a\u003e\n        \u003cul\u003e\n            \u003cli\u003e\u003ca href=\"#get-song-information-1\"\u003eGet information about songs\u003c/a\u003e\u003c/li\u003e\n            \u003cli\u003e\u003ca href=\"#get-playlist-information-1\"\u003eGet information about playlists\u003c/a\u003e\u003c/li\u003e\n            \u003cli\u003e\u003ca href=\"#get-album-information-1\"\u003eGet information about albums\u003c/a\u003e\u003c/li\u003e\n        \u003c/ul\u003e\n    \u003c/ul\u003e\n\u003c/div\u003e\n\n## Validate url's\nTo validate a Spotify url, you can use different functions, depending on the type of url you would like to validate. The available functions are:\n* `validateSpotifyURL`: Checks whether the url is Spotify URL or not\n* `validateTrackURL`: Checks whether the url is from a song on Spotify or not\n* `validateArtistURL`: Checks whether the url is from an artist on Spotify or not\n* `validateAlbumURL`: Checks whether the url is from an album on Spotify or not\n* `validatePlaylistURL`: Checks whether the url is from a playlist on Spotify or not\n\nIf the url is valid, the function will return `true`, if not, the function will return `false`.\n\n```js\nconst spotifyInfo = require('spotify-info');\n\nconsole.log(spotifyInfo.validateSpotifyURL('https://open.spotify.com/playlist/5pI2mpzVD945Ni9aEB1veE')); // Returns true\n\nconsole.log(spotifyInfo.validateTrackURL('https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT')) // Returns true\n\nconsole.log(spotifyInfo.validateArtistURL('https://open.spotify.com/artist/0gxyHStUsqpMadRV0Di1Qt')) // Returns true\n\nconsole.log(spotifyInfo.validateAlbumURL('https://open.spotify.com/album/5Z9iiGl2FcIfa3BMiv6OIw')) // Returns true\n\nconsole.log(spotifyInfo.validatePlaylistURL('https://open.spotify.com/playlist/5pI2mpzVD945Ni9aEB1veE')) // Returns true\n```\n\n## Get information with the Spotify API\nThe Spotify Info package allows you since the release of version 1.0.8 to use the Spotify API to receive information about songs, playlists, albums and artists. The Spotify API provides more information, is faster and has less risks of unable to functionate than the scrape functions. To make use of the you need a client id and client secret. These credentials can be received on the [Spotify developer dashboard page](https://developer.spotify.com/dashboard) by creating a new application and then by clicking the `Settings` button.\n\n### Using your credentials\nThe Spotify Info package needs the credentials of your application to be able to make requests to the Spotify API. These credentials can be set by using the `setApiCredentials` function. The first argument is the Client ID of your application and the second argument is the Client Secret of your application. The api credentials will be saved global so you don't have to define them in every file. The credentials can also be set by using the environmental variables `SPOTIFY_CLIENT_ID` and `SPOTIFY_CLIENT_SECRET`. These credentials **must** be set to be able to make use of the API functions. If you don't want to use credentials, you can make use of the [scrape functions](#get-information-without-the-spotify-api). This is an example of how to set your credentials:\n```js\nconst spotifyInfo = require('spotify-info');\n\nspotifyInfo.setApiCredentials('my-client-id', 'my-client-secret');\n```\n\n### Get song information\nYou can get information about a song by making use of the `getTrack` function. The function has two arguments. The first argument is the url or id of the song. The url may be an embed url, song url or an api url. The second argument is the options argument which is optional. The options in the options argument are:\n* market: The country code of the country where you want to get the available information about the track from. By default the one will be used which is linked to your account.\n```js\nconst spotifyInfo = require('spotify-info');\n\nspotifyInfo.getTrack('https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT').then(res =\u003e console.log(res.name)).catch(console.log);\n```\nThe `getTrack` function returns a `Promise`, once this is fullfilled, it will return the `ApiTrack` class. The `ApiTrack` class has the following properties:\n\n| Property       | Description                                                                                                                                |\n|----------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| name           | The name of the song.                                                                                                                      |\n| id             | The id of the song on Spotify.                                                                                                             |\n| uri            | The uri of the song on Spotify.                                                                                                            |\n| url            | The url of the song on Spotify.                                                                                                            |\n| discNumber     | The disc number of the song on Spotify (mostly 1).                                                                                         |\n| trackNumber    | The track number of the song on Spotify.                                                                                                   |\n| embedUrl       | The embed url of the song on Spotify.                                                                                                      |\n| artists        | An array of the artists [(base artist object)](#base-artist-object).                                                                       |\n| album          | An object of the album the song is in [(base album object)](#base-album-object).                                                           |\n| explicit       | Whether the song is explicit or not.                                                                                                       |\n| popularity     | A number between 0-100 with 100 being the most popular (nullable).                                                                         |\n| duration       | The duration of the song in miliseconds.                                                                                                   |\n| previewUrl     | A url of a preview of the song (nullable).                                                                                                 |\n| locations      | An array of country codes of the countries where the song is available on Spotify.                                                         |\n\n### Get playlist information\nYou can get information about a playlist by making use of the `getPlaylist` function. The function has two arguments. The first argument is the url or id of the playlist. The url may be an embed url, playlist url or an api url. The second argument is the options argument which is optional. The options in the options argument are:\n* market: The country code of the country where you want to get the available information about the playlist from. By default the one will be used which is linked to your account.\n```js\nconst spotifyInfo = require('spotify-info');\n\nspotifyInfo.getPlaylist('https://open.spotify.com/playlist/5pI2mpzVD945Ni9aEB1veE').then(res =\u003e console.log(res.name)).catch(console.log);\n```\nThe `getPlaylist` function returns a `Promise`, once this is fullfilled, it will return the `ApiPlaylist` class. The `ApiPlaylist` class has the following properties:\n\n| Property       | Description                                                                                                                                |\n|----------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| name           | The name of the playlist.                                                                                                                  |\n| id             | The id of the playlist on Spotify.                                                                                                         |\n| uri            | The uri of the playlist on Spotify.                                                                                                        |\n| url            | The url of the playlist on Spotify.                                                                                                        |\n| images         | An array of images of the cover of the playlist [(base image object)](#base-image-object).                                                 |\n| owner          | An object of the owner of the playlist [(base image object)](#base-owner-object).                                                          |\n| embedUrl       | The embed url of the playlist on Spotify.                                                                                                  |\n| artists        | An array of the artists [(base artist object)](#base-artist-object).                                                                       |\n| collaborative  | Whether the owner of the playlist allows others to modify the playlist or not.                                                             |\n| public         | Whether the playlist is public or not.                                                                                                     |\n| description    | The descripition of the playlist (`null` for non-modified and non-verified playlists).                                                     |\n| followers      | The amount of followers of the playlist.                                                                                                   |\n| previewUrl     | A url of a preview of the song (nullable).                                                                                                 |\n| locations      | An array of country codes of the countries where the song is available on Spotify.                                                         |\n| tracks         | An object with information about the tracks of the playlist [(base tracks information)](#base-tracks-information).                         |\n\n### Get album information\nYou can get information about an album by making use of the `getAlbum` function. The function has two arguments. The first argument is the url or id of the album. The url may be an embed url, album url or an api url. The second argument is the options argument which is optional. The options in the options argument are:\n* market: The country code of the country where you want to get the available information about the album from. By default the one will be used which is linked to your account.\n```js\nconst spotifyInfo = require('spotify-info');\n\nspotifyInfo.getAlbum('https://open.spotify.com/album/5Z9iiGl2FcIfa3BMiv6OIw').then(res =\u003e console.log(res.name)).catch(console.log);\n```\nThe `getAlbum` function returns a `Promise`, once this is fullfilled, it will return the `ApiAlbum` class. The `ApiAlbum` class has the following properties:\n\n| Property       | Description                                                                                                                                |\n|----------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| name           | The name of the album.                                                                                                                     |\n| id             | The id of the album on Spotify.                                                                                                            |\n| uri            | The uri of the album on Spotify.                                                                                                           |\n| url            | The url of the album on Spotify.                                                                                                           |\n| locations      | An array of country codes of the countries where the album is available on Spotify.                                                        |\n| images         | An array of images of the cover of the album [(base image object)](#base-image-object).                                                    |\n| embedUrl       | The embed url of the album on Spotify.                                                                                                     |\n| artists        | An array of the artists who participated in the album [(base artist object)](#base-artist-object).                                         |\n| type           | The type of the album (album, single or compilation).                                                                                      |\n| totalTracks    | The total amount of songs in the album.                                                                                                    |\n| release        | The date when the album got released.                                                                                                      |\n| copyrights     | An array of the copyrights that count for the album.                                                                                       |\n| genres         | An array of genres the album belongs to.                                                                                                   |\n| label          | The label associated to the album (nullable).                                                                                              |\n| tracks         | An array of the songs in the album [(base track object)](#base-track-object).                                                              |\n| popularity     | A number between 0-100 with 100 being the most popular (nullable).                                                                         |\n\n### Get artist information\nYou can get information about an artist by making use of the `getArtist` function. The function has one argument. The argument is the url or id of the artist. The url may be an embed url, artist url or an api url.\n```js\nconst spotifyInfo = require('spotify-info');\n\nspotifyInfo.getArtist('https://open.spotify.com/artist/0gxyHStUsqpMadRV0Di1Qt').then(res =\u003e console.log(res.name)).catch(console.log);\n```\nThe `getArtist` function returns a `Promise`, once this is fullfilled, it will return the `ApiArtist` class. The `ApiArtist` class has the following properties:\n\n| Property       | Description                                                                                                                                |\n|----------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| name           | The name of the artist.                                                                                                                    |\n| id             | The id of the artist on Spotify.                                                                                                           |\n| uri            | The uri of the artist on Spotify.                                                                                                          |\n| url            | The url of the artist on Spotify.                                                                                                          |\n| images         | An array of images of the cover of the album [(base image object)](#base-image-object).                                                    |\n| embedUrl       | The embed url of the artist on Spotify.                                                                                                    |\n| followers      | The amount of followers the artist has.                                                                                                    |\n| copyrights     | An array of the copyrights that count for the album.                                                                                       |\n| genres         | An array of genres the album belongs to.                                                                                                   |\n| popularity     | A number between 0-100 with 100 being the most popular (nullable).                                                                         |\n\n### Get user information\nYou can get information about a user by making use of the `getUser` function. The function has one argument. The argument is the url or id of the user. The url may be a spotify user url or a user api url.\n```js\nconst spotifyInfo = require('spotify-info');\n\nspotifyInfo.getArtist('https://open.spotify.com/user/spotify').then(res =\u003e console.log(res.name)).catch(console.log);\n```\nThe `getUser` function returns a `Promise`, once this is fullfilled, it will return the `ApiUser` class. The `ApiUser` class has the following properties:\n\n| Property       | Description                                                                                                                                |\n|----------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| username       | The username of the user.                                                                                                                  |\n| id             | The id of the user on Spotify.                                                                                                             |\n| uri            | The uri of the artist on Spotify.                                                                                                          |\n| url            | The url of the user on Spotify.                                                                                                            |\n| images         | An array of images of the profile image of the user [(base image object)](#base-image-object).                                             |\n| followers      | The amount of followers the user has.                                                                                                      |\n\n### Search\nYou can also search for songs, playlists, albums and artists by using the `search` function. The function has two arguments. The first argument is the query or api url where you want to search the song, playlist, album or artist with. The second argument is the options argument which is required in this case. The options in the options argument are:\n* type: An array of the type you're looking for (can be track, playlist, album or artist, by default all of them are enabled).\n* offset: The index of the first result to return.\n* limit: The maximum number of results to return in each item type (range 0-50).\n* market: The country code of the country where you want to get the available information about the type you're looking for from. By default the one will be used which is linked to your account.\n```js\nconst spotifyInfo = require('spotify-info');\n\nspotifyInfo.search('Never Gonna Give You Up', {\n    type: ['artist'],\n    offset: 0,\n    limit: 1,\n    market: 'US'\n}).then(res =\u003e console.log(res.name)).catch(console.log);\n```\nThe `search` function returns a `Promise`, once this is fullfilled, it will return the `SearchResult` class. The `SearchResult` class has the following properties:\n\n| Property       | Description                                                                                                                                |\n|----------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| tracks         | The tracks that have been found with the query. [(base search result object)](#base-search-result-object).                                 |\n| playlists      | The playlists that have been found with the query. [(base search result object)](#base-search-result-object).                              |\n| albums         | The albums that have been found with the query. [(base search result object)](#base-search-result-object).                                 |\n| artists        | The artists that have been found with the query. [(base search result object)](#base-search-result-object).                                |\n\n### Base artist object\nThe base artist object has the following properties:\n\n| Property       | Description                                                                                                                                |\n|----------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| name           | The name of the artist.                                                                                                                    |\n| id             | The id of the artist on Spotify.                                                                                                           |\n| uri            | The uri of the artist on Spotify.                                                                                                          |\n| url            | The url of the artist on Spotify.                                                                                                          |\n\n### Base owner object\nThe base owner object has the following properties:\n\n| Property       | Description                                                                                                                                |\n|----------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| name           | The name of the owner.                                                                                                                     |\n| id             | The id of the owner on Spotify.                                                                                                            |\n| uri            | The uri of the owner on Spotify.                                                                                                           |\n| url            | The url of the owner on Spotify.                                                                                                           |\n\n### Base album object\nThe base album object has the following properties:\n\n| Property       | Description                                                                                                                                |\n|----------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| name           | The name of the album.                                                                                                                     |\n| id             | The id of the album on Spotify.                                                                                                            |\n| uri            | The uri of the album on Spotify.                                                                                                           |\n| url            | The url of the album on Spotify.                                                                                                           |\n| artists        | An array of artists [(base artist object)](#base-artist-object) who participated in the album.                                             |\n| images         | An array of images of the cover [(base image object)](#base-image-object) of the album.                                                    |\n| locations      | An array of country codes of the countries where the album is available on Spotify.                                                        |\n| totalTracks    | A number of the total amount of songs in the album.                                                                                        |\n| type           | The type of album (album, single or compilation).                                                                                          |\n| release        | The date when the album got released.                                                                                                      |\n\n### Base image object\nThe base image object has the following properties:\n\n| Property       | Description                                                                                                                                |\n|----------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| height         | The height of the image (nullable).                                                                                                        |\n| width          | The width of the image (nullable).                                                                                                         |\n| url            | The url of the image.                                                                                                                      |\n\n### Base tracks information\n| Property      | Description                                                                                                                                             |\n|---------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|\n| tracks        | An array with the tracks of the playlist [(base track object)](#base-track-object).                                                                     |\n| offset        | The offset used to find the tracks of the playlist.                                                                                                     |\n| limit         | The limit set to find the tracks of the playlist and the amount of tracks which have been returned.                                                     |\n| total         | The total amount of tracks available for the playlist.                                                                                                  |\n| nextPage      | A function which returns a Promise and resolves a new [ApiPlaylist](#get-playlist-information) class with a new page of tracks.                         |\n| previousPage  | A function which returns a Promise and resolves a new [ApiPlaylist](#get-playlist-information) class with the previous page of tracks (nullable).       |\n\n### Base track object\nThe base track object has the following properties:\n\n| Property       | Description                                                                                                                                |\n|----------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| name           | The name of the song.                                                                                                                      |\n| id             | The id of the song on Spotify.                                                                                                             |\n| uri            | The uri of the song on Spotify.                                                                                                            |\n| url            | The url of the song on Spotify.                                                                                                            |\n| embedUrl       | The url of the embed of the song.                                                                                                          |\n| artists        | An array of artists [(base artist object)](#base-artist-object) who participated in the song.                                              |\n| addedTimestamp | A timestamp of the time when the song got added to the playlist. (Only for playlist)                                                       |\n| locations      | An array of country codes of the countries where the song is available on Spotify.                                                         |\n| previewUrl     | A url of a preview of the song (nullable).                                                                                                 |\n| explicit       | Whether the song is explicit or not.                                                                                                       |\n| duration       | The duration of the song in miliseconds.                                                                                                   |\n| discNumber     | The disc number of the song on Spotify (mostly 1).                                                                                         |\n| trackNumber    | The track number of the song on Spotify.                                                                                                   |\n| album          | The album the song is in [(base album object)](#base-album-object)                                                                         |\n\n### Base search result object\nThe base search result object has the following properties:\n\n| Property       | Description                                                                                                                                |\n|----------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| limit          | The limit that has been set for the results.                                                                                               |\n| width          | The offset that has been set for the results.                                                                                              |\n| total          | The total amount of results.                                                                                                               |\n| previousPage   | A function which returns a `Promise` that shows the previous page of results (only available when results isn't the first page, nullable). |\n| nextPage       | A function which returns a `Promise` that shows the next page of results (only available when results isn't the last page, nullable).      |\n| items          | An array with the results (result depends on the parent*)                                                                                  |\n\n\\* _Based on the parent object name:_\n* Result items of songs will be the [`ApiTrack`](#get-song-information) class\n* Result items of playlists will be the [`SearchPlaylist`](#searchplaylist-class) class\n* Result items of albums will be the [`SearchAlbum`](#searchalbum-class) class\n* Result items of artists will be the [`ApiArtist`](#get-artist-information) class\n\n### SearchPlaylist class\nThe `SearchPlaylist` class has the following properties:\n\n| Property       | Description                                                                                                                                |\n|----------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| name           | The name of the playlist.                                                                                                                  |\n| collaborative  | Whether the owner of the playlist allows others to modify the playlist or not.                                                             |\n| url            | The url of the playlist on Spotify.                                                                                                        |\n| uri            | The uri of the playlist on Spotify.                                                                                                        |\n| embedUrl       | The embed url of the playlist on Spotify.                                                                                                  |\n| id             | The id of the playlist on Spotify.                                                                                                         |\n| images         | An array of images of the cover [(base image object)](#base-image-object) of the playlist.                                                 |\n| owner          | An object of the owner of the playlist [(base image object)](#base-owner-object).                                                          |\n| public         | Whether the playlist is public or not.                                                                                                     |\n| description    | The descripition of the playlist (`null` for non-modified and non-verified playlists).                                                     |\n| getTracks      | A function which returns a `Promise` which gives an array of the songs in the playlist [(base track object)](#base-track-object).          |\n\n## SearchAlbum class\nThe `SearchAlbum` class has the following properties:\n\n| Property       | Description                                                                                                                                |\n|----------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| name           | The name of the album.                                                                                                                     |\n| id             | The id of the album on Spotify.                                                                                                            |\n| uri            | The uri of the album on Spotify.                                                                                                           |\n| url            | The url of the album on Spotify.                                                                                                           |\n| locations      | An array of country codes of the countries where the album is available on Spotify.                                                        |\n| images         | An array of images of the cover of the album [(base image object)](#base-image-object).                                                    |\n| embedUrl       | The embed url of the album on Spotify.                                                                                                     |\n| artists        | An array of the artists who participated in the album [(base artist object)](#base-artist-object).                                         |\n| type           | The type of the album (album, single or compilation).                                                                                      |\n| totalTracks    | The total amount of songs in the album.                                                                                                    |\n| release        | The date when the album got released.                                                                                                      |\n| copyrights     | An array of the copyrights that count for the album.                                                                                       |\n| genres         | An array of genres the album belongs to.                                                                                                   |\n| label          | The label associated to the album (nullable).                                                                                              |\n| getTracks      | A function which returns a `Promise` which gives an array of the songs in the album [(base track object)](#base-track-object).             |\n\n## Get information without the Spotify API\nThe Spotify Info package allows you to get information about songs, playlists and albums without making use of the Spotify API. It is recommended though to make use of the API as when Spotify changes their pages, it is possible that the scrape functions might not work anymore. In addition, the scrape functions have to make requests to multiple pages to receive all the information, which makes the Spotify API faster than the scrape functions.\n\n### Get song information\nTo get a song it's information, you can scrape the Spotify page by using the `scrapeTrack` function. The function has one argument which is the url of the song.\n```js\nconst spotifyInfo = require('spotify-info');\n\nspotifyInfo.scrapeTrack('https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT').then(song =\u003e console.log(song.name)).catch(console.log);\n```\nThe `scrapeTrack` function returns a `Promise`, once this is fullfilled, it will return the `ScrapedTrack` class. The `ScrapedTrack` class has the following properties:\n\n| Property       | Description                                                                                                                                |\n|----------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| name           | The name of the song.                                                                                                                      |\n| id             | The id of the song on Spotify.                                                                                                             |\n| artist         | The artist of the song.                                                                                                                    |\n| artistUrl      | The url of the artist of the song on Spotify.                                                                                              |\n| artistId       | The id of the artist of the song on Spotify.                                                                                               |\n| description    | The description of the song on Spotify.                                                                                                    |\n| publishDate    | The date when the song got published on Spotify.                                                                                           |\n| locations      | An array of country codes of the countries where the song is available on Spotify.                                                         |\n| url            | The url of the song on Spotify.                                                                                                            |\n| embedUrl       | The embed url of the song on Spotify.                                                                                                      |\n\n### Get playlist information\nTo get a playlist it's information, you can scrape the Spotify page by using the `scrapePlaylist` function. The function has one argument which is the url of the playlist.\n```js\nconst spotifyInfo = require('spotify-info');\n\nspotifyInfo.scrapePlaylist('https://open.spotify.com/playlist/5pI2mpzVD945Ni9aEB1veE').then(song =\u003e console.log(song.name)).catch(console.log);\n```\nThe `scrapePlaylist` function returns a `Promise`, once this is fullfilled, it will return the `ScrapedPlaylist` class. The `ScrapedPlaylist` class has the following properties:\n\n| Property       | Description                                                                                                                                |\n|----------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| name           | The name of the playlist on Spotify.                                                                                                       |\n| id             | The id of the playlist on Spotify.                                                                                                         |\n| creator        | The username of the creator of the playlist on Spotify.                                                                                    |\n| creatorId      | The id of the creator of the playlist on Spotify.                                                                                          |\n| creatorUrl     | The url of the creator of the playlist on Spotify.                                                                                         |\n| thumbnail      | The image which is used as the thumbnail for the playlist on Spotify.                                                                      |\n| locations      | An array of country codes of the countries where the playlist is available on Spotify.                                                     |\n| description    | The description of the playlist on Spotify.                                                                                                |\n| url            | The url of the playlist on Spotify.                                                                                                        |\n| embedUrl       | The embed url of the playlist on Spotify.                                                                                                  |\n| tracks          | An array of the tracks in the playlist, the tracks make use of the `ScrapedPlaylistTrack` class.                                          |\n\n### Get album information\nTo get an album it's information, you can scrape the Spotify page by using the `scrapeAlbum` function. The function has one argument which is the url of the album.\n```js\nconst spotifyInfo = require('spotify-info');\n\nspotifyInfo.scrapeAlbum('https://open.spotify.com/album/5Z9iiGl2FcIfa3BMiv6OIw').then(song =\u003e console.log(song.name)).catch(console.log);\n```\nThe `scrapeAlbum` function returns a `Promise`, once this is fullfilled, it will return the `scrapeAlbum` class. The `scrapeAlbum` class has the following properties:\n\n| Property       | Description                                                                                                                                |\n|----------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| name           | The name of the album.                                                                                                                     |\n| id             | The id of the album on Spotify.                                                                                                            |\n| url            | The url of the album on Spotify.                                                                                                           |\n| artist         | The username of the artist of the album on Spotify.                                                                                        |\n| artistId       | The id of the artist of the album on Spotify.                                                                                              |\n| artistUrl      | The url of the artist of the album on Spotify.                                                                                             |\n| thumbnail      | The image which is used as the thumbnail for the album on Spotify.                                                                         |\n| locations      | An array of country codes of the countries where the album is available on Spotify.                                                        |\n| description    | The description of the album on Spotify.                                                                                                   |\n| embedUrl       | The embed url of the album on Spotify.                                                                                                     |\n| tracks          | An array of the tracks in the album, the tracks make use of the `ScrapedPlaylistTrack` class.                                             |\n\n### The ScrapedPlaylistTrack class\nThe `ScrapedPlaylistTrack` class is used for tracks in the `ScrapedPlaylist` class and for tracks in the `ScrapedAlbum` class. The properties of the `ScrapedPlaylistTrack` class are:\n\n| Property       | Description                                                                                                                                |\n|----------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| name           | The name of the song.                                                                                                                      |\n| artist         | The name of the artist of the song on Spotify.                                                                                             |\n| duration       | The duration of the song in miliseconds.                                                                                                   |\n| durationString | The duration of the song as a string.                                                                                                      |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluuk-dev%2Fspotify-info","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluuk-dev%2Fspotify-info","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluuk-dev%2Fspotify-info/lists"}