# Video Link Extractor — Any URL (`nexgendata/video-link-extractor`) Actor

Find downloadable video links on ANY URL: direct video pages (YouTube, Vimeo, TikTok, 1,800+ sites), embedded videos in articles/blogs/courses, or whole-site crawls. Built on yt-dlp + HTML scraping for native video, iframe, and JSON-LD embeds.

- **URL**: https://apify.com/nexgendata/video-link-extractor.md
- **Developed by:** [NexGenData](https://apify.com/nexgendata) (community)
- **Categories:** Videos
- **Stats:** 6 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 video links

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Video Link Extractor

Any URL

### 📊 What you get

Clean JSON output (6 fields):

- `url` — Url
- `video_url` — Video url
- `type` — Type
- `title` — Title
- `thumbnail` — Thumbnail
- `source` — Source

**Pricing:** Pay-Per-Event; see the Pricing tab.

### 🤖 Use with AI agents

Point Claude, the OpenAI Agents SDK, an n8n flow or any MCP-aware client at it.

**Sample agent prompt:**

```
Run Video Link Extractor on my input and return the structured results.
```

**Agentic payments (x402):** Supports agentic payment via x402 — call this actor with USDC, no API key required.

### 🔗 Related tools — Video tools

[YouTube Metadata](https://apify.com/nexgendata/yt-dlp-video-tools) · [Universal Video Extractor](https://apify.com/nexgendata/universal-video-extractor) · [YouTube Transcripts](https://apify.com/nexgendata/youtube-transcript-scraper)

## *This actor is currently private — treated and ready for review.*

*A NexGenData utility actor.*

# Actor input Schema

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

How to interpret the input URLs. 'single\_url' extracts from one URL, 'url\_list' processes a batch, and 'crawl\_site' spiders the seed domain and extracts videos from each page it finds.

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

One or more URLs to process. In single\_url and crawl\_site modes the first entry is used. In url\_list mode every URL is processed independently. Accepts any web page — direct video pages (YouTube, Vimeo, TikTok, etc.) or arbitrary pages with embedded video.

## `maxVideos` (type: `integer`):

Maximum number of dataset items (videos) to emit across this run. Each item costs one PPE event.

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

When mode = crawl\_site, the maximum number of pages to visit while spidering the seed domain looking for videos.

## `sameDomainOnly` (type: `boolean`):

When mode = crawl\_site, restrict the crawler to URLs on the same domain as the seed.

## `embeddedOnly` (type: `boolean`):

Skip the direct yt-dlp attempt on the page URL and only look for embedded videos via HTML scraping (<video>, <iframe>, JSON-LD VideoObject, OpenGraph). Useful when the page itself isn't a video page but contains one.

## `subtitles` (type: `boolean`):

Include available subtitle/caption track languages in each result.

## `useResidentialProxy` (type: `boolean`):

Route requests through Apify's residential proxy pool. Recommended ON — datacenter IPs are frequently rate-limited or blocked by YouTube/TikTok/Instagram.

## Actor input object example

```json
{
  "mode": "single_url",
  "urls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "maxVideos": 50,
  "maxPages": 25,
  "sameDomainOnly": true,
  "embeddedOnly": false,
  "subtitles": false,
  "useResidentialProxy": true
}
```

# 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 = {
    "mode": "single_url",
    "urls": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    ],
    "maxVideos": 50,
    "maxPages": 25,
    "sameDomainOnly": true,
    "embeddedOnly": false,
    "subtitles": false,
    "useResidentialProxy": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("nexgendata/video-link-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 = {
    "mode": "single_url",
    "urls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
    "maxVideos": 50,
    "maxPages": 25,
    "sameDomainOnly": True,
    "embeddedOnly": False,
    "subtitles": False,
    "useResidentialProxy": True,
}

# Run the Actor and wait for it to finish
run = client.actor("nexgendata/video-link-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 '{
  "mode": "single_url",
  "urls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "maxVideos": 50,
  "maxPages": 25,
  "sameDomainOnly": true,
  "embeddedOnly": false,
  "subtitles": false,
  "useResidentialProxy": true
}' |
apify call nexgendata/video-link-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nexgendata/video-link-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/4tEmcw5bSZV17r4ru/builds/oXVv2y69sPhlj4mEj/openapi.json
