# XHamster Downloader (`serpxxx/xhamster-video-downloader`) Actor

XHamster Downloader detects supported XHamster video streams, shows the available quality options, and exports the video as MP4 for offline playback directly in your browser.

- **URL**: https://apify.com/serpxxx/xhamster-video-downloader.md
- **Developed by:** [SERP X](https://apify.com/serpxxx) (community)
- **Categories:** Videos, Automation, Social media
- **Stats:** 16 total users, 1 monthly users, 100.0% runs succeeded, 1 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

## XHamster Downloader (Browser Extension)

> Download supported XHamster videos as MP4 files directly from watch pages in your browser.

### Links

Get it here: https://serp.ly/xhamster-video-downloader

XHamster Downloader is a browser extension built for users who want a cleaner way to save supported XHamster videos for offline viewing. It detects the active media source on the page, surfaces available quality options when present, and exports the final file as MP4 without requiring manual stream extraction.

- Save supported XHamster videos from watch pages
- Detect available quality variants exposed by the player
- Export MP4 files for offline playback and archiving
- Avoid manual source digging in page scripts
- Keep the whole workflow browser-native
### Table of Contents

- [Why XHamster Downloader](#why-xhamster-downloader)
- [Features](#features)
- [How It Works](#how-it-works)
- [Step-by-Step Tutorial: How to Download Videos from XHamster](#step-by-step-tutorial-how-to-download-videos-from-xhamster)
- [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)
- [License](#license)
- [Notes](#notes)
- [About XHamster](#about-xhamster)

### Why XHamster Downloader

XHamster video pages can expose multiple media variants and player states, which makes generic download tools noisy and unreliable. A loose scan can surface the wrong asset or fail once the page swaps between different delivery methods during playback.

XHamster Downloader is built to simplify that workflow. Start the video, let the extension detect the supported stream, choose the quality you want, and export the result as MP4 from inside the browser.

### Features

- Detects supported XHamster video sources from active watch pages
- Multi-source video detection including initials, xplayer, HTML5 video, and CDN monitoring
- Lists available quality variants when present
- In-page download button built into the video player
- Exports MP4 files for simpler offline viewing
- Right-click context menu for quick downloads
- Automatic saving into a dedicated XHAMSTER folder
- Works on all xHamster domains and regional mirrors
- Works on Chrome, Edge, Brave, Opera, Firefox, Whale, and Yandex

### How It Works

1. Install the extension from the latest release.
2. Open xHamster and visit a video page.
3. Start playback so the extension can detect the stream.
4. Open the popup or use the in-page download button.
5. Choose the quality or stream option you want.
6. Download the video as MP4.
7. Save the final file locally.

### Step-by-Step Tutorial: How to Download Videos from XHamster

1. Install XHamster Downloader from the latest GitHub release.
2. Open xHamster and sign in if the page you want requires account access.
3. Visit the video page you want to keep.
4. Let the player load fully and press play.
5. Click the in-page download button on the player, or open the extension popup.
6. Review the quality options shown by the extension.
7. Select the resolution you want if multiple options appear.
8. Start the download and wait for the MP4 export to finish.
9. Open the saved file from your Downloads folder.

### Supported Formats

- Input: supported XHamster video sources (HLS, direct MP4)
- Output: MP4

Saved files use MP4 so they are easier to replay on standard media players, move between devices, or archive locally.

### Who It's For

- XHamster viewers who want offline copies of supported videos
- Users who prefer a browser extension over manual extraction
- People archiving videos they already have access to in the browser
- Users who want a simple MP4 download workflow
- Anyone who needs downloads to work across xHamster mirror domains

### Common Use Cases

- Save an XHamster video for later viewing
- Export the best available quality as MP4
- Avoid manual source extraction from the player
- Keep offline copies for personal playback
- Download from xHamster mirror sites when the main domain is unavailable

### Troubleshooting

**The extension is not detecting the video**
Start playback first and wait for the player to initialize the active source.

**No quality selector appears**
Some pages expose only one usable stream, so only one option may be available.

**The detected source seems incomplete**
Refresh the page and retry after playback starts again.

**The download stopped partway through**
Check whether your internet connection dropped during the download.

**The page requires account or paid access**
The extension only works on media you can already open and play in your active browser session.

### 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/xhamster-video-downloader](https://serp.ly/xhamster-video-downloader)

### Installation Instructions

1. Open the latest release page: [GitHub Releases](https://github.com/serpxxx/xhamster-video-downloader/releases/latest)
2. Download the correct build for your browser.
3. Install the extension.
4. Open an XHamster watch page.
5. Use the popup to detect and download the media.

### FAQ

**Can I download XHamster videos as MP4?**
Yes. Supported downloads are exported as MP4 files.

**Do I need extra software?**
No. The workflow stays inside the browser extension.

**Where are videos saved?**
They are saved to your default Downloads location, typically inside an XHAMSTER subfolder.

**Does it work on xHamster mirror sites?**
Yes. The extension supports xhamster.com and regional mirrors including xhamster.one, xhamster.desi, xhms.pro, and others.

**What quality options are available?**
The extension detects all available qualities from the source, typically multiple resolutions from 144p to 1080p or higher.

**Will it work on every page?**
It works on supported playback flows. Detection depends on how the active page exposes the media source.

### License

This repository is distributed under the proprietary SERP Apps license in the [LICENSE](https://github.com/serpxxx/xhamster-video-downloader/blob/main/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
- An internet connection is required for downloads
- Must press play before the extension can detect the video stream
- Quality depends on the media exposed by xHamster
- xHamster has many mirror domains; try a different mirror if one is blocked

### About XHamster

XHamster is a large video platform with player-managed playback and multiple encodings on many watch pages. XHamster Downloader is built to make supported downloads easier for users who already have access to those videos in the browser.

# 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("serpxxx/xhamster-video-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("serpxxx/xhamster-video-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 serpxxx/xhamster-video-downloader --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "XHamster Downloader",
        "description": "XHamster Downloader detects supported XHamster video streams, shows the available quality options, and exports the video as MP4 for offline playback directly in your browser.",
        "version": "0.0",
        "x-build-id": "RUma14MjAHunwC3WL"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/serpxxx~xhamster-video-downloader/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-serpxxx-xhamster-video-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/serpxxx~xhamster-video-downloader/runs": {
            "post": {
                "operationId": "runs-sync-serpxxx-xhamster-video-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/serpxxx~xhamster-video-downloader/run-sync": {
            "post": {
                "operationId": "run-sync-serpxxx-xhamster-video-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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
