MUA API (Matuco19 Utility API) is a multi-purpose API developed in Node.js that offers a variety of services through a simple and easy-to-use interface. The API is designed to be a versatile tool for developers, providing a range of functionalities that can be integrated into any project. Don't forget to ⭐ the project!
To get started, make sure you have Node.js installed, clone the repository and install the dependencies:
git clone https://github.com/Matuco19/MUA-Api
cd MUA-Api
npm installNote
This project uses fetch at runtime; ensure Node >= 18 or install node-fetch if running a lower Node version.
To start the server, run the following command:
npm startThe server will start on http://localhost:3000.
- URL:
/screenshot - Method:
GET - Query Parameters:
url: The URL of the website you want to capture.
Example: /api/screenshot/?url=https://matuco19.com
Example Response:
The response will be a screenshot of the provided URL in PNG format.
- URL:
/about - Method:
GET - Query Parameters:
None: No query parameters required.
Example: /api/about
Example Response:
The response will be stats of the API
- URL:
/analyze-sentiment - Method:
GET - Query Parameters:
text: Text to analyze the sentiment.
Example: /api/analyze-sentiment/?text="hello world!"
Example Response:
The response will be a dictionary with sentiment and polarity keys, like:
{
"sentiment": "positive",
"polarity": 0.666666666666667
}- URL:
/llm/token-counter - Method:
GET - Query Parameters:
text(required): The text for which to count the tokens.model(optional): The tokenizer model to use. Defaults too200k_base.cl100k_base: Used bygpt-3.5-turbo,gpt-4, andgpt-4o.o200k_base: Used bygpt-4.1andgpt-4o-mini.
Example:
- Default model:
/api/llm/token-counter?text=Hello%20world! - Specific model:
/api/llm/token-counter?text=Hello%20world!&model=cl100k_base
Example Response:
The response will be a JSON object with the tokenCount, like:
{
"tokenCount": 2
}- URL:
/cors-proxy - Method:
GET - Query Parameters:
url(required): The remote URL to fetch.raw(optional):trueor1to return the raw response with original content-type; otherwise the proxy returns a JSON object withcontentsandstatusfields (similar to AllOrigins).timeout(optional): Request timeout in milliseconds (default 10000, min 3000).cache_ttl(optional): Seconds to cache the result (default 60).
Examples:
- JSON output (default):
/api/cors-proxy?url=https://example.com - Raw output (forwarded content):
/api/cors-proxy?url=https://example.com/image.png&raw=1
The cors-proxy endpoint sets Access-Control-Allow-Origin: * and supports streaming of binary resources while also respecting timeouts and content-size limits.
Example Response:
if raw mode is not enabled, the endpoint will return a discretionary with the items contents and status, like this:
{
"contents": "html content here",
"status": {
"http_code": 200,
"content_type": "text/html; charset=UTF-8"
}
}- URL:
/password-strength - Method:
POST - Body:
password: The password to analyze.
Example: curl -X POST -H "Content-Type: application/json" -d '{"password": "password123"}' http://localhost:3000/api/password-strength
Example Response:
The response will be a JSON object with the password's strength analysis, like:
{
"strength_percentage": 35,
"strength_text": "Weak",
"estimated_crack_time": "Seconds to minutes"
}This project is developed and maintained by Matuco19.
- Matuco19 Website: matuco19.com
- GitHub: github.com/Matuco19
- Discord Server: discord.gg/Matuco19Server0
Contributions are welcome! Feel free to open an issue or submit a pull request on GitHub.
This project is open-source and available under the MATCO-Open-Source License. See the LICENSE file for details.