rickandmortyapi.com APIrickandmortyapi.com ↗
Access Rick and Morty character data including origins, locations, species, status, and episode appearances via two structured endpoints.
curl -X GET 'https://api.parse.bot/scraper/6b41ccfd-36d8-4b94-96ec-d65012339ee6/list_characters?name=rick&page=1&gender=male&status=alive&species=Human' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed Python client. Install the CLI, sign in, then pull this API’s generated client:
pip install parse-sdk parse login parse add --marketplace rickandmortyapi-com-api
parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: Rick and Morty API — list, filter, and inspect characters."""
from parse_apis.Rick_and_Morty_API import RickAndMorty, Status, Gender, CharacterNotFound
client = RickAndMorty()
# List characters filtered by status, capped at 5 total items.
for char in client.characters.search(status=Status.ALIVE, limit=5):
print(char.name, char.origin, char.location, char.episode_count)
# Filter by gender and species together.
alien = client.characters.search(species="Alien", gender=Gender.MALE, limit=1).first()
if alien:
print(alien.name, alien.species, alien.episode_ids[:3])
# Typed error handling for a missing character.
try:
dead = client.characters.search(name="nonexistent_xyz_999", limit=1).first()
except CharacterNotFound as exc:
print(f"Character not found: {exc}")
print("exercised: characters.search with status/gender/species filters")
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.
| Param | Type | Description |
|---|---|---|
| name | string | Filter characters by name (case-insensitive substring match). |
| page | integer | Page number for pagination. Total pages available in response. |
| gender | string | Filter by gender. |
| status | string | Filter by character life status. |
| species | string | Filter by species (e.g. Human, Alien, Robot, Mythological Creature). |
{
"type": "object",
"fields": {
"count": "total number of characters matching filters",
"pages": "total number of pages",
"results": "array of character objects",
"next_page": "next page number or null",
"prev_page": "previous page number or null",
"current_page": "current page number"
},
"sample": {
"count": 826,
"pages": 42,
"results": [
{
"id": 1,
"url": "https://rickandmortyapi.com/api/character/1",
"name": "Rick Sanchez",
"type": "",
"image": "https://rickandmortyapi.com/api/character/avatar/1.jpeg",
"gender": "Male",
"origin": "Earth (C-137)",
"status": "Alive",
"created": "2017-11-04T18:48:46.250Z",
"species": "Human",
"location": "Citadel of Ricks",
"origin_url": "https://rickandmortyapi.com/api/location/1",
"episode_ids": [
"1",
"2",
"3"
],
"location_url": "https://rickandmortyapi.com/api/location/3",
"episode_count": 51
}
],
"next_page": 2,
"prev_page": null,
"current_page": 1
}
}About the rickandmortyapi.com API
This API exposes 2 endpoints for querying character data from the Rick and Morty universe, covering every named character's status, species, gender, origin, current location, and episode appearances. Use list_characters to browse and filter the full cast with pagination, or call get_character with a specific ID to retrieve all 11 fields for a single character including their image URL and creation timestamp.
Endpoints and What They Return
The list_characters endpoint returns paginated sets of 20 characters per page. Each response includes count (total matching records), pages (total page count), next_page, prev_page, and current_page for navigation, plus a results array of character objects. The get_character endpoint accepts a numeric character_id and returns a single character object with fields including id, name, status, species, type, gender, origin, image, url, created, and an array of episode IDs the character appears in.
Filtering
list_characters supports four filter parameters: name (case-insensitive substring match), status (e.g. alive, dead, unknown), species (e.g. Human, Alien, Robot, Mythological Creature), and gender. These can be combined to narrow results. The page parameter controls which block of 20 results is returned, and the response always includes the total count and pages so you can iterate the full result set programmatically.
Data Coverage
Every character object links back to episodes via a list of episode IDs in the response, but episode metadata (title, air date, episode code) is not returned inline — only the IDs are present. Origin and current location are returned as name strings. The image field provides a direct URL to the character's avatar. Character records include a created ISO datetime reflecting when the record was added to the dataset.
The rickandmortyapi.com API is a managed, monitored endpoint for rickandmortyapi.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when rickandmortyapi.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official rickandmortyapi.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a character encyclopedia filtered by species and status for Rick and Morty fan sites
- Populate a quiz app with character names, images, and origin data from
get_character - Analyze cast composition by iterating
list_characterswith species and gender filters - Map character episode appearances using the episode ID arrays in each character object
- Render character profile cards using the
image,name,status, andspeciesfields - Track which characters are alive vs. dead by filtering
list_characterson thestatusparam - Cross-reference character origins by grouping results on the
originfield across all pages
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does rickandmortyapi.com have an official developer API?+
What does `list_characters` return and how do I paginate through all results?+
count (total matches), pages (total page count), current_page, next_page, and prev_page. Pass the page parameter incrementally to walk through the full result set. When next_page is null, you have reached the last page.Does `get_character` return the full episode list for a character?+
Are location details like dimension or type returned for origins?+
origin field returns the location name as a string only. Extended location data such as dimension, location type, or resident lists are not included in these endpoints. You can fork the API on Parse and revise it to add a location detail endpoint.How current is the character data?+
created field on each character record indicates when that entry was first added.