API
The PredBooks API: list venues and files, search markets, and get signed download links to Parquet files.
API key. Pick a plan on Pricing and create a key, then install the SDK for your language: the Go SDK, Python SDK, Rust SDK or TypeScript SDK.
Base URL: https://api.predbooks.com/v1. Send your key as Authorization: Bearer pb_.... Listing, market search and the free channels (markets, coverage) need no key.
Endpoints
| Endpoint | Key | Returns |
|---|---|---|
GET /venues | no | Every venue and channel with first and last date, number of files, bytes, hourly or daily, free or not |
GET /files?venue=&channel=&start=&end= | no | Files with date, hour, size, rows, version and flags |
GET /markets?venue=&q=&date=&limit= | no | Markets matching the question text or an exact market id |
GET /download?venue=&channel=&date=&hour= | for paid channels | url (signed, valid for an hour) and expires_at, plus the file's size, version and flags |
GET /me | yes | Your plan and usage |
Download links support HTTP range requests, so Parquet readers can fetch only the row groups they need.
Example
curl -s "https://api.predbooks.com/v1/download?venue=kalshi&channel=trades&date=2026-12-05" \
-H "Authorization: Bearer $PREDBOOKS_API_KEY"{
"venue": "kalshi", "channel": "trades", "date": "2026-12-05", "hour": null,
"size": 227000000, "rows": 8114093, "version": "3f9c2a7d1b04", "flags": [],
"free": false, "url": "https://...", "expires_at": "2026-12-06T10:00:00+00:00"
}Each SDK makes the same request with link:
link, err := pb.Link(ctx, "kalshi", "trades", "2026-12-05")
if err != nil {
log.Fatal(err)
}
fmt.Println(link.URL, link.ExpiresAt)link = pb.link("kalshi", "trades", "2026-12-05")
print(link["url"], link["expires_at"])let link = pb.link("kalshi", "trades", "2026-12-05", None)?;
println!("{} until {}", link.url, link.expires_at);const link = await pb.link("kalshi", "trades", "2026-12-05");
console.log(link.url, link.expires_at);Errors
Errors return JSON: {"error": "<code>", "message": "..."}.
| Status | Code | When |
|---|---|---|
| 400 | bad_date | Dates are not YYYY-MM-DD |
| 401 | invalid_key, not_allowed | Unknown key, or a paid channel without a key |
| 403 | not_allowed, link_expired | Your plan does not include it or its file limit is used up; or the link expired |
| 404 | not_found | No such file |
Requesting the same file again, for example after a link expired, does not count against your plan.