Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Deezer 30s Preview API 🎡

🎧 Description:
A simple Python FastAPI backend that provides 30-second song previews from Deezer. Perfect for integrating into a website or app that needs legal music snippets without storing audio files locally.


⚑ Features

  • Search songs by title or artist
  • Retrieve 30-second previews from Deezer automatically
  • Response is served directly in audio/mpeg format
  • Response headers include:
    • X-Track-Title β†’ song title
    • X-Artist-Name β†’ artist name

πŸš€ Installation

  1. Clone this repository:
git clone <repo-url>
cd <repo-folder>
Install dependencies:

bash
Salin kode
pip install -r req.txt
Run the API:

bash
Salin kode
uvicorn app:app --reload
πŸ”— Endpoints
GET / β†’ Homepage

http
Salin kode
http://127.0.0.1:8000/
GET /preview β†’ Get a 30-second song preview

http
Salin kode
http://127.0.0.1:8000/preview?query=lofi
Query Parameters:

query β†’ Song title or artist name

Response:
30-second audio file
Headers: X-Track-Title and X-Artist-Name

About

FastAPI backend for 30-second Deezer song previews

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages