# Rick and Morty

> Look up characters, locations and episodes from the Rick and Morty TV show with the free, keyless Rick and Morty API. It covers seasons 1 to 5 only: 51 episodes, ending with S05E10, as the API's data has not been updated since season 5 ended in 2021. No account or API key required. Disclaimer: this is an independent integration with the community-run Rick and Morty API (rickandmortyapi.com). It is not affiliated with, endorsed by, or sponsored by Adult Swim, Cartoon Network, Warner Bros. Discovery, or the creators of Rick and Morty; all related names and trademarks belong to their respective owners.

App · Film, TV & Fandom · 8 actions. Web page: https://docs.lodol.com/docs/integrations/rick-and-morty

## Actions

### Get a character

Get one Rick and Morty character by its id or its link. No API key required.

**Inputs**

- Character ID (`character_id`, number, required): The character's id, a whole number such as 2 for Morty Smith, or its link from another step, such as https://rickandmortyapi.com/api/character/2. At least 1.

**Outputs**

- `character` (object): One character, and everything the API records about it.

**Example output**

```json
{
  "character": {
    "created": "2017-11-04T18:50:21.651Z",
    "episode": [
      "https://rickandmortyapi.com/api/episode/1",
      "https://rickandmortyapi.com/api/episode/2"
    ],
    "gender": "Male",
    "id": 2,
    "image": "https://rickandmortyapi.com/api/character/avatar/2.jpeg",
    "location": {
      "name": "Citadel of Ricks",
      "url": "https://rickandmortyapi.com/api/location/3"
    },
    "name": "Morty Smith",
    "origin": {
      "name": "unknown",
      "url": ""
    },
    "species": "Human",
    "status": "Alive",
    "type": "",
    "url": "https://rickandmortyapi.com/api/character/2"
  }
}
```

### Get a location

Get one Rick and Morty location by its id or its link, with links to the characters last seen there. No API key required.

**Inputs**

- Location ID (`location_id`, number, required): The location's id, a whole number such as 3 for the Citadel of Ricks, or its link from another step, such as https://rickandmortyapi.com/api/location/3. At least 1.

**Outputs**

- `location` (object): One location, and everything the API records about it.

**Example output**

```json
{
  "location": {
    "created": "2017-11-10T13:08:13.191Z",
    "dimension": "unknown",
    "id": 3,
    "name": "Citadel of Ricks",
    "residents": [
      "https://rickandmortyapi.com/api/character/8",
      "https://rickandmortyapi.com/api/character/14"
    ],
    "type": "Space station",
    "url": "https://rickandmortyapi.com/api/location/3"
  }
}
```

### Get an episode

Get one Rick and Morty episode by its id or its link, with links to every character in it. The API covers seasons 1 to 5 only, episode ids 1 to 51. No API key required.

**Inputs**

- Episode ID (`episode_id`, number, required): The episode's id, a whole number from 1 to 51 such as 28 for The Ricklantis Mixup, or its link from another step, such as https://rickandmortyapi.com/api/episode/28. At least 1.

**Outputs**

- `episode` (object): One episode, and everything the API records about it.

**Example output**

```json
{
  "episode": {
    "air_date": "September 10, 2017",
    "characters": [
      "https://rickandmortyapi.com/api/character/1",
      "https://rickandmortyapi.com/api/character/2"
    ],
    "created": "2017-11-10T12:56:36.618Z",
    "episode": "S03E07",
    "id": 28,
    "name": "The Ricklantis Mixup",
    "url": "https://rickandmortyapi.com/api/episode/28"
  }
}
```

### Get several characters

Get several Rick and Morty characters in one step, by id or link. Pass an episode's characters or a location's residents to turn their links into full characters. They come back in id order, and an id the API does not have is left out and listed in missing_ids. No API key required.

**Inputs**

- Character IDs (`character_ids`, list, required): The characters to get: their ids or links, as a list or as text separated by commas. An episode's characters or a location's residents can go in as they are. Repeats and empty links are skipped. Up to 1,000.

**Outputs**

