Spaces:
Running
Running
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,114 +1,11 @@
|
|
| 1 |
-
# Spotify Canvas API
|
| 2 |
-
|
| 3 |
-
Unofficial API to fetch Spotify **Canvas video data** (the looping visual videos that appear behind songs on mobile).
|
| 4 |
-
|
| 5 |
-
> [!WARNING]
|
| 6 |
-
> This project uses undocumented endpoints and may violate [Spotify's Terms of Service](https://www.spotify.com/legal/end-user-agreement/). Use at your own risk.
|
| 7 |
-
|
| 8 |
-
---
|
| 9 |
-
|
| 10 |
-
## Features
|
| 11 |
-
|
| 12 |
-
- Retrieve **Canvas video URLs** by track ID or URI
|
| 13 |
-
- Parses Protobuf responses from the internal Spotify API
|
| 14 |
-
- Works with public or private tracks (as long as you're authenticated)
|
| 15 |
-
|
| 16 |
---
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
```
|
| 25 |
-
|
| 26 |
-
### Response:
|
| 27 |
-
```json
|
| 28 |
-
{
|
| 29 |
-
"data": {
|
| 30 |
-
"canvasesList": [
|
| 31 |
-
{
|
| 32 |
-
"id": "32b57cbf354b453a95eee32bb04d4e42",
|
| 33 |
-
"canvasUrl": "https://canvaz.scdn.co/upload/licensor/5bSw7fRotCnRCcO9br14W5/video/32b57cbf354b453a95eee32bb04d4e42.cnvs.mp4",
|
| 34 |
-
"trackUri": "spotify:track:3OHfY25tqY28d16oZczHc8",
|
| 35 |
-
"artist": {
|
| 36 |
-
"artistUri": "spotify:artist:7tYKF4w9nC0nq9CsPZTHyP",
|
| 37 |
-
"artistName": "SZA",
|
| 38 |
-
"artistImgUrl": "https://i.scdn.co/image/ab6761610000f1780895066d172e1f51f520bc65"
|
| 39 |
-
},
|
| 40 |
-
"otherId": "2c441fceb502eaa25f26bcd5b1ccfc0d",
|
| 41 |
-
"canvasUri": "spotify:canvas:1xGyujDyxbx4eTPD4nKLw6"
|
| 42 |
-
}
|
| 43 |
-
]
|
| 44 |
-
}
|
| 45 |
-
}
|
| 46 |
-
```
|
| 47 |
-
|
| 48 |
---
|
| 49 |
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
### 1. Clone the Repo
|
| 53 |
-
|
| 54 |
-
```bash
|
| 55 |
-
git clone https://github.com/Paxsenix0/Spotify-Canvas-API.git
|
| 56 |
-
cd Spotify-Canvas-API
|
| 57 |
-
```
|
| 58 |
-
|
| 59 |
-
### 2. Install Dependencies
|
| 60 |
-
|
| 61 |
-
```bash
|
| 62 |
-
npm install
|
| 63 |
-
```
|
| 64 |
-
|
| 65 |
-
### 3. Set Required Environment Variable
|
| 66 |
-
|
| 67 |
-
You must supply your sp_dc cookie from a logged-in Spotify session.
|
| 68 |
-
|
| 69 |
-
Create a .env file in the root:
|
| 70 |
-
|
| 71 |
-
```bash
|
| 72 |
-
SP_DC=your_sp_dc_cookie_here
|
| 73 |
-
```
|
| 74 |
-
|
| 75 |
-
> This cookie is used to generate an access token to authenticate requests.
|
| 76 |
-
|
| 77 |
-
---
|
| 78 |
-
|
| 79 |
-
## Deployment
|
| 80 |
-
|
| 81 |
-
You can deploy instantly with Vercel:
|
| 82 |
-
|
| 83 |
-
[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FPaxsenix0%2FSpotify-Canvas-API%2Ftree%2Fmain&project-name=Spotify-Canvas-API&repository-name=Spotify-Canvas-API&env=SP_DC&envDescription=SP_DC%20is%20needed%20for%20this%20for%20authentication%20to%20be%20working%20fine&envLink=https%3A%2F%2Fwww.spotify.com%2F&redirect-url=https%3A%2F%2Fgithub.com%2FPaxsenix0%2FSpotify-Canvas-API)
|
| 84 |
-
|
| 85 |
-
---
|
| 86 |
-
|
| 87 |
-
## Notes
|
| 88 |
-
|
| 89 |
-
> I'm developing this project entirely on my phone, without a PC or laptop. Also, I'm still learning — so feel free to send pull requests or suggestions if something looks off!
|
| 90 |
-
|
| 91 |
-
---
|
| 92 |
-
|
| 93 |
-
## Reference
|
| 94 |
-
|
| 95 |
-
Shoutout to this helpful repo that inspired parts of this:
|
| 96 |
-
https://github.com/bartleyg/my-spotify-canvas
|
| 97 |
-
|
| 98 |
-
---
|
| 99 |
-
|
| 100 |
-
## License
|
| 101 |
-
|
| 102 |
-
This project is licensed under the MIT license. see [LICENSE](https://github.com/Paxsenix0/Spotify-Canvas-API/blob/initial/LICENSE) for details.
|
| 103 |
-
|
| 104 |
-
---
|
| 105 |
-
|
| 106 |
-
## Contact
|
| 107 |
-
|
| 108 |
-
Telegram: [@paxsenix0](https://t.me/paxsenix0)
|
| 109 |
-
|
| 110 |
-
Email: alex24dzn@proton.me
|
| 111 |
-
|
| 112 |
-
My Rest-API website: https://api.paxsenix.biz.id
|
| 113 |
-
|
| 114 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Jsondb
|
| 3 |
+
emoji: 🏆
|
| 4 |
+
colorFrom: red
|
| 5 |
+
colorTo: blue
|
| 6 |
+
sdk: docker
|
| 7 |
+
pinned: false
|
| 8 |
+
license: mit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
---
|
| 10 |
|
| 11 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|