Skip to main content

YouPorn API

An asynchronous Python API wrapper and scraper for youporn.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 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.

[!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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

unofficial_api_for_youporn-1.8.tar.gz (23.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

unofficial_api_for_youporn-1.8-py3-none-any.whl (24.6 kB view details)

Uploaded Python 3

File details

Details for the file unofficial_api_for_youporn-1.8.tar.gz.

File metadata

  • Download URL: unofficial_api_for_youporn-1.8.tar.gz
  • Upload date:
  • Size: 23.4 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for unofficial_api_for_youporn-1.8.tar.gz
Algorithm Hash digest
SHA256 8d1e2f6394231ba28db9679cb9f03266114c0f7767dddfbcb0d7c09fd25529ec
MD5 4d2e9673b0838ba34f7a82e7b09bfdef
BLAKE2b-256 d917e8d9bee641939d3a045dc2a6be1830fc563be98ba934e68ee8dfc1fb4ccd

See more details on using hashes here.

File details

Details for the file unofficial_api_for_youporn-1.8-py3-none-any.whl.

File metadata

  • Download URL: unofficial_api_for_youporn-1.8-py3-none-any.whl
  • Upload date:
  • Size: 24.6 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for unofficial_api_for_youporn-1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 deb31c86974a96be2fad713e580b36d93f0892ac546b6071b1f92a0756fc9594
MD5 61c3977bdb5c21c94454e768ae1933ee
BLAKE2b-256 42cb3da3a9fc57fab124e5d039ef142e0dd378d2e02f193e64c171375cbd4717

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.8 This release

2 files

1.7

2 files

1.6

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page