Porndoe API getting started
Version 2.0.0. Package: unofficial-api-for-porndoe. Import: porndoe_api.
Requires Python 3.12+ and eaf-base-api[hls]>=4.3.0 with selectolax.
Install from PyPI:
pip install unofficial-api-for-porndoe
import asyncio
from base_api import BaseCore
from base_api.modules.config import RuntimeConfig
from porndoe_api import Client, DownloadConfigRAW
async def main():
runtime = RuntimeConfig()
runtime.request_delay = 2
runtime.videos_concurrency = 1
runtime.pages_concurrency = 1
async with BaseCore(runtime) as core, Client(core) as client:
video = await client.get_video("https://porndoe.com/watch/pd4y7n5e2j8r")
print(video.title, video.duration, video.video_qualities)
await video.download(DownloadConfigRAW(quality="best", path="./"))
async for result in client.search("eva elfie", pages=1):
item = result.unwrap()
print(item.title, item.url)
asyncio.run(main())
Client() creates and owns a default core. Its async context manager and
close() close that core. A caller-supplied core remains caller-owned; use a
BaseCore context manager as shown above. Every request goes through that core.
Objects inherit BaseMedia and use the html source. Default individual
getters load that source. load_html=False constructs a lazy object.
Call await media.load_sources("html") or await media.load_fields("title")
before reading unresolved fields; otherwise DataNotLoadedError is raised.
Video loading fetches the HTML page and player JSON, keeping changes atomic.
to_dict() returns loaded fields for application integration.
Public video catalog coverage includes videos, search, category/tag browsing, related videos, pornstar/channel directories and profiles, cross-profile listings, and downloads. Account mutations, photos, blog articles and advertising services are outside this interface.
See Client, Video, iteration, and base configuration.
Client — Porndoe API
Client(core: BaseCore | None = None) shares its core with every returned object.
Supports async with Client() as client and await client.close().
Only an internally created core is closed by the client.
get_video
await Client.get_video(url: 'str', load_html: 'bool' = True) -> 'Video'
get_pornstar
await Client.get_pornstar(url: 'str', load_html: 'bool' = True) -> 'Pornstar'
get_channel
await Client.get_channel(url: 'str', load_html: 'bool' = True) -> 'Channel'
search
Client.search(query: 'str', sorting_sort: 'str | Sort' = Sort.Sort_relevance, pages: 'int | str' = 2, iterator_config: 'IteratorConfig | None' = None, start_page: 'int' = 1) -> 'AsyncGenerator[ScrapeResult[Video], None]'
get_videos
Client.get_videos(url: 'str' = 'https://porndoe.com/videos', pages: 'int | str' = 2, sorting_sort: 'str | Sort | None' = None, iterator_config: 'IteratorConfig | None' = None, start_page: 'int' = 1) -> 'AsyncGenerator[ScrapeResult[Video], None]'
get_pornstars
Client.get_pornstars(pages: 'int | str' = 2, sorting_sort: 'str | SortPornstar' = SortPornstar.Sort_famous, iterator_config: 'IteratorConfig | None' = None, gender: 'str | None' = None, country: 'str | None' = None, start_page: 'int' = 1) -> 'AsyncGenerator[ScrapeResult[Pornstar], None]'
get_channels
Client.get_channels(pages: 'int | str' = 2, sorting_sort: 'str | SortChannel' = SortChannel.Sort_ranking, iterator_config: 'IteratorConfig | None' = None, section: 'str' = '', start_page: 'int' = 1) -> 'AsyncGenerator[ScrapeResult[Channel], None]'
get_categories
await Client.get_categories(sorting_sort: 'str | SortCategory' = SortCategory.Sort_popular) -> 'list[Category]'
Individual getters return a loaded object unless load_html=False.
They require individual /watch/<hash>, /pornstars-profile/<slug> or
/channel-profile/<slug> URLs respectively. Relative site paths work.
Localized Porndoe subdomains are preserved; unrelated hosts are rejected.
search sends the query under keywords with standard URL encoding.
get_videos accepts /videos, category, tag, or another public video listing
URL, preserving query filters. get_pornstars supports the site's optional
gender and country-code routes. Combined filters use /pornstars/country/<code>
with a gender query parameter, as linked by the site. get_channels supports section "",
"exclusive", or "trending".
All listings return async iterators of ScrapeResult objects. The initial
objects contain listing metadata; full item loading is opt-in via
IteratorConfig(load_specific_sources=("html",)). The exact supplied iterator
configuration is honored. get_categories is an awaited list of Category
objects containing directory metadata.
pages is a positive page count or "all"; start_page is a positive,
one-based start index. The "all" option fetches the first requested page to
discover its last-page link. Discovery errors raise directly. Other listing
page/item errors use the configured ScrapeResult error policy.
Video — Porndoe API
Video(url=..., core=...) is a keyword-only BaseMedia dataclass.
await client.get_video(url) loads its html source. This includes a JSON-LD
graph, visible page data and the player service. The service gets a per-request
Referer and a video-specific cache URL, so concurrent videos cannot share
the wrong player response. Missing detail fields are None; source maps/lists
are empty when no variants are available. Unknown listing fields remain unloaded.
| Field | Type | Meaning |
|---|---|---|
url |
str |
Resource page URL, preserving the requested host and filters. |
core |
BaseCore |
Shared BaseCore networking and download backend. |
resolved_url |
str \| None |
Final response URL, when recorded by the shared request helper. |
video_id |
str \| None |
Public hash from /watch/ |
internal_video_id |
str \| None |
Numeric player ID, represented as a string. |
title |
str \| None |
Video title. |
description |
str \| None |
Description or plain-text profile biography. |
thumbnail_url |
str \| None |
Poster, profile image, category image, or directory thumbnail URL. |
preview_video_url |
str \| None |
Short preview clip URL. |
publish_date |
str \| None |
ISO upload date from JSON-LD. |
publish_date_relative |
str \| None |
Relative upload time shown on the page. |
content_url |
str \| None |
JSON-LD watch page URL; this is not the MP4 download URL. |
duration |
int \| None |
Duration in integer seconds. |
length |
str \| None |
Formatted MM:SS or HH:MM:SS duration. |
author_name |
str \| None |
Producing channel name. |
author_link |
str \| None |
Producing channel profile URL. |
pornstars |
list[dict[str, str]] \| None |
Performer dictionaries containing name and url. |
pornstars_urls |
list[str] \| None |
Featured performer profile URLs. |
categories |
list[dict[str, str]] \| None |
Category dictionaries containing name and url. |
tags |
list[str] \| None |
Tag names. |
tags_urls |
list[str] \| None |
Tag listing URLs, in the same order as tags. |
views |
str \| None |
Displayed total view count as a string. Listing summaries may use k/M abbreviations. |
likes |
str \| None |
Like count as a string, from the player service. |
dislikes |
str \| None |
Dislike count as a string, from the player service. |
rating_votes |
str \| None |
Sum of likes and dislikes, as a string when both are available. |
rating_percent |
str \| None |
Like percentage, as a string to one decimal place; None for no votes. |
video_quality |
str \| None |
HD/SD label supplied by JSON-LD. |
is_hd |
bool \| None |
HD flag. |
is_vr |
bool \| None |
VR flag when present in a listing; None if unknown on the detail page. |
is_exclusive |
bool \| None |
Exclusive flag when present in a listing; None if unknown on the detail page. |
license_url |
str \| None |
License URL reported by the site; a metadata value, not an independent grant of rights. |
direct_download_urls |
dict[int, str] \| None |
Playable MP4 sources as {height: signed_url}; signup links and deo sources are excluded. |
video_qualities |
list[int] \| None |
MP4 heights sorted from lowest to highest, matching direct_download_urls keys. |
hls_download_urls |
dict[int, str] \| None |
Playable HLS variants as {height: signed_url}; empty if none are supplied. |
m3u8_base_url |
str \| None |
Highest available HLS variant URL, or None. A variant, not a fabricated master playlist. |
Related objects
channel = await video.get_author
async for star in video.get_pornstars:
print(star.name)
async for result in video.get_related_videos(iterator_config=None):
related = result.unwrap()
get_author is an async property returning a loaded Channel or None.
get_pornstars is an async-generator property yielding loaded Pornstar objects.
Both share the video's core. get_related_videos is a method returning a
ScrapeResult[Video] iterator from the page's related-video cards.
download
await video.download(configuration: DownloadConfigRAW | DownloadConfigHLS)
Returns bool | DownloadReport, according to the selected base downloader.
MP4 uses BaseCore.legacy_download; HLS uses BaseCore.download and requires
actual HLS variants. The supplied configuration is copied. Title-based filenames
are applied unless no_title=True.
Only sources.mp4 entries of type video are exposed as direct MP4 sources.
Signup/upgrade entries and the separate deo group are excluded. Signed URLs
expire and can depend on the IP; use a freshly fetched Video for a later download.
The HTML view total is retained because the service's view counter differs.
See downloading and errors.
Pornstar — Porndoe API
Pornstar is a keyword-only BaseMedia dataclass sharing
BaseChannelPornstar with the other profile class. Use
await client.get_pornstar("https://porndoe.com/pornstars-profile/<slug>").
The html loader reads the first profile page with the requested host and
filters; a stale input page or fragment does not change that metadata load.
| Field | Type | Meaning |
|---|---|---|
url |
str |
Resource page URL, preserving the requested host and filters. |
core |
BaseCore |
Shared BaseCore networking and download backend. |
resolved_url |
str \| None |
Final response URL, when recorded by the shared request helper. |
name |
str \| None |
Profile or category name. |
description |
str \| None |
Description or plain-text profile biography. |
thumbnail_url |
str \| None |
Poster, profile image, category image, or directory thumbnail URL. |
total_videos |
int \| None |
Total videos reported by the site. |
total_pages |
int \| None |
Last page from pagination, or calculated for a single page. |
per_page |
int \| None |
Number of videos displayed on the loaded profile/category page. |
rank |
int \| None |
Site ranking as an integer. |
external_urls |
list[str] \| None |
External profile/site URLs from sameAs metadata. |
age |
int \| None |
Displayed age as an integer. |
country |
str \| None |
Displayed birth country. |
birth_date |
str \| None |
ISO birth date from structured metadata. |
birth_place |
str \| None |
Birthplace/nationality string reported by the site. |
gender |
str \| None |
Gender code reported by the site. |
measurements |
str \| None |
Displayed body measurements. |
ethnicity |
str \| None |
Displayed ethnicity. |
videos
Pornstar.videos(pages: 'int | str' = 2, sorting_sort: 'str | Sort | None' = None, iterator_config: 'IteratorConfig | None' = None, start_page: 'int' = 1) -> 'AsyncGenerator[ScrapeResult[Video], None]'
get_channels
Pornstar.get_channels(pages: 'int | str' = 2, iterator_config: 'IteratorConfig | None' = None) -> 'AsyncGenerator[ScrapeResult[Channel], None]'
videos() returns ScrapeResult[Video] using the shared iterator pipeline.
The profile URL retains its host and filters. sorting_sort=None preserves an
existing sort query; passing an enum/string replaces it. pages=2 fetches two
pages starting at start_page=1. pages="all" discovers the last page.
Profile counters and rankings are site-reported, not recalculated estimates.
get_channels() returns ScrapeResult[Channel] from
/pornstar/<slug>/channels.
Channel — Porndoe API
Channel is a keyword-only BaseMedia dataclass sharing
BaseChannelPornstar with the other profile class. Use
await client.get_channel("https://porndoe.com/channel-profile/<slug>").
The html loader reads the first profile page with the requested host and
filters; a stale input page or fragment does not change that metadata load.
| Field | Type | Meaning |
|---|---|---|
url |
str |
Resource page URL, preserving the requested host and filters. |
core |
BaseCore |
Shared BaseCore networking and download backend. |
resolved_url |
str \| None |
Final response URL, when recorded by the shared request helper. |
name |
str \| None |
Profile or category name. |
description |
str \| None |
Description or plain-text profile biography. |
thumbnail_url |
str \| None |
Poster, profile image, category image, or directory thumbnail URL. |
total_videos |
int \| None |
Total videos reported by the site. |
total_pages |
int \| None |
Last page from pagination, or calculated for a single page. |
per_page |
int \| None |
Number of videos displayed on the loaded profile/category page. |
rank |
int \| None |
Site ranking as an integer. |
external_urls |
list[str] \| None |
External profile/site URLs from sameAs metadata. |
website |
str \| None |
Official website URL from structured metadata. |
total_videos_views |
str \| None |
Total channel video views as a string; directory values may be abbreviated. |
videos
Channel.videos(pages: 'int | str' = 2, sorting_sort: 'str | Sort | None' = None, iterator_config: 'IteratorConfig | None' = None, start_page: 'int' = 1) -> 'AsyncGenerator[ScrapeResult[Video], None]'
get_pornstars
Channel.get_pornstars(gender: 'str' = 'female', pages: 'int | str' = 2, iterator_config: 'IteratorConfig | None' = None) -> 'AsyncGenerator[ScrapeResult[Pornstar], None]'
videos() returns ScrapeResult[Video] using the shared iterator pipeline.
The profile URL retains its host and filters. sorting_sort=None preserves an
existing sort query; passing an enum/string replaces it. pages=2 fetches two
pages starting at start_page=1. pages="all" discovers the last page.
Profile counters and rankings are site-reported, not recalculated estimates.
get_pornstars() returns ScrapeResult[Pornstar] from
/channel/<slug>/<gender>. gender accepts female, male or models.
Category — Porndoe API
await client.get_categories() returns category objects from the site's
category directory. These contain name, url, thumbnail_url, and
total_videos without fetching every category page. A later html load reads
the category heading, image metadata, counters and pagination.
| Field | Type | Meaning |
|---|---|---|
url |
str |
Resource page URL, preserving the requested host and filters. |
core |
BaseCore |
Shared BaseCore networking and download backend. |
resolved_url |
str \| None |
Final response URL, when recorded by the shared request helper. |
name |
str \| None |
Profile or category name. |
thumbnail_url |
str \| None |
Poster, profile image, category image, or directory thumbnail URL. |
total_videos |
int \| None |
Total videos reported by the site. |
per_page |
int \| None |
Number of videos displayed on the loaded profile/category page. |
total_pages |
int \| None |
Last page from pagination, or calculated for a single page. |
videos
Category.videos(pages: 'int | str' = 2, sorting_sort: 'str | Sort | None' = None, iterator_config: 'IteratorConfig | None' = None, start_page: 'int' = 1) -> 'AsyncGenerator[ScrapeResult[Video], None]'
categories = await client.get_categories()
async for result in categories[0].videos(pages=1):
print(result.unwrap().title)
Tag pages can be browsed with client.get_videos(tag_url, pages=1).
See Client.
Searching and filtering — Porndoe API
Import enums from porndoe_api.sorting. Plain string values also work.
Sort applies to videos and profile videos. Search defaults to relevance;
browse/profile pages default to newest when the sort parameter is absent.
release explicitly selects newest in search.
from porndoe_api.sorting import Sort
async for result in client.search("eva elfie", sorting_sort=Sort.Sort_most_viewed, pages=1):
print(result.unwrap().url)
Sort
| Member | Value |
|---|---|
Sort_relevance |
`` |
Sort_newest |
release |
Sort_most_liked |
likes |
Sort_longest |
length |
Sort_most_viewed |
views |
SortPornstar
| Member | Value |
|---|---|
Sort_famous |
`` |
Sort_most_viewed |
rank |
Sort_most_videos |
movies |
Sort_trending |
trending |
SortChannel
| Member | Value |
|---|---|
Sort_ranking |
`` |
Sort_name |
name |
Sort_most_videos |
movies |
Sort_most_viewed |
views |
SortCategory
| Member | Value |
|---|---|
Sort_popular |
`` |
Sort_name |
name |
Sort_most_videos |
movies |
get_pornstars(gender="male", country="us", ...) uses the site's gender and
country routes. get_channels(section="exclusive", ...) or "trending"
selects that channel directory.
For site filters not represented as dedicated arguments, pass the real
filtered listing URL to get_videos. Existing query keys survive pagination.
get_videos("https://porndoe.com/category/32/hd-videos", pages=1) and
get_videos("https://porndoe.com/tag/2240/american-porn", pages=1) are examples.
Search queries are URL encoded once, preserving spaces, plus signs and ampersands.
See Client.
Iteration and results — Porndoe API
Every listing returns an asynchronous ScrapeResult stream from the base
helper. result.unwrap() returns the media object or raises its error.
The provider defaults to IteratorConfig() with page/item errors yielded and
summary metadata loaded. It does not eagerly fetch every listed video's page.
from contextlib import aclosing
from base_api.modules.config import IteratorConfig
config = IteratorConfig(
max_page_concurrency=1,
max_item_concurrency=1,
load_specific_sources=("html",),
)
async with aclosing(client.search("eva elfie", pages=1, iterator_config=config)) as stream:
async for result in stream:
video = result.unwrap()
print(video.title, video.direct_download_urls)
break
Early consumers should close streams with aclosing. The provider closes the
underlying shared helper on generator cleanup. The caller's configuration is
forwarded unchanged, including load fields/sources, error policy, concurrency,
order and retries. Default result order is completion order; choose
order="original" for page/card order.
English, German (de), French (fr), Spanish (es), Italian (it) and Brazilian
Portuguese (br) profile URLs retain their regional host for video listings.
Translated totals and profile labels are supported. Surrounding whitespace in
pasted resource URLs is removed.
pages=2, start_page=2 fetches pages 2 and 3. pages="all" first reads the
requested start page and discovers the last page from the pager, including the
active page number when it has no link. Starting on the final page returns that
page; starting after the end returns no videos. Huge catalogs
can have many thousands of pages; use explicit small counts for interactive
applications. Discovery fetch failures raise directly. Other page/item failures
follow the supplied iterator error policy. No network failure is converted into
a successful empty media object.
See base iteration and errors.
Downloading — Porndoe API
MP4 is the normal public player format. Use DownloadConfigRAW.
from porndoe_api import DownloadConfigRAW
await video.download(DownloadConfigRAW(quality="best", path="./"))
await video.download(DownloadConfigRAW(
quality="worst", path="./chosen-name.mp4", no_title=True,
allow_multipart=True, max_workers=2,
))
best, half, worst, integer heights and labels such as 720p use the base
engine's quality selector. Unavailable numeric requests choose the nearest
playable tier. Only playable mp4 entries are selected; upgrade links and
other source groups are ignored.
The download configuration is copied before applying a title or stream URL.
Callbacks and stop events remain shared with the caller. RAW downloads return
a boolean. DownloadCancelled propagates unchanged.
DownloadConfigHLS delegates to the base HLS downloader only if the player
actually exposes HLS variants. If it does not, DownloadFailed instructs the
caller to use RAW. HLS download reports follow base configuration settings.
Signed CDN URLs expire and can be IP-bound. Fetch a new Video when downloading later, and use the same networking route for metadata and media. Existing successful BaseMedia source loads are cached; loading the same source again does not refresh it. The base response cache TTL is independently configured through RuntimeConfig.
See Video and base RAW downloader.
Errors and troubleshooting — Porndoe API
Provider exception imports are available under porndoe_api.errors:
NotFound, NetworkError, UnknownNetworkError, BotDetection, ProxyError,
DownloadFailed, and ScraperException, re-exported from the base engine.
An individual source failure raises MediaLoadError with its original cause.
Inspect media.source_errors, media.source_state("html"), and the exception
chain. is_resource_gone(error) from base_api detects missing resources
through wrappers. Missing videos redirected to the general listing are reported
as NotFound. Source commits are atomic; a failed player parse does not
leave a Video marked successfully loaded.
DataNotLoadedError means a field needs explicit loading:
await media.load_fields("title") or await media.load_sources("html").
Listings initially contain only metadata present in the summary. Missing values
after a successful load are None or empty collections.
HTTP 429 is a real site rate limit. Use RuntimeConfig.request_delay = 2 (or
slower), small page counts and limited concurrency. Avoid eager full loads when
only summary metadata is needed. Let a rate limit clear before retrying a
large scrape. The API does not treat 429 responses as empty successful pages.
An invalid host/path raises ValueError before a resource getter requests it.
Unknown HTML layouts, unsuccessful service responses, or player responses for
another video fail extraction. Inspect the page/service before changing tests.
Signup entries are not downloadable media; absence of playable variants raises
DownloadFailed from download().
Run pytest to execute the live site/CDN tests, including a complete MP4 download.
Tests use real network requests without saved HTML responses or network mocks;
network and scraping failures are not silently skipped.
See iteration and
getting started.
CLI — Porndoe API
python -m porndoe_api --download https://porndoe.com/watch/pd4y7n5e2j8r --output ./ --quality best
porndoe_api --file urls.txt --output ./ --quality worst
python -m porndoe_api --download https://porndoe.com/watch/pd4y7n5e2j8r --output ./video.mp4 --no-title
Exactly one of --download URL or --file FILE is required. URL files contain
one URL per nonempty line. --output is required. --quality defaults to best
and accepts the same values as RAW downloads. --no-title treats output as the
explicit filename. Downloads run sequentially and the client closes its core.
Unsuccessful downloads raise an error and give the process a failing exit code.
See downloading.
Supported platforms — Porndoe API
Requires Python 3.12 or later, selectolax and eaf-base-api[hls]>=4.3.0.
The base engine uses curl-cffi for asynchronous networking. Platform availability
depends on compatible dependency wheels or a working native build environment.
No browser or JavaScript runtime is required by the wrapper.
All network access is asynchronous. Video/profile parsing and shared listing extraction run in worker threads. Shared BaseCore supplies proxy, timeout, cookies, cache, pacing and concurrency configuration. See base client lifecycle.
See getting started.
Changelog — Porndoe API
2.0.0 — 2026-11-15
- Apply one-based offsets to video listings, directories, and profile cross-listings. Preserve the language host and sorting when following pages.
1.0.2 — 2026-11-14
- Preserve structured credits and roles for metadata export.
1.0.1
- Parse video totals, page sizes and profile fields on the German, French, Spanish, Italian and Brazilian Portuguese subdomains.
- Include the active final page when discovering all remaining pages.
- Report zero page size for requests beyond the end of a feed.
- Accept whitespace around pasted resource URLs.
- Verify profile feeds against every live video card, including one-video profiles and complete multi-page feeds. No saved HTML or network mocks.
1.0.0
- Initial asynchronous client, BaseMedia Video/Pornstar/Channel/Category models.
- HTML and player metadata, playable signed MP4 sources and optional HLS sources.
- Search, browse/category/tag URLs, directories, profile videos, related videos and cross-profile listings using shared ScrapeResult streams.
- RAW/HLS delegation, quality selection and command line downloader.
- Live site/CDN integration tests run by default, including a complete MP4 download.
- HTML documentation and searchable MCP documentation.
See getting started.