Skip to main content

YouPorn API

An asynchronous Python API wrapper and scraper for youporn.com

Downloads + Downloads CodeQL Analysis Sync API Tests

Disclaimer


Features

Category Details
Video Fetching Fetch video objects with metadata, associated pornstars, and author details
HLS/RAW Downloading Support for both HLS-based and RAW/direct downloading with quality selection and fallbacks
Pornstar & Channel Profiles Fetch pornstar/user/channel profiles including total video count, and query their video lists
Collection Fetching Fetch and iterate through YouPorn collections and their videos
Video Search Search videos with advanced filters (relevance, duration minimum/maximum, resolution)
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
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-youporn

Quickstart

Have a look at the Documentation for more details

import asyncio
from youporn_api import Client, DownloadConfigHLS, DownloadConfigRAW

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 using HLS (or RAW fallback)
    config = DownloadConfigHLS(quality="best", path="./") # More options in the documentation
    await video_object.download(config, backup_configuration=DownloadConfigRAW(quality="best", path="./"))

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.

Metadata

Release files for unofficial-api-for-youporn 1.8.1

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-youporn 1.8.1
File Size Uploaded
unofficial_api_for_youporn-1.8.1.tar.gz 27.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for unofficial-api-for-youporn 1.8.1
File Interpreter ABI Platform
unofficial_api_for_youporn-1.8.1-py3-none-any.whl Python 3 none any Details

Total release size: 55.9 kB

Release files / unofficial_api_for_youporn-1.8.1.tar.gz

Download URL unofficial_api_for_youporn-1.8.1.tar.gz
Size 27.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c0ca0a5a1ddf2df08d7b4f9d21ed6c1421f95037f7d8780947ca5dea8a3360e1
BLAKE2b-256 checksum
How to use checksums
320be59d249aea74f3c2ac21d4c8bc6dc808235daab256adee7db91220d762d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","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_youporn-1.8.1-py3-none-any.whl

Download URL unofficial_api_for_youporn-1.8.1-py3-none-any.whl
Size 28.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fb23a40a08a1428f5f1242f6426a5333d429cee6a01dcf23d1ad1c25dd7d0cbf
BLAKE2b-256 checksum
How to use checksums
be57855965e12996dd90f670971cfdd03159095de602cf31b124da535731b2ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","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

This release

1.8.1 This release

2 release files

1.8

2 release files

1.7

2 release files

1.6

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