# Thetvdb — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search and discover TV shows from TheTVDB's database, view trending series, and access detailed episode information. Browse complete show listings or find specific titles to retrieve comprehensive data about seasons, episodes, and air dates.

**Category:** Entertainment | **Website:** [thetvdb.com/](https://thetvdb.com/) | **Docs:** [parse.bot/marketplace/d924f91b-b67d-4efb-bbe6-d5d0db798c65/thetvdb-com-api](https://parse.bot/marketplace/d924f91b-b67d-4efb-bbe6-d5d0db798c65/thetvdb-com-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/thetvdb/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Episodes

Get all episodes for a specific TV series by its slug. Returns the complete episode list including season and episode numbers, air dates, and descriptions. The slug is available from search or list results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | Series slug identifier (e.g. 'breaking-bad', 'game-of-thrones'). Use the slug field from search or list results. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/thetvdb/episodes \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"slug":"<string>"}'
```

### List

List TV series from the database with pagination. Returns series sorted by popularity. Each page contains up to `limit` results; iterate pages from 0 to nbPages-1.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Number of results per page. |
| `page` | integer | No | Page number (0-indexed). Must be less than nbPages in the response. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/thetvdb/list \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","page":"<integer>"}'
```

### Search

Search for TV series by name. Returns matching series with pagination. Pages are 0-indexed; valid page values range from 0 to nbPages - 1. An empty query returns all series (equivalent to list).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Number of results per page. |
| `page` | integer | No | Page number (0-indexed). Requesting a page beyond available results returns empty items. |
| `query` | string | Yes | Search query for TV series name. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/thetvdb/search \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","page":"<integer>","query":"<string>"}'
```

### Trending

Get trending series from the community. Returns a list of currently popular TV series with follower counts. No pagination; returns all trending items in a single response.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/thetvdb/trending \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

## Next steps

- [All wrapped API providers](https://beta.paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://beta.paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://beta.paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://beta.paywithlocus.com/agent/index.md): every Locus agent page.