Single Post (Video/Gallery/Music/Live Stream) Extraction API
Note
API Overview
This API is used to extract media content from a single post (video/image/music/live stream, etc.), supporting 999+ platforms covered by MeowLoad.
🎯 Basic Information
| Item | Details |
|---|---|
| Endpoint | https://api.meowload.net/openapi/extract/post |
| Method | POST |
| Content-Type | application/json |
📋 Request Parameters
Headers
| Parameter | Type | Required | Description |
|---|---|---|---|
x-api-key | string | Yes | API key, obtained from the Developer Management Center |
accept-language | string | - | Error message language, defaults to enSupported: zh, en, ja, es, de, etc. |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Share link URL of the single post |
Request Example
curl -X POST https://api.meowload.net/openapi/extract/post \
-H "Content-Type: application/json" \
-H "x-api-key: your-api-key-here" \
-H "accept-language: zh" \
-d '{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}'🟢 Success Response
HTTP Status Code:
200 OK
Response Example - Basic Format
{
"text": "Introducing Opera One https://t.co/ABHoIW116d",
"medias": [
{
"media_type": "video",
"resource_url": "https://video.twimg.com/ext_tw_video/1650757905975595010/pu/vid/1280x720/HhaDnQS7feVgqhAN.mp4?tag=12",
"preview_url": "https://pbs.twimg.com/ext_tw_video_thumb/1650757905975595010/pu/img/t5yBiZFRPAIa_4Pi.jpg"
},
{
"media_type": "image",
"resource_url": "https://example.com/image.jpg",
"preview_url": null
},
{
"media_type": "audio",
"resource_url": "https://example.com/audio.m4a",
"preview_url": "https://example.com/cover.jpg",
"headers": {
"Referer": "https://www.example.com/",
"User-Agent": "Mozilla/5.0 (compatible; MSIE Version; Operating System)"
}
}
],
"id": "1650758247739949056",
"created_at": "Tue Apr 25 07:06:50 +0000 2023"
}Response Example - Multi-Resolution Format
Tip
Multi-Resolution Support
Videos from certain platforms (such as YouTube, Facebook) may include multiple resolution versions, returned in the formats field.
💡 Click to expand multi-resolution response example
{
"text": "10个PC必装的免费软件,既个性又好用",
"medias": [
{
"media_type": "video",
"resource_url": "https://googlevideo.com/videoplayback?ei=L92YYsOeF9nbkgatuKvoDg",
"preview_url": "https://i.ytimg.com/vi/WKSZXFvpu5Q/maxresdefault.jpg",
"formats": [
{
"quality": 2160,
"video_url": "https://googlevideo.com/pl5h1V3m4CIQCO6O9Dk.webm",
"video_ext": "webm",
"video_size": 24532741513,
"audio_url": "https://googlevideo.com/V3m4CIQCO6O9Dk7TPDllq.m4a",
"audio_ext": "m4a",
"audio_size": 221231911,
"separate": 1,
"quality_note": "4K"
},
{
"quality": 1440,
"video_url": "https://googlevideo.com/QCO6O9Dk7TPDllq.webm",
"video_ext": "webm",
"video_size": 12547654223,
"audio_url": "https://googlevideo.com/V3m4CIQCO6O.m4a",
"audio_ext": "m4a",
"audio_size": 221231911,
"separate": 1,
"quality_note": "2K"
},
{
"quality": 1080,
"video_url": "https://googlevideo.com/V3m4CIQCO6O9Dk7.mp4",
"video_ext": "mp4",
"video_size": 5995725852,
"audio_url": "https://googlevideo.com/IQCO6O9Dk7TP.m4a",
"audio_ext": "m4a",
"audio_size": 221231911,
"separate": 1,
"quality_note": "HD"
},
{
"quality": 720,
"video_url": "https://googlevideo.com/m4CIQCO6O9Dk7TPDllq.mp4",
"video_ext": "mp4",
"video_size": 2849049722,
"audio_url": null,
"audio_ext": null,
"audio_size": 0,
"separate": 0,
"quality_note": null
},
{
"quality": 480,
"video_url": "https://googlevideo.com/V3m4CIQCO6O9Dk7T.mp4",
"video_ext": "mp4",
"video_size": 1306363594,
"audio_url": "https://googlevideo.com/JFTso7rYNu_Qtjpl5h1V.m4a",
"audio_ext": "m4a",
"audio_size": 221231911,
"separate": 1,
"quality_note": null
}
]
}
]
}Response Field Descriptions
| Field | Type | Always Returned | Description |
|---|---|---|---|
text | string | - | Post caption content |
id | string | - | Unique post ID |
created_at | string | - | Post creation time |
medias | array | Yes | Media resource list (a single link may contain multiple media items) |
medias Array Fields
| Field | Type | Always Returned | Description |
|---|---|---|---|
media_type | string | Yes | Media typevideo, image, audio, live, file (unknown file type) |
resource_url | string | Yes | Media resource download URL |
preview_url | string | - | Cover/preview image URL (for video/audio/live) |
headers | object | - | Request headers required for downloading (needed for some platforms) |
formats | array | - | Multi-resolution version list (for platforms like YouTube, Facebook, etc.) |
formats Array Fields (Multi-Resolution)
| Field | Type | Description |
|---|---|---|
quality | number | Video resolution (height in pixels, e.g., 1080, 720) |
quality_note | string | Resolution label (e.g., “4K”, “2K”, “1080p”, “360p”) |
video_url | string | Video stream URL |
video_ext | string | Video file extension (e.g., mp4, webm) |
video_size | number | Video file size (bytes) |
audio_url | string | Audio stream URL (present when audio and video are separate) |
audio_ext | string | Audio file extension (e.g., m4a, mp3) |
audio_size | number | Audio file size (bytes) |
separate | number | Whether audio and video are separate1 (separate), 0 (combined) |
🔴 Error Response
HTTP Status Code: non-
200(e.g., 400, 401, 402, 422, 500)
Error Response Example
{
"message": "链接格式错误"
}HTTP Status Code Reference
| Status Code | Description | Common Cause | Solution |
|---|---|---|---|
200 | Success | - | - |
400 | Business Error | Extraction failed, link contains no valid media | Check if the link is correct and contains video/images, etc. |
401 | Authentication Failed | Invalid or expired API Key | Verify that x-api-key is correct |
402 | Credits Exhausted | API call quota used up | Visit the Management Center to top up |
422 | Parameter Error | Incorrect link format | Check the url parameter format |
500 | Server Error | Internal server error | Contact technical support |
💻 Code Examples
Python
import requests
api_url = "https://api.meowload.net/openapi/extract/post"
api_key = "your-api-key-here"
payload = {
"url": "https://www.bilibili.com/video/BV1sG4y1p7TA/"
}
headers = {
"x-api-key": api_key,
"accept-language": "zh"
}
response = requests.post(api_url, json=payload, headers=headers)
if response.status_code == 200:
data = response.json()
print("✅ Extraction successful!")
print(f"Caption: {data.get('text', 'N/A')}")
print(f"Media count: {len(data['medias'])}")
for idx, media in enumerate(data['medias'], 1):
print(f"\n--- Media {idx} ---")
print(f"Type: {media['media_type']}")
print(f"Download URL: {media['resource_url']}")
else:
error = response.json()
print(f"❌ Request failed ({response.status_code}): {error['message']}")JavaScript (Fetch)
const apiUrl = "https://api.meowload.net/openapi/extract/post";
const apiKey = "your-api-key-here";
const payload = {
url: "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
};
const headers = {
"Content-Type": "application/json",
"x-api-key": apiKey,
"accept-language": "zh"
};
fetch(apiUrl, {
method: "POST",
headers: headers,
body: JSON.stringify(payload)
})
.then(response => {
if (!response.ok) {
return response.json().then(error => {
throw new Error(`${response.status}: ${error.message}`);
});
}
return response.json();
})
.then(data => {
console.log("✅ Extraction successful!");
console.log(`Caption: ${data.text || 'N/A'}`);
console.log(`Media count: ${data.medias.length}`);
data.medias.forEach((media, idx) => {
console.log(`\n--- Media ${idx + 1} ---`);
console.log(`Type: ${media.media_type}`);
console.log(`Download URL: ${media.resource_url}`);
});
})
.catch(error => {
console.error(`❌ Request failed: ${error.message}`);
});Golang
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
type ExtractRequest struct {
URL string `json:"url"`
}
type Media struct {
MediaType string `json:"media_type"`
ResourceURL string `json:"resource_url"`
PreviewURL string `json:"preview_url,omitempty"`
}
type ExtractResponse struct {
Text string `json:"text,omitempty"`
Medias []Media `json:"medias"`
ID string `json:"id,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
}
type ErrorResponse struct {
Message string `json:"message"`
}
func main() {
apiURL := "https://api.meowload.net/openapi/extract/post"
apiKey := "your-api-key-here"
// Build request body
requestBody := ExtractRequest{
URL: "https://www.bilibili.com/video/BV1sG4y1p7TA/",
}
jsonData, err := json.Marshal(requestBody)
if err != nil {
fmt.Printf("❌ JSON serialization failed: %v\n", err)
return
}
// Create HTTP request
req, err := http.NewRequest("POST", apiURL, bytes.NewBuffer(jsonData))
if err != nil {
fmt.Printf("❌ Failed to create request: %v\n", err)
return
}
// Set request headers
req.Header.Set("Content-Type", "application/json")
req.Header.Set("x-api-key", apiKey)
req.Header.Set("accept-language", "zh")
// Send request
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Printf("❌ Failed to send request: %v\n", err)
return
}
defer resp.Body.Close()
// Read response
body, err := io.ReadAll(resp.Body)
if err != nil {
fmt.Printf("❌ Failed to read response: %v\n", err)
return
}
// Process response
if resp.StatusCode == 200 {
var result ExtractResponse
if err := json.Unmarshal(body, &result); err != nil {
fmt.Printf("❌ Failed to parse response: %v\n", err)
return
}
fmt.Println("✅ Extraction successful!")
fmt.Printf("Caption: %s\n", result.Text)
fmt.Printf("Media count: %d\n", len(result.Medias))
for idx, media := range result.Medias {
fmt.Printf("\n--- Media %d ---\n", idx+1)
fmt.Printf("Type: %s\n", media.MediaType)
fmt.Printf("Download URL: %s\n", media.ResourceURL)
}
} else {
var errorResp ErrorResponse
if err := json.Unmarshal(body, &errorResp); err != nil {
fmt.Printf("❌ Failed to parse error response: %v\n", err)
return
}
fmt.Printf("❌ Request failed (%d): %s\n", resp.StatusCode, errorResp.Message)
}
}PHP
<?php
$apiUrl = "https://api.meowload.net/openapi/extract/post";
$apiKey = "your-api-key-here";
$params = array(
"url" => "https://www.tiktok.com/@nike/video/7198345395863309611"
);
$options = array(
"http" => array(
"header" =>
"Content-Type: application/json\r\n" .
"x-api-key: " . $apiKey . "\r\n" .
"accept-language: zh",
"method" => "POST",
"content" => json_encode($params),
),
"ssl" => array(
"verify_peer" => false,
"verify_peer_name" => false,
),
);
$context = stream_context_create($options);
$response = file_get_contents($apiUrl, false, $context);
// Parse HTTP response status code
$statusLine = $http_response_header[0];
preg_match('{HTTP\/\S*\s(\d{3})}', $statusLine, $match);
$statusCode = $match[1];
$data = json_decode($response, true);
if ($statusCode == 200) {
echo "✅ Extraction successful!\n";
echo "Caption: " . ($data['text'] ?? 'N/A') . "\n";
echo "Media count: " . count($data['medias']) . "\n";
foreach ($data['medias'] as $idx => $media) {
echo "\n--- Media " . ($idx + 1) . " ---\n";
echo "Type: " . $media['media_type'] . "\n";
echo "Download URL: " . $media['resource_url'] . "\n";
}
} else {
echo "❌ Request failed (" . $statusCode . "): " . $data['message'] . "\n";
}
?>💡 Tips
1. Handling Media with Custom Headers
Some platforms require specific HTTP headers to download media resources:
import requests
# Assuming the API returned media contains a headers field
media = {
"media_type": "audio",
"resource_url": "https://example.com/audio.m4a",
"headers": {
"Referer": "https://www.example.com/",
"User-Agent": "Mozilla/5.0..."
}
}
# Include these headers when downloading
if media.get('headers'):
response = requests.get(media['resource_url'], headers=media['headers'])
else:
response = requests.get(media['resource_url'])
with open('downloaded_file.m4a', 'wb') as f:
f.write(response.content)2. Selecting the Right Video Resolution
For videos that support multiple resolutions, choose the appropriate version based on your needs:
def select_quality(formats, target_quality=1080):
"""
Select the version closest to the target resolution from the formats list
"""
if not formats:
return None
# Sort by resolution
sorted_formats = sorted(formats, key=lambda x: abs(x['quality'] - target_quality))
return sorted_formats[0]
# Usage example
if 'formats' in media:
selected = select_quality(media['formats'], target_quality=1080)
print(f"Selected resolution: {selected['quality']}p ({selected.get('quality_note', '')})")
print(f"Video URL: {selected['video_url']}")3. Handling Separate Audio and Video Streams
Some HD videos have separate audio and video streams that need to be downloaded and merged individually:
def download_and_merge(format_item):
"""
Download and merge separate audio and video streams (requires ffmpeg)
"""
import subprocess
if format_item['separate'] == 1:
# Download video
video_file = "video.mp4"
audio_file = "audio.m4a"
output_file = "merged.mp4"
# ... download video_url to video_file
# ... download audio_url to audio_file
# Merge using ffmpeg
subprocess.run([
'ffmpeg',
'-i', video_file,
'-i', audio_file,
'-c', 'copy',
output_file
])
print(f"✅ Merge complete: {output_file}")
else:
# Audio and video are combined, download directly
print("Audio and video are combined, no merging needed")