# Imsdb — 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 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. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/parse-imsdb-com-api-f3121140/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## 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.beta.paywithlocus.com/api/wrapped/parse-imsdb-com-api-f3121140/get_all_scripts \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.beta.paywithlocus.com/api/wrapped/parse-imsdb-com-api-f3121140/get_latest_scripts \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.beta.paywithlocus.com/api/wrapped/parse-imsdb-com-api-f3121140/get_script_comments \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.beta.paywithlocus.com/api/wrapped/parse-imsdb-com-api-f3121140/get_script_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.beta.paywithlocus.com/api/wrapped/parse-imsdb-com-api-f3121140/get_script_text \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.beta.paywithlocus.com/api/wrapped/parse-imsdb-com-api-f3121140/get_scripts_by_genre \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.beta.paywithlocus.com/api/wrapped/parse-imsdb-com-api-f3121140/get_scripts_by_letter \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.beta.paywithlocus.com/api/wrapped/parse-imsdb-com-api-f3121140/get_tv_transcripts \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.beta.paywithlocus.com/api/wrapped/parse-imsdb-com-api-f3121140/search_scripts \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```
