← All posts

Build porn database tools with the PRDB API and SDK

Build porn scene search, actor lookups and collection tools with the PRDB porn database API. Start with a Python example using the official SDK.

Updated October 23, 2026

PRDB stands for Porn Database: “PR” means porn and “DB” means database. Its catalogue connects porn scenes, porn actors, adult models and studios. The Public API lets you use those records in your own applications.

You might want to search your porn collection, export scene metadata, or identify video files from a Usenet download. The PRDB SDK gives you a starting point for these tools, with access to the records available in the database.

prdb-sdk provides official client libraries for the prdb.net Public API. They connect your code to the porn database, leaving you to decide what your application should do with the results.

AI coding assistants have made getting started much easier: you can describe a small tool in everyday language, ask for an initial implementation, and work through it step by step. Give the assistant the SDK documentation and a clear goal, and a blank project becomes a much more approachable starting point.

Pick your language

The SDK is available in four languages. Each has its own installation instructions and examples:

LanguagePackageGetting started
Pythonprdb-sdkPython guide
TypeScript@prdb/sdkTypeScript guide
Gogithub.com/prdb-net/prdb-sdk/goGo guide
C#Prdb.SdkC# guide

The clients are generated from the API’s OpenAPI description and expose typed requests and responses. The SDK handles the connection and API-key header, so a request for videos can be as small as await client.videos.get() in Python.

Keep the Public API documentation alongside the SDK guide. The API reference explains endpoints, filters, response fields and access requirements; the language guide shows how to call them from your program.

The public API reference explains catalogue access and authentication alongside request examples. This text-only capture contains no media or API credentials. Its example clients are separate from the four official SDK packages listed above. Select the image to enlarge it without leaving this article.

Build tools for porn search and collection metadata

Start with a task you already do by hand. A few possibilities:

  • A porn catalogue search tool: search porn videos, actors or adult sites and display the titles, cast and studio information that matter to you.
  • A porn metadata exporter: turn selected scene records into a CSV file for a spreadsheet or another application.
  • A Usenet collection helper: calculate supported fingerprints for downloaded video files locally, look up matches, and display porn scene titles, cast and available previews alongside your files.
  • A performer dashboard: build an interface around your favourite porn actors, porn models, studios and wanted scenes.

For file identification, follow the SDK’s video hashing specification. A normal file checksum is not a substitute for the fingerprints the API expects. Matching depends on what prdb knows about the file, so leave room for an unknown result.

Your first program: list porn scene titles

You need Python 3.10 or newer and a prdb.net API key with API access. The SDK is open source; API access requires a paid prdb.net plan. Free web access does not include API access.

Create a project folder and a virtual environment. On macOS or Linux:

mkdir my-prdb-tool
cd my-prdb-tool
python3 -m venv .venv
source .venv/bin/activate
python -m pip install prdb-sdk

On Windows, create the environment with py -m venv .venv and activate it with .venv\Scripts\Activate.ps1 in PowerShell, then run the same installation command.

Save this as list_videos.py:

import asyncio
import os
from getpass import getpass

from prdb_sdk import create_client


async def main() -> None:
    api_key = os.environ.get("PRDB_API_KEY") or getpass("prdb API key: ")
    if not api_key.strip():
        raise SystemExit("An API key is required.")

    client = create_client(api_key=api_key.strip())
    page = await client.videos.get()

    if page is None or not page.items:
        print("No videos returned.")
        return

    for video in page.items:
        print(video.title or "Untitled")


if __name__ == "__main__":
    asyncio.run(main())

Run it with:

python list_videos.py

The program uses PRDB_API_KEY if you have set it in your environment. Otherwise, it asks for the key without displaying what you type. It requests one page of porn video records and prints their titles. This is a first connection check, not a full catalogue export: search parameters and pagination are the next steps in the Python SDK guide.

Let AI help you build the next step

You do not need to design a complete application before trying an idea. Take the small program above and ask a coding assistant for one useful addition. For example:

Build a Python command-line search tool using prdb-sdk. Read https://github.com/prdb-net/prdb-sdk/tree/main/python and https://apidocs.prdb.net/ first. Accept a search term, request one page of videos, and print their titles. Read the key from PRDB_API_KEY or a hidden prompt. Use documented SDK methods and explain how I can run the program. Show helpful errors for an invalid key, missing API access, a network failure or a rate limit. Add a test using a simulated API response, without a real key.

Once that works, ask for CSV export, then perhaps a small interface. Giving the assistant a narrow task and the actual documentation makes its output easier to understand and check. You can also ask it to explain unfamiliar lines, interpret an error message or write a test for an empty search result.

AI can still invent method names or overlook an API rule. Run each step, compare the calls with the documentation, and keep working changes small. Use a placeholder when discussing credentials with an assistant; enter your real key locally.

Grow from a script into an app

As your tool becomes useful, add pagination and local caching instead of repeatedly fetching the same records. For supported resources, change feeds can help keep a local database current. Their behaviour is documented in the API reference, including how to handle deleted records.

Plan for usage limits as well. GET /rate-limit reports your remaining budget, and a 429 response includes Retry-After. Check the SDK’s retry behaviour before adding your own retries, so the two policies do not multiply requests.

For a hosted web app, keep the API key on your backend. Browser code is visible to visitors, so a shared secret does not belong in a JavaScript bundle. A local script can read the key from its environment, as the example above does.

For a ready-made porn library workflow, take a look at prdb-fab and prdb-viewer. prdb-fab connects NZB indexers and SABnzbd to PRDB metadata; prdb-viewer helps you browse identified local videos. For your own workflow, the SDK connects your code to the same porn database.

Pick one small task, connect it to prdb, and make it useful for you. Start with the SDK on GitHub, keep the Public API docs open, and create your prdb account when you are ready to connect.

Screenshot