Home

Awesome

<p align="center"><img src="https://www.myinstants.com/media/apple-touch-icon-114x114.png" alt="MyInstants"></p> <h1 align="center">MyInstants REST API</h1> <p align="center">A RESTful API for scraping and retrieving sound data from the <a href="https://www.myinstants.com" target="_blank">MyInstants</a> website. This API provides endpoints for retrieving information about sounds, including titles, URLs, descriptions, tags, favorites, views, and uploader details.</p>

✨ Support

If you like this project, please star on this repository, thank you ⭐<br> You can support me by:<br> <a href="https://trakteer.id/abdipr" target="_blank"><img id="wse-buttons-preview" src="https://cdn.trakteer.id/images/embed/trbtn-red-1.png?date=18-11-2023" height="40" style="border: 0px; height: 40px;" alt="Trakteer Saya"></a> <a href="https://saweria.co/abdipr" target="_blank"><img height="42" src="https://files.catbox.moe/fwpsve.png"></a>

Table of Contents

🚀 Getting Started

Introduction

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.

Requirements

Installation

  1. Clone the repository to your server:

    git clone https://github.com/abdipr/myinstants-api.git
    cd myinstants-api
    
  2. Download and include simple_html_dom.php in the project directory.

  3. Set up your server to serve PHP files (e.g., Apache or Nginx).

  4. Or, you can deploy directly to Vercel here<br> Deploy with Vercel

❇️ Reference

Endpoints

Base URL: https://myinstants-api.vercel.app

RequestResponseParameter
GET /trendingTrending based regionq
GET /searchSearch a soundq
GET /detailThe sound detailsid
GET /recentRecently uploaded sounds
GET /bestBest of all time sounds
GET /uploadedUser's uploaded soundsusername
GET /favoritesUser's favorite soundsusername

Request Parameters

ParameterDescription
qSearch query or region
usernameUser's username
idSound's Unique ID

Response Parameters

ParameterDescription
idUnique ID of the sound.
urlDirect URL to the sound page.
titleTitle of the sound.
mp3Direct URL to the MP3 file.
descriptionDescription of the sound.
tagsArray of tags associated with the sound.
favoritesNumber of users who favorited the sound.
viewsView count of the sound.
uploaderDetails about the uploader, including the uploader’s name and profile URL.

💥 Error Handling

All errors return JSON objects with a status code and message explaining the issue.

🌐 Examples

Example 1: Get Trending Sounds by Region

Retrieve trending sounds based on a specified region:

GET https://myinstants-api.vercel.app/trending?q=id

Example 2: Search Sounds by Query

Search for sounds using a specific keyword:

GET https://myinstants-api.vercel.app/search?q=laugh

Example 3: Get Sound Details by ID

Retrieve the details of a sound using its unique ID:

GET https://myinstants-api.vercel.app/detail?id=akh-26815

Example 4: Get Recently Uploaded Sounds

Retrieve a list of the most recently uploaded sounds:

GET https://myinstants-api.vercel.app/recent

Example 5: Get Best of All Time Sounds

Retrieve a list of the most popular sounds of all time:

GET https://myinstants-api.vercel.app/best

Example 6: Get User's Uploaded Sounds

Retrieve all sounds uploaded by a specific user:

GET https://myinstants-api.vercel.app/uploaded?username=hellmouz

Example 7: Get User's Favorite Sounds

Retrieve a list of sounds favorited by a specific user:

GET https://myinstants-api.vercel.app/favorites?username=hellmouz

Notes

🌱 Contributing

Contributions are welcome! To contribute:

  1. Fork the repository.
  2. Create a feature branch: git checkout -b feature-name.
  3. Commit your changes: git commit -m 'Add feature'.
  4. Push to the branch: git push origin feature-name.
  5. Submit a pull request.

⚖️ License

This project is licensed under the MIT License. See the LICENSE file for more information.

⚠️ Disclaimer

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.

⬆️ Back to Top