An unofficial open-source Spotify PromoCards API built to serve Song Cards. For more information on using this API, see Docs
Table of contents
Usage
By Song Track Name*
*Results can differ as there can be another song with the Same Name
https://spotify-cards.up.railway.app/api?name={song name}&color={color hex without #}
Example
https://spotify-cards.up.railway.app/api?name=Silver%20Lining&color=A0C3D2
By Song Track ID {Recommended}
https://spotify-cards.up.railway.app/api?id={song id}&color={color hex without #}
Example
https://spotify-cards.up.railway.app/api?id=05iALOptaNoV3EmXnxz1IJ&color=A0C3D2
Orientation
Landscape{Default} or Square
Example
https://spotify-cards.up.railway.app/api?id={song id}&color={color hex without #}&orientation={landscape/square}
How to get Spotify Song Track ID?
- Go to your song
- Right Click >> Share (Keep Ctrl Pressed) >> Copy Spotify URI
- The ID after
spotify:
is the Spotify Song Track ID
Support
To log any issue or help in any issue, check out Issues Section.
Release Versions
- 1.0.0: Supports only Song Tracks. Can take input from user as name or id only currently.
Host Your Own
See HOSTING for instructions on how to host your own service
Run Locally
- Clone the Repository
git clone https://github.com/AmreshSinha/Spotify-Cards-API.git
- Get into project folder and install node modules
npm i
- Go to Spotify Developer Dashboard and Create a New Application with no scopes Make a .env and add
Client_ID
var with your Spotify Dev Application DetailsClient_Secret
var with your Spotify Dev Application Details
- Start and Run the Project
node index.js
Server will start on port 3000
Contributing
Help Needed
- Text Wrap: If the Song Name is too long then text size should decrease and wrap into 2 lines. Spacing between "SONG" and Song Name, and Song Name and Artist name should change accordingly.
Theme Color Extraction from image instead of Black as Default Color.Done Thanks to @deliveyAdding Portrait Orientation.Done Thanks to @delivey
All the Issues are in ISSUES section.
Also, before making a PR checkout Code of Conduct
License
Spotify Cards API is available under the MIT license. Spotify Cards API also includes external libraries that are available under a variety of licenses. See LICENSE for the full license text.