A RESTful API for scraping and retrieving sound data from the MyInstants website. This API provides endpoints for retrieving information about sounds, including titles, URLs, descriptions, tags, favorites, views, and uploader details.
If you like this project, please star on this repository, thank you ⭐
You can support me by:
The MyInstants REST API is designed to provide a structured way to retrieve sound data from the MyInstants website. This API is suitable for applications that need to access sound information dynamically without direct interactions with the MyInstants site.
- PHP 7.4 or higher
- simple_html_dom.php library for HTML parsing
- Internet access for scraping the MyInstants website
-
Clone the repository to your server:
git clone https://github.com/abdipr/myinstants-api.git cd myinstants-api
-
Download and include
simple_html_dom.php
in the project directory. -
Set up your server to serve PHP files (e.g., Apache or Nginx).
Base URL: https://myinstants-api.vercel.app
Request | Response | Parameter |
---|---|---|
GET /trending |
Trending based region | q |
GET /search |
Search a sound | q |
GET /detail |
The sound details | id |
GET /recent |
Recently uploaded sounds | |
GET /best |
Best of all time sounds | |
GET /uploaded |
User's uploaded sounds | username |
GET /favorites |
User's favorite sounds | username |
Parameter | Description |
---|---|
q |
Search query or region |
username |
User's username |
id |
Sound's Unique ID |
Parameter | Description |
---|---|
id |
Unique ID of the sound. |
url |
Direct URL to the sound page. |
title |
Title of the sound. |
mp3 |
Direct URL to the MP3 file. |
description |
Description of the sound. |
tags |
Array of tags associated with the sound. |
favorites |
Number of users who favorited the sound. |
views |
View count of the sound. |
uploader |
Details about the uploader, including the uploader’s name and profile URL. |
All errors return JSON objects with a status
code and message
explaining the issue.
- 404 Error:
- When the page is not found or the query parameter is missing.
{ "status": "404", "author": "abdiputranar", "message": "Page not found" }
Retrieve trending sounds based on a specified region:
GET https://myinstants-api.vercel.app/trending?q=id
Search for sounds using a specific keyword:
GET https://myinstants-api.vercel.app/search?q=laugh
Retrieve the details of a sound using its unique ID:
GET https://myinstants-api.vercel.app/detail?id=akh-26815
Retrieve a list of the most recently uploaded sounds:
GET https://myinstants-api.vercel.app/recent
Retrieve a list of the most popular sounds of all time:
GET https://myinstants-api.vercel.app/best
Retrieve all sounds uploaded by a specific user:
GET https://myinstants-api.vercel.app/uploaded?username=hellmouz
Retrieve a list of sounds favorited by a specific user:
GET https://myinstants-api.vercel.app/favorites?username=hellmouz
q
Parameter: Used for searching or specifying the region for trending sounds.id
Parameter: Unique identifier for accessing sound details.username
Parameter: User's profile name for accessing their uploads or favorites.
Contributions are welcome! To contribute:
- Fork the repository.
- Create a feature branch:
git checkout -b feature-name
. - Commit your changes:
git commit -m 'Add feature'
. - Push to the branch:
git push origin feature-name
. - Submit a pull request.
This project is licensed under the MIT License
. See the LICENSE file for more information.
The sounds contained in this API are obtained from the original MyInstants website by web scraping. Developers using this API must follow the applicable regulations by mentioning this project or the official owner in their projects and are prohibited from abusing this API for personal benefits.