MediaFire Downloader
This API provides the direct download link from a MediaFire file page. It bypasses the landing page and returns the raw file link, name, and size, allowing you to trigger downloads programmatically.
Endpoint
Section titled “Endpoint” POST
/api/v1/mediafire Request Parameters
Section titled “Request Parameters”The following parameters are accepted in the request body:
| Field | Type | Required | Description |
|---|---|---|---|
url | string | Yes | The MediaFire sharing URL (e.g., https://www.mediafire.com/file/...). |
Request Examples
Section titled “Request Examples”curl -X POST https://heavstal.com.ng/api/v1/mediafire \-H "Content-Type: application/json" \-H "x-api-key: <YOUR_API_KEY>" \-d '{"url": "https://www.mediafire.com/file/xk3..."}'const response = await fetch('https://heavstal.com.ng/api/v1/mediafire', { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-api-key': '<YOUR_API_KEY>' }, body: JSON.stringify({ url: 'https://www.mediafire.com/file/xk3...' })});
const res = await response.json();console.log(res.data);import { downloader } from '@heavstal/api';
const file = await downloader.mediafire("https://www.mediafire.com/file/xk3...");
console.log(`Name: ${file.filename} | Link: ${file.link}`);import requests
url = "https://heavstal.com.ng/api/v1/mediafire"headers = { "Content-Type": "application/json", "x-api-key": "<YOUR_API_KEY>"}payload = { "url": "https://www.mediafire.com/file/xk3..."}
response = requests.post(url, headers=headers, json=payload)print(response.json()["data"])Response Examples
Section titled “Response Examples”{ "status": "success", "creator": "HEAVSTAL TECH", "data": { "filename": "project_v2.zip", "filetype": "ZIP", "filesize": "45.2 MB", "link": "https://download234.mediafire.com/token/project_v2.zip" }}{ "status": "error", "error": "Invalid MediaFire URL or file has been deleted."}