- `characters` (list): The characters found, in id order, each once.
- `count` (number): How many characters were found.
- `missing_ids` (list): The ids asked for that the API does not have, in the order they were given. Empty when every one was found.

**Example output**

```json
{
  "characters": [
    {
      "created": "2017-11-04T18:48:46.250Z",
      "episode": [
        "https://rickandmortyapi.com/api/episode/1",
        "https://rickandmortyapi.com/api/episode/2"
      ],
      "gender": "Male",
      "id": 1,
      "image": "https://rickandmortyapi.com/api/character/avatar/1.jpeg",
      "location": {
        "name": "Citadel of Ricks",
        "url": "https://rickandmortyapi.com/api/location/3"
      },
      "name": "Rick Sanchez",
      "origin": {
        "name": "Earth (C-137)",
        "url": "https://rickandmortyapi.com/api/location/1"
      },
      "species": "Human",
      "status": "Alive",
      "type": "",
      "url": "https://rickandmortyapi.com/api/character/1"
    },
    {
      "created": "2017-11-04T18:50:21.651Z",
      "episode": [
        "https://rickandmortyapi.com/api/episode/1",
        "https://rickandmortyapi.com/api/episode/2"
      ],
      "gender": "Male",
      "id": 2,
      "image": "https://rickandmortyapi.com/api/character/avatar/2.jpeg",
      "location": {
        "name": "Citadel of Ricks",
        "url": "https://rickandmortyapi.com/api/location/3"
      },
      "name": "Morty Smith",
      "origin": {
        "name": "unknown",
        "url": ""
      },
      "species": "Human",
      "status": "Alive",
      "type": "",
      "url": "https://rickandmortyapi.com/api/character/2"
    }
  ],
  "count": 2,
  "missing_ids": []
}
```

### Get several episodes

Get several Rick and Morty episodes in one step, by id or link. Pass a character's episode list to get every episode it appears in. They come back in id order, and an id the API does not have is left out and listed in missing_ids. The API covers seasons 1 to 5 only. No API key required.

**Inputs**

- Episode IDs (`episode_ids`, list, required): The episodes to get: their ids or links, as a list or as text separated by commas. A character's episode list can go in as it is. Repeats and empty links are skipped. Up to 1,000.

**Outputs**

- `count` (number): How many episodes were found.
- `episodes` (list): The episodes found, in id order (the order they aired), each once.
- `missing_ids` (list): The ids asked for that the API does not have, in the order they were given. Empty when every one was found.

**Example output**

```json
{
  "count": 2,
  "episodes": [
    {
      "air_date": "December 2, 2013",
      "characters": [
        "https://rickandmortyapi.com/api/character/1",
        "https://rickandmortyapi.com/api/character/2"
      ],
      "created": "2017-11-10T12:56:33.798Z",
      "episode": "S01E01",
      "id": 1,
      "name": "Pilot",
      "url": "https://rickandmortyapi.com/api/episode/1"
    },
    {
      "air_date": "December 9, 2013",
      "characters": [
        "https://rickandmortyapi.com/api/character/1",
        "https://rickandmortyapi.com/api/character/2"
      ],
      "created": "2017-11-10T12:56:33.916Z",
      "episode": "S01E02",
      "id": 2,
      "name": "Lawnmower Dog",
      "url": "https://rickandmortyapi.com/api/episode/2"
    }
  ],
  "missing_ids": []
}
```

### List characters

List Rick and Morty characters, 20 to a page, optionally filtered by name, status, species, type or gender. The text filters match any part of the value and ignore case. No API key required.

**Inputs**

- Name (`name`, text): Only characters whose name contains this, in any case (for example, rick finds Rick Sanchez and Adjudicator Rick).
- Status (`status`, text): Only characters with this life status. One of: `alive`, `dead`, `unknown`.
- Species (`species`, text): Only characters whose species contains this, in any case (for example, human, which also finds Humanoid).
- Type (`type`, text): Only characters whose type or subspecies contains this, in any case (for example, parasite).
- Gender (`gender`, text): Only characters of this gender. One of: `female`, `male`, `genderless`, `unknown`.
- Page (`page`, number): Which page of 20 to return, starting at 1. Leave empty for the first page. A page past the last one returns no results, but still gives the real count and number of pages. At least 1.

