# Imsdb — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://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 browse thousands of movie and TV screenplays from IMSDb, with the ability to view full script text, filter by genre or alphabetically, and read community comments. Access detailed script information including the latest additions and TV transcripts all in one place.

**Category:** Entertainment | **Website:** [imsdb.com/](https://imsdb.com/) | **Docs:** [parse.bot/marketplace/f3121140-e34c-4518-ad29-16fee76b5683/imsdb-com-api](https://parse.bot/marketplace/f3121140-e34c-4518-ad29-16fee76b5683/imsdb-com-api)

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

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/imsdb/`
**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

### Get all scripts

Get the complete catalog of all scripts on IMSDb. Returns every script with title, writers, draft info, and page URL. Single-page response containing the full alphabetical listing.

**Estimated cost:** Metered

_No parameters required._

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

### Get latest scripts

Get the most recently added scripts from the IMSDb homepage. Returns featured scripts with poster images and newest releases.

**Estimated cost:** Metered

_No parameters required._

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

### Get script comments

Get user comments and ratings for a specific script. Returns all comments with usernames, optional ratings (out of 10), and comment text.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `title` | string | Yes | Script title as it appears on IMSDb (e.g. 'Matrix, The') |

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

### Get script details

Get full metadata for a specific script including editorial and user ratings, writers, genres, dates, and the URL to read the full screenplay. The title must match exactly as listed on IMSDb (e.g. 'Matrix, The' not 'The Matrix').

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `title` | string | Yes | Script title as it appears on IMSDb (e.g. 'Matrix, The') |

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

### Get script text

Get the full screenplay text for a script. Provide either a title (to auto-construct the URL) or a direct read_url (from get_script_details scriptReadUrl field). Using read_url is more reliable for titles with special characters. Returns the complete screenplay as plain text.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `read_url` | string | No | Direct URL to the script text page, from get_script_details scriptReadUrl field. At least one of title or read_url must be provided. |
| `title` | string | No | Script title used to construct the script URL. At least one of title or read_url must be provided. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/imsdb/get-script-text \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"read_url":"<string>","title":"<string>"}'
```

### Get scripts by genre

Get all scripts in a specified genre category. Returns script titles and their detail page URLs for the given genre.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `genre` | string | Yes | Genre name to filter by |

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

### Get scripts by letter

Get all scripts whose titles start with a specific letter or number symbol. Returns script titles and their detail page URLs.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `letter` | string | Yes | Single letter A-Z or # for scripts starting with numbers |

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

### Get tv transcripts

Get the list of available TV show transcripts from IMSDb. Returns show names and their transcript page URLs.

**Estimated cost:** Metered

_No parameters required._

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

### Search scripts

Search for scripts by keyword. Returns matching script titles and their detail page URLs. Searches across all scripts in the IMSDb catalog.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search keyword to match against script titles |

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

## Next steps

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