# Video Download Link Crawler (`rodrigo91/video-download-link-crawler`) Actor

Automatically discover and extract video download links from any website. Crawl through multiple pages, follow custom link patterns, and export results in JSON, CSV, HTML, or XML formats. Perfect for content creators, researchers, and media professionals.

- **URL**: https://apify.com/rodrigo91/video-download-link-crawler.md
- **Developed by:** [Rodrigo Franco](https://apify.com/rodrigo91) (community)
- **Categories:** Automation, Videos
- **Stats:** 106 total users, 3 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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/platform/actors/running/actors-in-store#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 Download Link Crawler

🎥 **What it does**

The Video Download Link Crawler is a powerful web scraping tool that automatically discovers and extracts video download links from websites. Simply provide a starting URL, and the actor will intelligently crawl through pages to find downloadable videos in popular formats like MP4, AVI, MOV, MKV, WebM, and more.

### ⚡ Key Features

- **Smart Video Detection**: Finds video links in multiple ways - direct file links, embedded videos, download buttons, and video elements
- **Customizable Crawling**: Control which links to follow using regular expressions
- **Multiple Export Formats**: Get results in JSON, CSV, HTML, or XML format
- **Depth Control**: Set maximum crawling depth to avoid infinite loops
- **Real-time Usage Tracking**: Monitor events and costs as they happen
- **Transparent Billing**: See exactly what you're paying for with event-by-event tracking
- **Error Handling**: Robust error handling ensures reliable results even when some pages fail
- **Metadata Extraction**: Captures video titles, formats, source URLs, and discovery timestamps

### 🎯 Perfect for

- **Content Creators**: Find video samples and resources for projects
- **Researchers**: Gather video data for academic or market research
- **Media Companies**: Discover video content across competitor websites
- **Digital Marketers**: Analyze video content strategies
- **Developers**: Integrate video discovery into applications via API

### 🚀 How it works

1. **Start URL**: Enter the website where you want to begin crawling
2. **Configure Patterns**: Set regex patterns to control which links to follow and which videos to find
3. **Set Limits**: Choose maximum pages and crawling depth
4. **Export Format**: Select your preferred output format
5. **Run & Export**: Get comprehensive results with all discovered video links

### 📊 What you get

Each discovered video includes:

- Direct download URL
- Source page where it was found
- Video title and format
- Discovery timestamp
- Crawling depth level
- Event number for billing transparency

### 💰 Usage & Billing

#### How Events Are Counted

- **Each page processed = 1 billable event**
- Failed page requests are NOT counted as events
- Set `maxPages` to control your maximum usage and costs

#### Real-time Monitoring

- Watch event counters in the run logs
- Get progress updates every 10 events
- Receive warnings at 80% of your usage limit
- See comprehensive usage summary at the end

#### Cost Control

Control your costs by setting the `maxPages` parameter:

```json
{
  "startUrl": "https://example.com",
  "maxPages": 100,
  "videoRegex": "\\.(mp4|webm|mov)$"
}
```

#### Usage Summary Includes

- Total events processed vs. your limit
- Videos found and efficiency metrics
- Failed requests (not billed)
- Duration and performance statistics
- Cost breakdown and savings

### 📋 Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `startUrl` | string | Yes | - | The URL where crawling begins |
| `videoRegex` | string | No | `\\.(mp4\|avi\|mov\|mkv\|webm\|m4v)$` | Pattern to identify video files |
| `linkRegex` | string | No | `.*` | Pattern to match URLs to follow |
| `maxPages` | integer | No | 100 | Maximum pages to crawl (= max events) |
| `maxCrawlDepth` | integer | No | 3 | Maximum depth of crawling |
| `outputFormat` | string | No | JSON | Export format (JSON, CSV, HTML, XML) |

### 💡 Use Cases

- **Video Content Aggregation**: Build databases of video content from multiple sources
- **Competitive Analysis**: Monitor competitor video strategies and content
- **Research Projects**: Gather video data for academic or business research
- **Content Discovery**: Find inspiration and resources for creative projects
- **Media Monitoring**: Track video content across industry websites
- **Archive Building**: Create comprehensive video link collections

### 🔧 Technical Specifications

- **Supported Formats**: MP4, AVI, MOV, MKV, WebM, M4V, FLV, HEVC, MPG, M2TS, OGV, and more
- **Export Options**: JSON, CSV, HTML, XML with usage metadata
- **Rate Limiting**: Built-in respectful crawling with configurable limits
- **Error Recovery**: Automatic retries and graceful failure handling
- **Memory Efficient**: Optimized for large-scale crawling operations
- **Real-time Tracking**: Live usage monitoring and cost control

### 📈 Pricing

Our transparent pay-per-event pricing ensures you only pay for what you use:

- **Free Tier**: $0.00001 per event (effectively free for small usage)
- **Basic Plan**: $9.99 per event tier
- **Pro Plan**: $29.99 per event tier
- **Enterprise**: $99.90 per event tier

#### Example Costs

- **100 pages** = 100 events = Free tier usage
- **1,000 pages** = 1,000 events = Basic tier
- **10,000 pages** = 10,000 events = Pro tier

### 🛡️ Responsible Usage

This actor is designed for legitimate use cases such as research, content discovery, and competitive analysis. Users are responsible for:

- Complying with website terms of service
- Respecting robots.txt files
- Following applicable copyright laws
- Using reasonable rate limits

### 🎯 Why Choose This Actor?

- **Battle-tested**: Built with modern Crawlee framework for reliability
- **Transparent**: Real-time usage tracking and clear billing
- **Flexible**: Highly customizable regex patterns and crawling rules
- **User-friendly**: Simple input configuration with powerful results
- **Professional**: Enterprise-grade error handling and performance
- **Cost-effective**: Pay only for pages actually processed
- **Support**: Active maintenance and customer support

### 🚀 Quick Start Examples

#### Basic Video Search

```json
{
  "startUrl": "https://sample-videos.com/",
  "maxPages": 50,
  "videoRegex": "\\.(mp4|webm|mov)$"
}
```

#### Focused Crawling

```json
{
  "startUrl": "https://example.com/videos",
  "linkRegex": "example\\.com.*video",
  "maxCrawlDepth": 2,
  "maxPages": 100
}
```

#### CSV Export

```json
{
  "startUrl": "https://media-site.com",
  "outputFormat": "CSV",
  "maxPages": 200
}
```

### 📝 Output Examples

#### JSON Output

```json
[
  {
    "eventNumber": 1,
    "videoUrl": "https://example.com/video.mp4",
    "sourceUrl": "https://example.com/page1",
    "title": "Sample Video",
    "format": "mp4",
    "foundAt": "2025-07-16T19:30:00.000Z",
    "depth": 0
  }
]
```

#### Usage Summary

```json
{
  "totalEvents": 47,
  "totalVideos": 23,
  "videosFound": 23,
  "exportedAt": "2025-07-16T19:35:00.000Z",
  "format": "JSON"
}
```

### 🔍 Monitoring Your Usage

During execution, you'll see:

```
=== USAGE TRACKING ===
Maximum pages to crawl: 100
Each page = 1 billable event
Estimated maximum cost: 100 events
=====================

Event #1: Processing https://example.com (depth: 0)
Found 2 video links on https://example.com
📊 PROGRESS: 10/100 events processed
⚠️  WARNING: Approaching usage limit (80/100 events)

🔍 === FINAL USAGE SUMMARY ===
📊 Total Events Processed: 95 / 100
🎥 Videos Found: 45
💰 Billable Events: 95
💡 You used 5 fewer events than your limit
```

### 🆘 Support

Need help? We're here for you:

- Check the [examples](#-quick-start-examples) above
- Review the [input parameters](#-input-parameters) table
- Monitor your usage with real-time tracking
- Contact support through Apify platform

Start discovering video content today with the most reliable and transparent video link crawler on Apify!

# Actor input Schema

## `startUrl` (type: `string`):

The URL where crawling will begin

## `videoRegex` (type: `string`):

Regular expression to identify video download links

## `linkRegex` (type: `string`):

Regular expression to match URLs to follow

## `maxCrawlDepth` (type: `integer`):

Maximum depth of crawling (0 = start URL only)

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

Maximum number of pages to crawl. Each page = 1 billable event.

## `outputFormat` (type: `string`):

Export format for results

## Actor input object example

```json
{
  "startUrl": "https://sample-videos.com/",
  "videoRegex": "\\.(mp4|webm|mov)$",
  "linkRegex": "example\\.com",
  "maxCrawlDepth": 2,
  "maxPages": 50,
  "outputFormat": "JSON"
}
```

# 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 = {
    "startUrl": "https://sample-videos.com/",
    "videoRegex": "\\.(mp4|avi|mov|mkv|webm|m4v)$",
    "linkRegex": "sample-videos\\.com",
    "maxCrawlDepth": 2,
    "maxPages": 5,
    "outputFormat": "JSON"
};

// Run the Actor and wait for it to finish
const run = await client.actor("rodrigo91/video-download-link-crawler").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 = {
    "startUrl": "https://sample-videos.com/",
    "videoRegex": "\\.(mp4|avi|mov|mkv|webm|m4v)$",
    "linkRegex": "sample-videos\\.com",
    "maxCrawlDepth": 2,
    "maxPages": 5,
    "outputFormat": "JSON",
}

# Run the Actor and wait for it to finish
run = client.actor("rodrigo91/video-download-link-crawler").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "startUrl": "https://sample-videos.com/",
  "videoRegex": "\\\\.(mp4|avi|mov|mkv|webm|m4v)$",
  "linkRegex": "sample-videos\\\\.com",
  "maxCrawlDepth": 2,
  "maxPages": 5,
  "outputFormat": "JSON"
}' |
apify call rodrigo91/video-download-link-crawler --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=rodrigo91/video-download-link-crawler",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

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