Skip to main content

Pornhat API

An asynchronous Python API wrapper and scraper for pornhat.com

Downloads CodeQL Analysis Sync API Tests

Disclaimer


Features

Category Details
Video Fetching Fetch video objects with title, description, views, publish date, duration, channel, models, tags, thumbnails, and player sources
Video Downloading HLS-based downloading with configurable quality (best, half, worst, or specific resolutions)
Channel & Model Profiles Fetch Channel and Model profiles and iterate through their complete video listings
Category & Paysite Fetching Browse tags through Category objects and paysite/brand collections through Site objects
Video Search Search videos, browse new/popular/trending videos, and sort model/channel directories
Lazy Source Loading Select HTML metadata or deferred media resolution using load_html, load_media, load_sources, and load_fields
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 pornhat_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/2)
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:

  • Linux (x86_64), Python 3.15, with FFmpeg/ffprobe

Python 3.12 or newer is required. Other platforms have not been verified.


Installation

pip install unofficial-api-for-pornhat

Quickstart

Have a look at the Documentation for more details

import asyncio
from pornhat_api import Client, DownloadConfigHLS

async def main():
    # Initialize a Client object
    async with Client() as client:
        # Fetch a video
        video_object = await client.get_video(
            "https://www.pornhat.com/video/armani-black-wants-her-husband-s-friend-deep-inside/"
        )

        # Information from Video objects
        print(video_object.title)

        # Download the video
        config = DownloadConfigHLS(quality="best", path="./", remux=True)
        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.

Metadata

Release files for unofficial-api-for-pornhat 0.1.0

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-pornhat 0.1.0
File Size Uploaded Provenance Actions
unofficial_api_for_pornhat-0.1.0.tar.gz 29.3 kB Without provenance Details for unofficial_api_for_pornhat-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for unofficial-api-for-pornhat 0.1.0
File Interpreter ABI Platform Actions
unofficial_api_for_pornhat-0.1.0-py3-none-any.whl Python 3 none any Details for unofficial_api_for_pornhat-0.1.0-py3-none-any.whl

Total release size: 61.1 kB

Release files / unofficial_api_for_pornhat-0.1.0.tar.gz

Download URL unofficial_api_for_pornhat-0.1.0.tar.gz
Size 29.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8efae1e35071366515acc35694dd1d0f82407c11f697f88856f8f43fc2951ca3
BLAKE2b-256 checksum
How to use checksums
288e48d8b1a54d3ee0b9df701925c70feda862ffe971cb0cf98d77f105f76c1b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.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_pornhat-0.1.0-py3-none-any.whl

Download URL unofficial_api_for_pornhat-0.1.0-py3-none-any.whl
Size 31.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b793c121e02bc9852aae811a269a39b07ebe5321ce695d31a7cef7034cc81bc2
BLAKE2b-256 checksum
How to use checksums
a0f5b7fcd9050a17c7558718f3c45e030ce324a8b56c8ab8bd83dcd1e2bb03da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.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}

Security for unofficial-api-for-pornhat 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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