Documentation Index
Fetch the complete documentation index at: https://api-tools.memories.ai/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- You’re familiar with the concepts described on the Platform overview.
- You have created a memories.ai API key.
- Each URL must be a proper link to a video post page on a supported platform.
- All URLs in a single request must come from the same platform (e.g. you cannot mix TikTok and YouTube URLs in one call).
- For YouTube URLs your account must have sufficient points/credits; otherwise the request is rejected.
Host URL
Endpoint
POST /serve/api/v1/scraper_url
/serve/api/v1/scraper_url
Authentication
Pass your API key in the Authorization request header. Requests without a valid API key are rejected.
Content Type
The endpoint expects a JSON body (application/json). Send parameters as a JSON object.
Request Example
import requests
headers = {"Authorization": "<API_KEY>"}
payload = {
"video_urls": [
"https://www.tiktok.com/@cutshall73/video/7543017294226558221",
"https://www.tiktok.com/@abcnews/video/7543794552365124919"
],
"unique_id": "default",
"callback_url": "<CALLBACK_URL>",
"quality": "1080"
}
response = requests.post(
"https://api.memories.ai/serve/api/v1/scraper_url",
json=payload,
headers=headers
)
print(response.json())
Callback Notification Payload
If you provide callback_url, memories.ai will send POST notifications for the following events:
- The scraping task finishes (download complete).
- Each video is successfully indexed.
// Task Succeeded
{ "message": "Video has been downloaded...", "taskId": "...", "status": "SUCCEEDED" }
// Indexing Succeeded
{ "videoId": "VI...", "message": "Video indexing succeed", "taskId": "...", "status": "INDEXING_SUCCEEDED" }
Request Parameters
List of platform video URLs. After merging with tiktok_post_urls (if any), the combined list must be non-empty and contain at most 50 URLs. All URLs must originate from the same platform.
Optional list of TikTok post URLs. Merged server-side into video_urls before processing. Counts toward the 50-URL cap.
Scope identifier used to group videos under a logical folder for the authenticated account. If the folder for this unique_id does not exist yet, it is created automatically on the first request. Defaults to "default" when omitted.
Callback URL that will receive POST notifications when the scraping task finishes and when each video finishes indexing.
Target video resolution. Must be one of "360", "480", "720", "1080", "1440", "2160" (sent as a string). Defaults to "360" when omitted.
Notes & Limits
- Rate limiting: The endpoint is protected by a per-account scraper rate limit. Exceeding the limit returns an error indicating the request has exceeded the limit.
- Billing: This endpoint is metered — the cost of the request is checked and deducted from your account balance at request time. Insufficient balance will cause the request to fail.
- Same-origin constraint: All URLs in a single call must belong to the same platform (TikTok, YouTube, Instagram, etc.). Mixed-platform batches are rejected.
- YouTube credit check: Requests containing YouTube URLs additionally require enough points; otherwise a “not enough points” error is returned.
Response Example
{
"code": "0000",
"msg": "success",
"data": {
"taskId": "31b0fccb-d6f9-4135-922d-1e8828499812"
},
"success": true,
"failed": false
}
Response Fields
Business status code. 0000 indicates success; any other value indicates an error and msg will describe it.
Human-readable status message.
Unique identifier of the scraping task. Use this value in callbacks and follow-up APIs (e.g. retrieving the video IDs produced by the task).
Platform video URLs. Merged with tiktok_post_urls; combined list must be non-empty and <= 50. All URLs must be from the same platform.
Maximum array length: 50
Example:[
"https://www.tiktok.com/@cutshall73/video/7543017294226558221",
"https://www.tiktok.com/@abcnews/video/7543794552365124919"
]
Optional TikTok post URLs. Server merges these into video_urls before processing. Counts toward the 50-URL cap.
Scope identifier. A folder is auto-created on first use for the authenticated account.
Callback URL for task-complete and per-video indexing-complete notifications.
Example:"https://your.app/callback"
Target video resolution. Must be one of 360/480/720/1080/1440/2160 (string).
Available options:
360,
480,
720,
1080,
1440,
2160
Business status code. 0000 indicates success.
Example:{
"taskId": "31b0fccb-d6f9-4135-922d-1e8828499812"
}