Skip to main content

XVideos API

An asynchronous Python API wrapper and scraper for xvideos.com

Downloads + Downloads CodeQL Analysis Sync API Tests

Disclaimer

[!IMPORTANT] This is an unofficial and unaffiliated project. Please read the full disclaimer before use: DISCLAIMER.md

By using this project you agree to comply with the target site's rules, copyright/licensing requirements, and applicable laws. Do not use it to bypass access controls or scrape at disruptive rates.


Features

Category Details
Video Fetching Fetch video objects with full metadata (title, description, views, publish date, ratings, author, and associated models)
Video Downloading HLS-based downloading with configurable quality (best, half, worst, or specific resolutions)
Channel & Pornstar Profiles Fetch channel/pornstar/model profiles, retrieve videos, and extract worked-with-models metadata
Playlist Fetching Fetch and iterate through playlists page-by-page with concurrency control
Video Search Search videos with advanced filters for sorting, upload date, duration, and quality
Account Support Connect user account via login cookies to retrieve personalized watch later, favorites, and recommended videos
Async-First Fully asynchronous (async / await) built on top of asyncio
Built-in Caching Automatic response caching with configurable limits to reduce redundant network requests
CLI Support Command-line interface for quick downloads — run xvideos_api -h for options
Type Safety Comprehensive type hinting and dataclass-based models throughout

Networking Features

The networking layer is provided by the eaf_base_api package and is fully configurable through RuntimeConfig:

Feature Description
HTTP/1.1, HTTP/2, HTTP/3 Configurable HTTP version (v1, v2, v3 — defaults to HTTP/3)
Browser Impersonation Built-in browser fingerprint impersonation via curl_cffi (defaults to Chrome)
Custom JA3 Fingerprint Override the TLS fingerprint with a custom JA3 string for advanced use cases
Proxy Support All proxy types supported (HTTP, HTTPS, SOCKS4, SOCKS5)
Proxy Authentication Username/password authentication for proxies
Bandwidth Limiting Set a maximum download speed in MB/s (e.g., 2.0, 3.5)
DNS over HTTPS Route DNS queries over HTTPS for privacy and bypassing DNS-level blocks
SSL Verification Toggle SSL certificate verification on or off
Request Delay Configurable delay between requests to respect rate limits
Concurrency Control Tune video and page concurrency independently for optimal throughput

Supported Platforms

This API has been tested and confirmed working on:

  • Windows 11 (x64)
  • macOS Sequoia (x86_64)
  • Linux (Arch) (x86_64)
  • Android 16 (aarch64)

Installation

pip install unofficial-api-for-xvideos

Quickstart

Have a look at the Documentation for more details

[!NOTE] XVideos API can also be used from the command line. Do: xvideos_api -h to see the options

import asyncio
from xvideos_api import Client, DownloadConfigHLS

async def main():
    # Initialize a Client object
    client = Client()
    
    # Fetch a video
    video_object = await client.get_video("<insert_url_here>")
    
    # Information from Video objects
    print(video_object.title)

    # Download the video
    config = DownloadConfigHLS(quality="best", path="./") # More options in the documentation
    await video_object.download(config)

if __name__ == "__main__":
    asyncio.run(main())

Support the Project ❤️

I develop all my projects entirely for free because I enjoy it and want to keep them accessible. If you find my work useful, please consider supporting me with a small donation — even 1 € makes a big difference and keeps me motivated!

☕ Ko-fi

https://ko-fi.com/EchterAlsFake

💳 PayPal

https://paypal.me/EchterAlsFake

🪙 Crypto (350+ currencies supported)

Crypto donation button by NOWPayments

Contribution

Do you see any issues or having some feature requests? Simply open an Issue or talk in the discussions.

Pull requests are also welcome.

License

This API is licensed under the AGPLv3. See the LICENSE file for details.

[!CAUTION] Using this in a proprietary application? Under the AGPLv3, if you integrate, modify, or host this API as part of your application (even over a network), you must open-source your entire application's code under the AGPL.

If you want to use this API without open-sourcing your own code, you must purchase a commercial license.

For commercial licensing, contact: EchterAlsFakeBS@proton.me

Metadata

Release files for unofficial-api-for-xvideos 2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for unofficial-api-for-xvideos 2.5
File Size Uploaded
unofficial_api_for_xvideos-2.5.tar.gz 25.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for unofficial-api-for-xvideos 2.5
File Interpreter ABI Platform
unofficial_api_for_xvideos-2.5-py3-none-any.whl Python 3 none any Details

Total release size: 52.7 kB

Release files / unofficial_api_for_xvideos-2.5.tar.gz

Download URL unofficial_api_for_xvideos-2.5.tar.gz
Size 25.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e60042aaac1436d6f97abf6adf00422990aa98ffe8e002ed2c02e9881395bc7f
BLAKE2b-256 checksum
How to use checksums
08ea15b2930c0bf01378ef4f43aeb71480132349e37a89ba27661bdacd24bdd5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.5 {"installer":{"name":"uv","version":"0.10.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / unofficial_api_for_xvideos-2.5-py3-none-any.whl

Download URL unofficial_api_for_xvideos-2.5-py3-none-any.whl
Size 27.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9c8388f400e32d39e0dd0d938c3a0e509da1997f45e59330d9e72a71b87114e2
BLAKE2b-256 checksum
How to use checksums
1e0d6c5e4dfbc8f1f185b9604b92df924af7c7a240196ad6c92405fb8acb96e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.5 {"installer":{"name":"uv","version":"0.10.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

2.5.1

2 release files

This release

2.5 This release

2 release files

2.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page