Preloader
Discover
  • Estimated reading time: 2 Minutes

The Rick and Morty API: an open source RESTful and GraphQL API

The Rick and Morty API: an open source RESTful and GraphQL API

The Rick and Morty API is a RESTful and GraphQL API based on the television show Rick and Morty. You will access to data about hundreds of characters, images, locations and episodes. The Rick and Morty API is filled with canonical information as seen on the TV show.

GraphQL

The GraphQL can be accesed in the base url: https://rickandmortyapi.com/graphql/ and you can run queries like this one:

query {
    characters(page: 2, filter: { name: "rick" }) {
        info {
            count
        }
        results {
            name
        }
    }
    character(id: 1) {
        id
    }
}

REST

For the REST api, the base URL is: https://rickandmortyapi.com/api/. The base url contains information about all available API's resources. All requests are GET requests and go over https. All responses will return data in json. A request to the base URL would return the following data:

{
    "characters": "https://rickandmortyapi.com/api/character",
    "locations": "https://rickandmortyapi.com/api/location",
    "episodes": "https://rickandmortyapi.com/api/episode"
}

This open source API is exceptional for testing purposes, it could be used as well for students, where you need to explain how an API works, how to interact with it from a specific language and so. Besides, it is about Rick and Morty, what could go wrong?

Wrappers

There are some wrappers that have been written around this API, so you can use them to access in case you need to:

Support The Rick and Morty API

You can help to maintain The Rick and Morty API's infrastructure! If you are using the API for your app, your online tutorials or your coding challenges, please consider supporting us to help keep the project alive.

The developers are not getting any money from this and they use their free time to keep the API running and the data up to date. Every contribution, however big or small, is super valuable for its future. You can donate to the project here

Share:
Carlos Delgado

Carlos Delgado

Senior Software Engineer at Software Medico. Interested in programming since he was 14 years old, Carlos is a self-taught programmer and founder and author of most of the articles at Our Code World.

Related articles
Weekly trending
Which Fleet Fuel Cards Are Best for Businesses?
27 Jun, 2026
  • Estimated reading time: 4 Minutes
Where Can I Get Legal Advice in Idaho?
27 Jun, 2026
  • Estimated reading time: 2 Minutes
How to Choose the Right SaaS Display Management System
27 Jun, 2026
  • Estimated reading time: 4 Minutes
What Makes a Smartphone Worth Buying in 2026?
27 Jun, 2026
  • Estimated reading time: 5 Minutes
Top Benefits of Using Rubber Badges for Brand Promotion
27 Jun, 2026
  • Estimated reading time: 2 Minutes
Our Sponsors

Our blog is proudly supported by industry-leading sponsors.