# Rickandmortyapi — 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.

> Explore detailed information about Rick and Morty characters, including their origins, locations, and which episodes they appear in. Look up individual characters or browse the complete cast to discover their backstories and connections throughout the series.

**Category:** Entertainment | **Website:** [rickandmortyapi.com/](https://rickandmortyapi.com/) | **Docs:** [parse.bot/marketplace/98413be9-46c3-4df6-93e1-890989573c87/rickandmortyapi-com-api](https://parse.bot/marketplace/98413be9-46c3-4df6-93e1-890989573c87/rickandmortyapi-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-rickandmortyapi-com-api-98413be9/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_character

Get a single character by ID. Returns full character details including origin, current location, and all episode IDs the character appears in.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `character_id` | string | Yes | Numeric character ID (e.g. 1 for Rick Sanchez). Available from list_characters results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-rickandmortyapi-com-api-98413be9/get_character \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"character_id":"<string>"}'
```

### list_characters

List characters from the Rick and Morty universe with pagination. Supports filtering by name, status, species, and gender. Returns 20 characters per page with pagination metadata. Each character includes their origin, current location, and episode IDs they appear in.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `gender` | string | No | Filter by gender. |
| `name` | string | No | Filter characters by name (case-insensitive substring match). |
| `page` | integer | No | Page number for pagination. Total pages available in response. |
| `species` | string | No | Filter by species (e.g. Human, Alien, Robot, Mythological Creature). |
| `status` | string | No | Filter by character life status. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-rickandmortyapi-com-api-98413be9/list_characters \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"gender":"<string>","name":"<string>","page":"<integer>","species":"<string>","status":"<string>"}'
```
