# Social Media Video Downloader: TikTok, Instagram, YouTube (`superlewis/social-media-video-extractor`) Actor

By apimodels.app. Get direct video, image and audio links plus captions and stats from TikTok, Instagram, YouTube, X and 1,000+ sites; whole profiles and playlists; YouTube subtitles. Runs on the apimodels.app Media Downloader API.

- **URL**: https://apify.com/superlewis/social-media-video-extractor.md
- **Developed by:** [Lucas Lewis](https://apify.com/superlewis) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 post extracteds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Social Media Video Downloader by apimodels.app: TikTok, Instagram, YouTube, X & 1,000+ sites

Paste links to public posts from **TikTok, Instagram, YouTube, X, Facebook, Xiaohongshu, Bilibili, Douyin and 1,000+ other sites** and get **direct download links to every video, image and audio file**, plus the caption, author, publish time and view counts, as structured JSON. You can also pull **every post from a profile, channel, playlist or hashtag**, download **YouTube subtitle tracks**, or get **YouTube files through 1-hour proxy links**.

This Actor is built and run by **[apimodels.app](https://apimodels.app/?utm_source=apify\&utm_medium=referral\&utm_campaign=social-media-video-extractor)**, an AI API platform with one API key for 180+ models. It is a thin client for the **[apimodels.app Media Downloader API](https://apimodels.app/docs/media-downloader?utm_source=apify\&utm_medium=referral\&utm_campaign=social-media-video-extractor)**: each mode below is one API endpoint you can also call from your own code.

### Modes

| Mode | What it returns | apimodels.app endpoint |
|---|---|---|
| **Post** (default) | One post: video, image and audio links in every available quality, cover, caption, author, stats | `POST /v1/media/extract` |
| **Profile / channel / playlist / hashtag** | Every post on the page, page by page, up to the page limit you set | `POST /v1/media/playlist` |
| **Subtitles** | Subtitle tracks of a YouTube or Bilibili video (srt, vtt, json3) | `POST /v1/media/subtitles` |
| **YouTube download** | YouTube video and audio files through proxy links that work from anywhere for 1 hour | `POST /v1/media/youtube-download` |

Need the spoken words instead of the files? Use the **[Video Transcriber by apimodels.app](https://apify.com/superlewis/video-transcriber)**, which turns the same links into text, timestamps, translations and AI summaries.

### Pricing

Billed per successful request. **Links that fail are never charged.**

**Pay per result on Apify** (paid Apify plans, no API key needed):

| Mode | Price |
|---|---|
| Post | $0.005 per link |
| Profile / channel / playlist / hashtag | $0.025 per page of posts |
| Subtitles | $0.005 per video |
| YouTube download | $0.015 per video |

Examples: 1,000 posts in Post mode cost **$5**; a profile page of about 30 TikTok posts costs **$0.025**.

**Or use your own apimodels.app API key.** Create a key at [apimodels.app](https://apimodels.app/console/api-keys?utm_source=apify\&utm_medium=referral\&utm_campaign=social-media-video-extractor) and paste it into the input. Requests are then billed to your apimodels.app balance at apimodels.app prices, and nothing is charged on Apify. **On the Apify free plan an API key is required.**

### How to use

1. Paste one or more links (up to 500 per run).
2. Pick the mode. For profiles, set how many pages to fetch.
3. Optional: paste your apimodels.app API key.
4. Start the run. Results appear in the **Output** tab.
5. Download the files soon: direct links are short-lived.

### Input example

```json
{
  "urls": ["https://www.tiktok.com/@tiktok"],
  "mode": "profile",
  "maxPages": 2
}
```

### Output example

One dataset item per post (shortened):

```json
{
  "ok": true,
  "platform": "tiktok",
  "postUrl": "https://www.tiktok.com/@tiktok/video/7708408003065580831",
  "title": "You know their game 🎾 But are the @WTA singles stars ready for your TikTok comments?",
  "author": { "username": "tiktok" },
  "durationSeconds": 79,
  "coverUrl": "https://...",
  "videoUrl": "https://...",
  "audioUrl": "https://...",
  "mediaCount": 2,
  "medias": [{ "type": "video", "bestQuality": "720p", "variants": [{ "quality": "720p", "videoUrl": "https://..." }] }],
  "billing": "apify",
  "poweredBy": "apimodels.app",
  "apiDocs": "https://apimodels.app/docs/media-downloader"
}
```

When a media item lists `requestHeaders` (for example a Referer), send them with your download request. When a quality has both `videoUrl` and `audioUrl`, the tracks are separate: download both and merge them, for example with `ffmpeg -i video.mp4 -i audio.m4a -c copy out.mp4`.

### Use the same API in your own code

Every mode is one request to the apimodels.app Media Downloader API, with one API key and one balance shared with 180+ other AI models. On apimodels.app a post costs $0.004, a profile page $0.02, subtitles $0.004 and a YouTube download $0.012. Get a key at [apimodels.app](https://apimodels.app/console/api-keys?utm_source=apify\&utm_medium=referral\&utm_campaign=social-media-video-extractor).

```bash
curl -X POST https://api.apimodels.app/v1/media/extract \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://www.instagram.com/p/POST_ID/"}'
```

The response arrives in the same HTTP call. Full fields, paging, error codes and Python / Node.js examples: [Media Downloader API docs](https://apimodels.app/docs/media-downloader?utm_source=apify\&utm_medium=referral\&utm_campaign=social-media-video-extractor).

### About apimodels.app

[apimodels.app](https://apimodels.app/?utm_source=apify\&utm_medium=referral\&utm_campaign=social-media-video-extractor) is an AI API platform: one API key and one balance for 180+ models across image, video, speech, music and language (GPT, Claude, Gemini, Seedance, Kling, Veo, Nano Banana, ElevenLabs and more), plus utility APIs such as this Media Downloader and speech-to-text transcription. Requests are routed across several upstream channels with automatic fallback, and failed requests are never charged. Other apimodels.app Actors on Apify: [Video Transcriber](https://apify.com/superlewis/video-transcriber), [Seedream 5.5](https://apify.com/superlewis/seedream-5-5-image-generator-editor), [Nano Banana 2.1](https://apify.com/superlewis/nano-banana-image-generator), [GPT Image 2.6](https://apify.com/superlewis/gpt-image-2-6-generator-images-gif-svg), [Seedance 2.5](https://apify.com/superlewis/seedance-2-5-video-generator) and [Kling 4.0](https://apify.com/superlewis/kling-4-0-video-generator).

### Limits to know

- Only public posts work. Private, deleted or login-only content cannot be fetched.
- Direct links are short-lived (YouTube proxy links last up to 1 hour). Download the files, do not store the links.
- Profile pages list posts with fewer fields than Post mode. For every quality of one post, run it again in Post mode.
- Some sites need the listed `requestHeaders` when downloading, or the file host refuses the request.
- YouTube proxy files are available up to 3 GiB and up to 1080p.

### FAQ

**Is this the official TikTok, Instagram or YouTube API?** No. It is an independent service by apimodels.app that works with public posts.

**Which sites are supported?** TikTok, Instagram, YouTube, X, Facebook, Xiaohongshu, Bilibili, Weibo, Douyin and 1,000+ others. Unsupported links return an error and are not charged.

**Something failed. Was I charged?** No. Only successful requests are charged, on Apify or on your apimodels.app balance.

**Can I use the downloaded content?** Only download content you own or have permission to use, and respect each platform's terms and copyright.

# Actor input Schema

## `urls` (type: `array`):

Public post links (Post, Subtitles and YouTube download modes) or profile / channel / playlist / hashtag links (Profile mode). Up to 500 per run.

## `mode` (type: `string`):

Post: one post with all its files. Profile: every post on a profile, channel, playlist or hashtag. Subtitles: YouTube / Bilibili subtitle tracks. YouTube download: YouTube files through 1-hour proxy links.

## `maxPages` (type: `integer`):

Profile mode only. Each page holds about 10 to 35 posts and costs $0.025 on Apify.

## `apiKey` (type: `string`):

Leave empty on a paid Apify plan to pay per request on Apify. Required on the Apify free plan: create a key at https://apimodels.app/console/api-keys and everything is billed to your apimodels.app balance instead (nothing is charged on Apify).

## Actor input object example

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw"
  ],
  "mode": "extract",
  "maxPages": 1
}
```

# Actor output Schema

## `results` (type: `string`):

One item per link with its result, plus an error message for links that failed (not charged). Powered by apimodels.app.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "urls": [
        "https://www.youtube.com/watch?v=jNQXAC9IVRw"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("superlewis/social-media-video-extractor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "urls": ["https://www.youtube.com/watch?v=jNQXAC9IVRw"] }

# Run the Actor and wait for it to finish
run = client.actor("superlewis/social-media-video-extractor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw"
  ]
}' |
apify call superlewis/social-media-video-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,superlewis/social-media-video-extractor"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/S4T7GO13CgFKvSQbn/builds/pa5I2cBBdp4sE4gRO/openapi.json
