Skip to main content

YouPorn API

Downloads CodeQL Analysis Sync API Tests Donate via PayPal

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

  • Insanely Fast (uses selectolax for parsing)
  • Fully Asynchronous
  • Mimics a real browser (using curl_cffi)
  • Fetch videos + full metadata
  • Download videos (supports HLS/m3u8 streams and raw MP4)
  • Fetch Channels, Pornstars, Users, and Collections
  • Search for videos with specific filters (duration, resolution, sorting)
  • Custom concurrency controls (set limits for pages/videos)
  • Built-in error handling with custom callbacks
  • Built-in caching
  • Easy object-oriented interface (e.g., async for video in channel.videos())
  • Great type hinting (strict typing and memory-efficient dataclasses)

Networking Features

  • HTTP 2.0 / HTTP 3.0
  • Browser impersonation
  • Custom JA3
  • All proxy types
  • Proxy authentication
  • Speed Limit
  • DNS over HTTPS
  • And even more...
  • All of this is configurable and can be adjusted as you like!

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)

Support the Project

[!TIP] I am a student and I invest a massive amount of my free time into developing and maintaining this project under my real name. If this library saves you time or helps you build something cool, a small donation makes a huge difference in my life! Even 1€ is incredibly appreciated as a thank-you.

If you can't donate, please star the repository—it helps a lot!

Quickstart

Have a look at the Documentation for more details

  • Install the library with pip install youporn_api
import asyncio
from youporn_api import Client

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)
    print(video_object.rating)
    # Download the video
    
    await video_object.download(downloader="threaded", quality="best", path="your_output_path + filename")
asyncio.run(main())
# SEE DOCUMENTATION FOR MORE

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

Licensed under the LGPLv3 License
Copyright (C) 2025-2026 Johannes Habel

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.6.tar.gz (12.7 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.6-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for unofficial_api_for_youporn-1.6.tar.gz
Algorithm Hash digest
SHA256 f1590ae127158e2e33d22c6b724a0c8bf127081ff617371ff785244d1f70a6cd
MD5 d487818e504203d769ab87deec20c433
BLAKE2b-256 f7e2bcc9bf7da17b0b91630079976b8651b9316afd82c2d3bc81cf2a74194f53

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for unofficial_api_for_youporn-1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 5726156e39c4a5047c655f8bb028936eab02e2e7c28ed76ee10d1252815c86c3
MD5 7b88467ad7e6d9b7b510a72c3fe186d0
BLAKE2b-256 4ed20898f31d07846224fa38d63dfd937fddfc5c17387cf6cb504431e3a021ac

See more details on using hashes here.

Release history Release notifications | RSS feed

1.8

2 files

1.7

2 files

This release

1.6 This release

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