Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/khaoniewji/mdu-api
A powerful and flexible media downloading API built with ElysiaJS that supports multiple platforms for video extraction and downloading.
https://github.com/khaoniewji/mdu-api
api bun downloader elysiajs typescript
Last synced: 2 days ago
JSON representation
A powerful and flexible media downloading API built with ElysiaJS that supports multiple platforms for video extraction and downloading.
- Host: GitHub
- URL: https://github.com/khaoniewji/mdu-api
- Owner: khaoniewji
- Created: 2025-01-11T07:57:39.000Z (3 days ago)
- Default Branch: master
- Last Pushed: 2025-01-11T08:18:27.000Z (3 days ago)
- Last Synced: 2025-01-11T09:25:48.220Z (3 days ago)
- Topics: api, bun, downloader, elysiajs, typescript
- Language: TypeScript
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Media Downloader Utility API
A powerful and flexible media downloading API built with ElysiaJS that supports multiple platforms for video extraction and downloading.
## Features
- Multi-platform video extraction support
- Cookie-based authentication handling
- Customizable User-Agent management
- Swagger documentation integration
- Rate limiting and request validation
- Error handling and detailed logging## Installation
```bash
# Using Bun
bun install
```
## API Endpoints### GET /extract
Extract video information from supported platforms.
```typescript
GET /extract?url={video_url}
```**Query Parameters:**
- `url` (required): The URL of the video to extract**Query Parameters:**
- `url` (required): The download URL obtained from extract endpoint
- `format` (optional): Desired format (default: best available)## Error Handling
The API uses standard HTTP status codes:
- 200: Success
- 400: Bad Request
- 401: Unauthorized
- 403: Forbidden
- 429: Too Many Requests
- 500: Internal Server ErrorErrors are returned in the following format:
```json
{
"success": false,
"error": {
"code": "ERROR_CODE",
"message": "Error description"
}
}
```## Security
- Rate limiting is implemented to prevent abuse
- User-Agent validation to prevent spoofing
- Cookie-based session management
- Input sanitization for all parameters## Core Framework
- ElysiaJS - A fast, and friendly Bun web framework
- @elysiajs/cookie - Cookie management for ElysiaJS
- @elysiajs/swagger - OpenAPI/Swagger integration## Utilities
- cheerio - Fast, flexible implementation of core jQuery for parsing HTML
- node-fetch - Light-weight module that brings Fetch API to Node.js
- dotenv - Zero-dependency module that loads environment variables## Contributing
1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request## License
This project is licensed under the MIT License - see the LICENSE file for details.