A few months back, I was thinking about making an application which could be a simpler, ad-free version of the original SongsPK website. But, like for any application, I needed data. Since there was no API available for the purpose, I started working on my own.
I used PHP for scripting and hosted the code on Heroku. I have an instance of the code running at
https://songspk-suyash.herokuapp.com/. But please keep in mind that since I’m using the free version of Heroku, it might take some time to respond at first.
How it works?
- Fetches the website content via
preg_match_allfunction to extract the necessary details from the content
- Return the data as JSON encoded data
How to use?
Let’s take an example to know how we can use the API.
Suppose you want to access the latest releases from the home page, just access:
Now lets say you have the link to a album page and want all the details of that album with song names and download links. You just have to send the page link via GET method:
This will give you somethink like:
Now you can use this data anywhere you want.
I know that this is not perfect. So if you do some improvements, please send me a pull request!