# M3U8 Downloader (`serpdownloaders/m3u8-downloader`) Actor

Browser extension for detecting HLS playlists, downloading stream segments, and merging them into local MP4 files with fully in-browser processing.

- **URL**: https://apify.com/serpdownloaders/m3u8-downloader.md
- **Developed by:** [SERP Downloaders](https://apify.com/serpdownloaders) (community)
- **Categories:** Videos, Automation, Social media
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## M3U8 Downloader (Browser Extension)

> Detect and download HLS/M3U8 streams from supported websites and save them as MP4 files.

M3U8 Downloader is a browser extension built for users who need a site-agnostic HLS workflow instead of a single-site downloader. It monitors supported media requests in your browser, detects M3U8/HLS streams and related video sources, and helps you export them into standard MP4 files without relying on command-line tools.

- Detect HLS/M3U8 streams from supported sites
- Save compatible streams as MP4 files
- Review multiple available stream variants and qualities
- Download media from browser-visible streaming sessions
- Use a browser workflow instead of FFmpeg or manual playlist extraction

### Links

- :rocket: Get it here: [M3U8 Downloader](https://serp.ly/m3u8-downloader)
- :new: Latest release: [GitHub Releases](https://github.com/serpapps/m3u8-downloader/releases/latest)
- :question: Help center: [SERP Help](https://help.serp.co/en/)
- :beetle: Report bugs: [GitHub Issues](https://github.com/serpapps/m3u8-downloader/issues)
- :bulb: Request features: [Feature Requests](https://github.com/serpapps/m3u8-downloader/issues)

### Preview

![M3U8 Downloader workflow preview](assets/workflow-preview.webp)

### Table of Contents

- [Why M3U8 Downloader](#why-m3u8-downloader)
- [Features](#features)
- [How It Works](#how-it-works)
- [Step-by-Step Tutorial: How to Download HLS Streams](#step-by-step-tutorial-how-to-download-hls-streams)
- [Supported Formats](#supported-formats)
- [Who It's For](#who-its-for)
- [Common Use Cases](#common-use-cases)
- [Troubleshooting](#troubleshooting)
- [Trial & Access](#trial--access)
- [Installation Instructions](#installation-instructions)
- [FAQ](#faq)
- [Notes](#notes)
- [About M3U8 / HLS](#about-m3u8--hls)

### Why M3U8 Downloader

HLS streams are not ordinary downloadable files. They are delivered through playlist manifests and media segments, which means right-click saving does not work and generic downloader tools often miss the real stream behind the page player. For many users, the alternatives are either fragile websites or technical command-line workflows.

M3U8 Downloader is built for that protocol-level use case. It watches browser-visible media requests, detects compatible stream sources, and gives you a cleaner way to export supported HLS media into a single local file.

### Features

- Automatic detection of compatible M3U8/HLS streams from browser activity
- Support for related direct video formats where exposed by the page
- MP4 export for compatible HLS workflows
- Quality and stream-variant selection where multiple options exist
- Download progress tracking for active exports
- Browser-based workflow without requiring FFmpeg commands
- Support for login-gated browser sessions when the stream is already available in the page context
- Cross-browser support for Chrome, Edge, Brave, Opera, Firefox, Whale, and Yandex

### How It Works

1. Install the extension from the latest release.
2. Open a supported website with an HLS or compatible media player.
3. Start playback so the browser loads the stream requests.
4. Open the extension popup to review detected streams.
5. Choose the stream or quality you want.
6. Download the media and save the final MP4 file locally.

### Step-by-Step Tutorial: How to Download HLS Streams

1. Install M3U8 Downloader from the latest GitHub release.
2. Navigate to a supported page that uses an HLS or related streaming player.
3. Press play so the stream manifest and segments start loading.
4. Click the extension button in your browser toolbar.
5. Review the detected media sources and available quality variants.
6. Select the stream you want to keep.
7. Start the download and wait for the MP4 export to complete.
8. Open the saved file from your Downloads folder.

### Supported Formats

- Input: M3U8 / HLS streams
- Input: Related compatible media sources where exposed by the page
- Output: MP4

The final export is designed to turn stream-based playback into a single easier-to-use local video file.

### Who It's For

- Users downloading HLS streams from supported sites
- Testers and QA users capturing browser-visible stream outputs
- Creators archiving their own streamed media
- Students or researchers preserving permitted streaming content for offline access
- Anyone who wants a browser-based HLS workflow instead of terminal tools

### Common Use Cases

- Save a compatible HLS stream from a supported site
- Export browser-visible M3U8 playback into a local MP4
- Review multiple quality variants before downloading
- Keep a local copy of content you are permitted to access
- Capture a stream that other generic downloaders fail to detect

### Troubleshooting

**The extension is not detecting the stream**  
Press play first and wait a few seconds so the manifest and segments start loading.

**No quality options are listed**  
Some players expose only one active stream variant.

**The site requires login**  
The extension only works on media you can already access in your current browser session.

**The stream still does not appear**  
Refresh the page, replay the media, and try again once the player is fully loaded.

**The page uses DRM**  
DRM-protected content is outside the supported scope of normal HLS capture workflows.

### Trial & Access

- Includes **3 free downloads** so you can test the workflow first
- Email sign-in uses secure one-time password verification
- No credit card required for the trial
- Unlimited downloads are available with a paid license

Start here: [https://serp.ly/m3u8-downloader](https://serp.ly/m3u8-downloader)

### Installation Instructions

1. Open the latest release page:
   [https://github.com/serpapps/m3u8-downloader/releases/latest](https://github.com/serpapps/m3u8-downloader/releases/latest)
2. Download the extension build for your browser.
3. Install the extension.
4. Open a supported page with streaming media.
5. Use the extension popup to detect and download the stream.

### FAQ

**What does this extension download?**  
Compatible HLS/M3U8 streams and related media sources that are visible to the browser on supported pages.

**Does it save videos as MP4?**  
Yes. Compatible stream workflows are exported as MP4 files.

**Do I need FFmpeg or terminal commands?**  
No. Everything runs through the browser extension workflow.

**Why do I have to press play first?**  
Because the stream usually is not exposed until the player actually starts loading media.

**Does it work on every streaming site?**  
No. It depends on the actual browser-visible media workflow and whether the stream is compatible with this extension's detection path.

### License

This repository is distributed under the proprietary SERP Apps license in the [LICENSE](LICENSE) file. Review that file before copying, modifying, or redistributing any part of this project.

### Notes

- Only download content you own or have explicit permission to save
- The extension only works when the stream is already accessible in your browser session
- DRM-protected media is outside the normal supported workflow
- Quality depends on what the player exposes for that stream

### About M3U8 / HLS

M3U8 and HLS are stream delivery formats used by many modern video players. They are excellent for adaptive playback, but awkward for ordinary users who want a local file because the media is split into playlists and segments rather than exposed as a single downloadable video. M3U8 Downloader simplifies that workflow in a browser-first way.

# Actor input Schema

## `listingNotice` (type: `string`):

Optional informational field only. This actor currently serves as the public listing surface for the browser extension and does not yet expose a finalized runtime API contract.

## Actor input object example

```json
{
  "listingNotice": "No runtime input is required yet. See the README and product page for the current extension workflow."
}
````

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("serpdownloaders/m3u8-downloader").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("serpdownloaders/m3u8-downloader").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 '{}' |
apify call serpdownloaders/m3u8-downloader --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=serpdownloaders/m3u8-downloader",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "M3U8 Downloader",
        "description": "Browser extension for detecting HLS playlists, downloading stream segments, and merging them into local MP4 files with fully in-browser processing.",
        "version": "0.0",
        "x-build-id": "4jq86jFdz2X16gO8n"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/serpdownloaders~m3u8-downloader/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-serpdownloaders-m3u8-downloader",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/serpdownloaders~m3u8-downloader/runs": {
            "post": {
                "operationId": "runs-sync-serpdownloaders-m3u8-downloader",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/serpdownloaders~m3u8-downloader/run-sync": {
            "post": {
                "operationId": "run-sync-serpdownloaders-m3u8-downloader",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "listingNotice": {
                        "title": "Listing notice",
                        "type": "string",
                        "description": "Optional informational field only. This actor currently serves as the public listing surface for the browser extension and does not yet expose a finalized runtime API contract.",
                        "default": "No runtime input is required yet. See the README and product page for the current extension workflow."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
