Episode

There is a total of 51 episodes sorted by id (which is of course the order of the episodes)

Episode schema

KeyTypeDescription
idintThe id of the episode.
namestringThe name of the episode.
air_datestringThe air date of the episode.
episodestringThe code of the episode.
charactersarray (urls)List of characters who have been seen in the episode.
urlstring (url)Link to the episode’s own endpoint.
createdstringTime at which the episode was created in the database.

Get all episodes

You can access the list of episodes by using the /episode endpoint.

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

Get a single episode

You can get a single episode by adding the id as a parameter: /episode/41

GET https://therickandmortyapi.vercel.app/api/episode/41
{
  "id": 41,
  "name": "Star Mort: Rickturn of the Jerri",
  "air_date": "May 31, 2020",
  "episode": "S04E10",
  "characters": [
    "https://therickandmortyapi.vercel.app/api/character/1",
    "https://therickandmortyapi.vercel.app/api/character/2"
    // ...
  ],
  "url": "https://therickandmortyapi.vercel.app/api/episode/41",
  "created": "2020-08-06T00:51:52.079Z"
}

Get multiple episodes

You can get multiple episodes by adding an array of ids as parameter: /episode/1,2,3

GET https://therickandmortyapi.vercel.app/api/episode/8,39
[
  {
    "id": 8,
    "name": "Rixty Minutes",
    "air_date": "March 17, 2014",
    "episode": "S01E08",
    "characters": [
      "https://therickandmortyapi.vercel.app/api/character/1",
      "https://therickandmortyapi.vercel.app/api/character/2"
      // ...
    ],
    "url": "https://therickandmortyapi.vercel.app/api/episode/8",
    "created": "2017-11-10T07:56:34.543Z"
  },
  {
    "id": 39,
    "name": "The Vat of Acid Episode",
    "air_date": "May 17, 2020",
    "episode": "S04E08",
    "characters": [
      "https://therickandmortyapi.vercel.app/api/character/1",
      "https://therickandmortyapi.vercel.app/api/character/2"
      // ...
    ],
    "url": "https://therickandmortyapi.vercel.app/api/episode/39",
    "created": "2020-08-06T00:51:07.419Z"
  }
]

Filter episodes

Available parameters:

  • name: filter by the given name.
  • episode: filter by the given episode code.

If you want to know how to use queries, check the Query Filters Guide.