Rick and Morty API

Entertainment API · Characters, episodes, locations · GraphQL & REST

TL;DR

The Rick and Morty API is a meticulously documented REST (and GraphQL) API covering every character, episode, and location from the Adult Swim series. Browse all 800+ characters across 7 seasons, filter by status (alive/dead/unknown), species, gender, or origin. Each character returns their episode appearances, location, origin dimension, and image. The API is a gold standard for fan-made APIs — clean, fast, and versioned.

Quick start: https://rickandmortyapi.com/api/character/1

No API key needed — just make a request!

How to Use This API

1. Get Character #1 — Rick Sanchez

https://rickandmortyapi.com/api/character/1

Returns: name (Rick Sanchez), status (Alive), species (Human), gender (Male), origin (Earth), location (Citadel of Ricks), episodes list, and image URL.

2. Get All Episodes

https://rickandmortyapi.com/api/episode

Paginated list of all episodes with air date, episode code (like S01E01), and character URLs featured in each.

3. Filter Characters

https://rickandmortyapi.com/api/character/?status=alive&species=alien

Filters: name, status (alive/dead/unknown), species, type, gender (female/male/genderless/unknown).

4. JavaScript — Character Directory

async function getCharacters(page = 1) {
  const resp = await fetch(
    `https://rickandmortyapi.com/api/character?page=${page}`
  );
  const data = await resp.json();
  return data.results.map(c => ({
    name: c.name,
    species: c.species,
    status: c.status,
    image: c.image,
    origin: c.origin.name
  }));
}

async function findHumanCharacters() {
  let page = 1, allHumans = [];
  while (true) {
    const resp = await fetch(
      `https://rickandmortyapi.com/api/character/?species=Human&page=${page}`
    );
    const data = await resp.json();
    allHumans.push(...data.results.map(c => c.name));
    if (!data.info.next) break;
    page++;
  }
  console.log(`Found ${allHumans.length} human characters`);
}

findHumanCharacters();

5. Python — Episode Guide

import requests

resp = requests.get('https://rickandmortyapi.com/api/episode')
data = resp.json()

for ep in data['results'][:10]:
    print(f"{ep['episode']}: {ep['name']} (aired {ep['air_date']})")
    print(f"  Characters in episode: {len(ep['characters'])}")

# Get details on a specific episode
ep1 = requests.get('https://rickandmortyapi.com/api/episode/1').json()
print(f"\nFirst episode: {ep1['name']}")
Try Rick Sanchez: https://rickandmortyapi.com/api/character/1

Frequently Asked Questions

How many characters are in the API?
Over 800 characters across all 7 seasons, including background characters, alternate-dimension versions, and minor appearances. The count grows as new seasons are released.
Does the API include images?
Yes, every character has an image field with a URL to a high-quality character portrait. These are official images from the show.
Can I search by character name?
Yes! /api/character/?name=rick returns all characters with "rick" in their name — Rick Sanchez, Rick Prime, Doofus Rick, etc. Case-insensitive.
Does it support GraphQL?
Yes! In addition to REST, the API has a GraphQL endpoint at https://rickandmortyapi.com/graphql. The GraphQL schema mirrors the REST resources.
What location data is available?
Locations have: name, type (Planet, Dimension, Resort, etc.), dimension (like "Dimension C-137"), and resident character URLs. Use /api/location?name=earth to find all Earth variants.
Are there rate limits?
No documented rate limits. The API is designed for fan projects and is known for being fast and reliable.

API Details

API URL
https://rickandmortyapi.com/api
Documentation
rickandmortyapi.com/documentation
Category
Entertainment
Authentication
Not Required
Geographic Coverage
Global

What You Can Build