**Outputs**

- `characters` (object): One page of the characters that match, with how many match in all.

**Example output**

```json
{
  "characters": {
    "info": {
      "count": 826,
      "next": "https://rickandmortyapi.com/api/character?page=2",
      "pages": 42,
      "prev": null
    },
    "results": [
      {
        "created": "2017-11-04T18:48:46.250Z",
        "episode": [
          "https://rickandmortyapi.com/api/episode/1",
          "https://rickandmortyapi.com/api/episode/2"
        ],
        "gender": "Male",
        "id": 1,
        "image": "https://rickandmortyapi.com/api/character/avatar/1.jpeg",
        "location": {
          "name": "Citadel of Ricks",
          "url": "https://rickandmortyapi.com/api/location/3"
        },
        "name": "Rick Sanchez",
        "origin": {
          "name": "Earth (C-137)",
          "url": "https://rickandmortyapi.com/api/location/1"
        },
        "species": "Human",
        "status": "Alive",
        "type": "",
        "url": "https://rickandmortyapi.com/api/character/1"
      }
    ]
  }
}
```

### List episodes

List Rick and Morty episodes, 20 to a page, optionally filtered by name or episode code. The filters match any part of the value and ignore case. The API covers seasons 1 to 5 only: 51 episodes, ending with S05E10. No API key required.

**Inputs**

- Name (`name`, text): Only episodes whose title contains this, in any case (for example, pilot).
- Episode (`episode`, text): Only episodes whose code contains this, in any case: S01E01 for one episode, or S03 for a whole season. Seasons 1 to 5 only.
- Page (`page`, number): Which page of 20 to return, starting at 1. Leave empty for the first page. A page past the last one returns no results, but still gives the real count and number of pages. At least 1.

**Outputs**

- `episodes` (object): One page of the episodes that match, with how many match in all.

**Example output**

```json
{
  "episodes": {
    "info": {
      "count": 51,
      "next": "https://rickandmortyapi.com/api/episode?page=2",
      "pages": 3,
      "prev": null
    },
    "results": [
      {
        "air_date": "December 2, 2013",
        "characters": [
          "https://rickandmortyapi.com/api/character/1",
          "https://rickandmortyapi.com/api/character/2"
        ],
        "created": "2017-11-10T12:56:33.798Z",
        "episode": "S01E01",
        "id": 1,
        "name": "Pilot",
        "url": "https://rickandmortyapi.com/api/episode/1"
      }
    ]
  }
}
```

### List locations

List Rick and Morty locations, 20 to a page, optionally filtered by name, type or dimension. The filters match any part of the value and ignore case. No API key required.

**Inputs**

- Name (`name`, text): Only locations whose name contains this, in any case (for example, earth finds Earth (C-137) and Cronenberg Earth).
- Type (`type`, text): Only locations whose type contains this, in any case (for example, planet or space station).
- Dimension (`dimension`, text): Only locations whose dimension contains this, in any case (for example, C-137 finds Dimension C-137).
- Page (`page`, number): Which page of 20 to return, starting at 1. Leave empty for the first page. A page past the last one returns no results, but still gives the real count and number of pages. At least 1.

**Outputs**

- `locations` (object): One page of the locations that match, with how many match in all.

**Example output**

```json
{
  "locations": {
    "info": {
      "count": 126,
      "next": "https://rickandmortyapi.com/api/location?page=2",
      "pages": 7,
      "prev": null
    },
    "results": [
      {
        "created": "2017-11-10T12:42:04.162Z",
        "dimension": "Dimension C-137",
        "id": 1,
        "name": "Earth (C-137)",
        "residents": [
          "https://rickandmortyapi.com/api/character/38",
          "https://rickandmortyapi.com/api/character/45"
        ],
        "type": "Planet",
        "url": "https://rickandmortyapi.com/api/location/1"
      }
    ]
  }
}
```
