developers: api and mcp
runner gives you two ways to use the same download engine from your own projects: a simple rest api for your website, app or scripts, and an mcp server so ai assistants like claude can download for you. both are free, with fair limits.
quick start
- sign in with google and open your account page.
- under api keys, press create key and copy it. it is shown only once.
- send a link to the api, get a download link back:
curl -X POST https://runner.cardlynfcscanner.com/api/v1/download \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ", "mode": "audio"}'the answer is a json object with a direct url to the finished file:
{
"status": "ready",
"filename": "Never Gonna Give You Up.mp3",
"size": 3456789,
"url": "https://runner.cardlynfcscanner.com/f/3f1c…/Never%20Gonna%20Give%20You%20Up.mp3",
"expiresAt": "2026-11-25T10:15:00.000Z"
}authentication
send your key with every request in the Authorization header:
Authorization: Bearer YOUR_API_KEYX-API-Key: YOUR_API_KEY works too. keep your key secret: call the api from your server, not from javascript in a web page, where anyone can read it. if a key leaks, revoke it on your account page and make a new one. you can have up to 3 keys.
download a file
POST https://runner.cardlynfcscanner.com/api/v1/downloadsend a json body. only url is required; everything else falls back to the defaults below. preparing a file can take from a few seconds to a few minutes for long videos, so use a long timeout (10 minutes).
| field | values | default | what it does |
|---|---|---|---|
url | string | required | link to the post, video or song |
mode | auto · audio · mute | auto | video with sound, audio only, or video without sound |
quality | max · 4320 · 2160 · 1440 · 1080 · 720 · 480 · 360 · 240 · 144 | 1080 | highest video height |
audioFormat | mp3 · best · m4a · ogg · wav · opus | mp3 | audio file type in audio mode (best = no conversion) |
bitrate | 320 · 256 · 128 · 96 · 64 · 8 | 128 | audio bitrate in kb/s |
codec | h264 · h265 · av1 · vp9 | h264 | preferred video codec |
container | auto · mp4 · webm · mkv | auto | video file type |
subs | none · en | none | embed english subtitles when available |
filename | title · quality · author · id | title | file name style |
metadata | true · false | true | write title and author into the file |
gif | true · false | true | save twitter/x gifs as real .gif files |
tiktokFullAudio | true · false | true | tiktok audio mode: save the full original sound |
item | 1 - 30 | - | pick one item from a post with several photos or videos |
examples
// run this on your server (node 18+), never in the browser: it would show your key
const res = await fetch("https://runner.cardlynfcscanner.com/api/v1/download", {
method: "POST",
headers: {
"Authorization": "Bearer " + process.env.RUNNER_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({ url: "https://www.youtube.com/watch?v=dQw4w9WgXcQ", quality: "720" }),
});
const data = await res.json();
if (data.status === "ready") console.log(data.url); // direct link, works for 15 minutesimport os, requests
r = requests.post(
"https://runner.cardlynfcscanner.com/api/v1/download",
headers={"Authorization": f"Bearer {os.environ['RUNNER_API_KEY']}"},
json={"url": "https://www.tiktok.com/@user/video/123", "mode": "auto"},
timeout=600,
)
data = r.json()
print(data["url"] if data["status"] == "ready" else data)<?php
$ch = curl_init("https://runner.cardlynfcscanner.com/api/v1/download");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 600,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("RUNNER_API_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode(["url" => "https://x.com/user/status/123", "mode" => "auto"]),
]);
$data = json_decode(curl_exec($ch), true);
echo $data["status"] === "ready" ? $data["url"] : $data["error"];responses
ready: the file is prepared. url is the direct link, size is in bytes.
{
"status": "ready",
"filename": "Never Gonna Give You Up.mp3",
"size": 3456789,
"url": "https://runner.cardlynfcscanner.com/f/3f1c…/Never%20Gonna%20Give%20You%20Up.mp3",
"expiresAt": "2026-11-25T10:15:00.000Z"
}picker: the post has several photos or videos. send the same request again with "item": 2 (or any number from the list) to get that one.
{
"status": "picker",
"title": "my trip",
"items": [
{ "item": 1, "title": "1", "kind": "photo", "thumb": "https://…" },
{ "item": 2, "title": "2", "kind": "video", "thumb": "https://…" }
]
}error: something went wrong. code is stable and safe to check in your code, error is a short message for people.
{
"status": "error",
"code": "quota.day",
"error": "daily limit reached for this api key, it resets at 00:00 utc"
}usage and supported sites
curl https://runner.cardlynfcscanner.com/api/v1/usage -H "Authorization: Bearer YOUR_API_KEY"shows how much of today's limit your key has used. GET /api/v1/services lists the most used supported sites (no key needed). 1000+ more sites work too, so just try the link.
limits
the api runs on a small server, so every key has these limits for now:
every answer has these headers so you can see where you are:
X-RateLimit-Limit, X-RateLimit-Remaining (per minute)
X-Quota-Limit, X-Quota-Remaining, X-Quota-Reset (per day, resets 00:00 utc)
Retry-After (seconds to wait, on 429 and 503)requests that fail before the download starts (busy server, another request still running) are not counted. need more? send us a message with the feedback button and tell us about your project.
errors
| http | code | meaning |
|---|---|---|
| 401 | auth.missing / auth.invalid | no api key, or the key is wrong or revoked |
| 403 | key.disabled | the key was disabled by the site owner |
| 429 | rate | too many requests this minute, or another request with this key is still running. wait for Retry-After seconds |
| 429 | quota.day | the key used its daily limit. it resets at 00:00 utc |
| 503 | busy / api.disabled | the server is busy or the api is turned off. try again later |
| 400 | link.invalid / link.missing | the url is missing, broken or not supported |
| 400 | content.private / content.age / content.live | the content needs a login, is age restricted or is a live stream |
| 400 | content.unavailable / content.empty / content.too_large | nothing to download, removed, or too large |
| 502 | service.blocked / service.rate / fetch.failed | the other site refused or failed, try again a bit later |
file links
- a link works for 15 minutes and can be opened at most 5 times, then the file is deleted. we don't keep files.
- you can give the link straight to your users, put it in a download button on your site, or fetch the file on your server and store it yourself.
- the link answers with
Content-Disposition: attachmentand the real file name, and can be used from any site.
mcp server (for claude and other ai assistants)
the model context protocol lets ai assistants use tools. connect runner once, then just ask: "download this video as mp3: https://…". it uses the same api key and limits.
https://runner.cardlynfcscanner.com/mcpclaude code
claude mcp add --transport http runner https://runner.cardlynfcscanner.com/mcp \
--header "Authorization: Bearer YOUR_API_KEY"claude desktop and claude.ai
open settings → connectors → add custom connector, give it a name and paste this address with your key in it:
https://runner.cardlynfcscanner.com/mcp?key=YOUR_API_KEYthe key is part of the address here because these apps don't let you add headers. treat the whole address like a password.
cursor, windsurf and other apps (mcp.json)
{
"mcpServers": {
"runner": {
"type": "http",
"url": "https://runner.cardlynfcscanner.com/mcp",
"headers": { "Authorization": "Bearer YOUR_API_KEY" }
}
}
}vs code (.vscode/mcp.json)
{
"servers": {
"runner": {
"type": "http",
"url": "https://runner.cardlynfcscanner.com/mcp",
"headers": { "Authorization": "Bearer YOUR_API_KEY" }
}
}
}tools
download_media: turns a link into a download link. takes the same options as the rest api (url, mode, quality, audioFormat, …).get_usage: shows how much of today's limit is used.list_supported_sites: lists the most used supported sites.
raw json-rpc
for your own mcp client: send json-rpc 2.0 messages with POST. the server is stateless and answers with plain json.
curl -X POST https://runner.cardlynfcscanner.com/mcp \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"download_media","arguments":{"url":"https://vimeo.com/76979871"}}}'fair use
- only download content you own, that is in the public domain, or that you have permission to save. respect creators and copyright.
- don't share your key, resell access, or try to get around the limits with many keys. keys that break these rules are disabled.
- the api is free and offered as is. it can change, and a site can stop working when it changes. see the terms of service.