Maybe you want a small program that exports scene information to a spreadsheet. Maybe your collection needs a custom search interface, or you have an idea for a dashboard that shows exactly what interests you. With prdb.net, you can build on an existing catalogue instead of collecting all that information yourself.
prdb-sdk provides official client libraries for the prdb.net Public API. They connect your code to the 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:
| Language | Package | Getting started |
|---|---|---|
| Python | prdb-sdk | Python guide |
| TypeScript | @prdb/sdk | TypeScript guide |
| Go | github.com/prdb-net/prdb-sdk/go | Go guide |
| C# | Prdb.Sdk | C# 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.
What could you build?
Start with a task you already do by hand. A few possibilities:
- A catalogue search tool: search videos, actors or sites and display the information that matters to you.
- A metadata exporter: turn selected scene records into a CSV file for a spreadsheet or another application.
- A collection helper: calculate supported file fingerprints locally, look up matches, and show titles, cast and available previews next to your files.
- A personal dashboard: build an interface around your favourite actors, sites and wanted videos.
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 video 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 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.
If you would rather start with an existing application, take a look at prdb-fab and prdb-viewer. If you have a different workflow in mind, the SDK gives you a way to build it yourself.
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.