Skip to content

radioactive11/the-lyrics-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

forthebadge forthebadge forthebadge forthebadge


Logo

The Lyrics API

Get lyrics for English and Hindi songs

View Demo · Report Bug · Request Feature

Table of Contents

About The Project

The lack of an working open source API that allows users to fetch lyrics for a song without rate limiting led me to build this. I've hosted this API on Heroku temporarily. Since I'm always use up my monthly free Heroku dyno hours, dont be surprised if the the link stops working. I'll find a permanent solution soon.


Getting Started

To get a local copy up and running follow these simple example steps.

Prerequisites

  • Python 3.7+
  • FastApi
  • BeautifulSoup4
  • Uvicorn

Installation


  1. Clone the repo
git clone https://github.com/radioactive11/the-lyrics-api
  1. Install requirements
pip3 install -r requirements.txt
  1. Start FastAPI server(by default at localhost:8000)
uvicorn main:app

Usage


English Songs

The request body for English songs is:

curl --location --request GET 'https://the-lyrics-api.herokuapp.com/lyrics' \
--header 'Content-Type: application/json' \
--data-raw '{
    "artist": "Taylor Swift",
    "song": "State of Grace",
    "lang": "eng"
}'

Hindi Songs

The request body for Hindi songs is:

curl --location --request GET 'https://the-lyrics-api.herokuapp.com/lyrics' \
--header 'Content-Type: application/json' \
--data-raw '{
    "artist": "Arijit Singh",
    "song": "Darkhaast",
    "lang": "hin"
}'

Note: By default, the language parameter is set to English so you can ignore it for English Songs

Response Format:

{
    "lyrics": "string"
}

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Contact

Arijit Roy - GitHub - roy.arijit2001@gmail.com

Endpoint: https://the-lyrics-api.herokuapp.com/lyrics

About

Open Source API to fetch lyrics for a song

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages