Games & Comics — entry 059 of 75
Rick and Morty
The Rick and Morty API is a free, keyless catalog of every character, location, and episode from the show, cross-linked so each character record lists its episode appearances and vice versa. It's fully mirrored between a paginated REST API and a GraphQL endpoint, both live and CORS-open, so browser clients can query either directly.
The Rick and Morty API is a free, keyless REST catalog of every character, location, and episode from the show, cross-linked by URL, with a GraphQL mirror at /graphql for the same data. A live GET this run against /character/1 returned a genuine 2,719 B character object at HTTP 200 — no key or signup of any kind.
GreatAPIs Score
Auth quickstart
- No API key, signup, or credit card required — a live GET this run against
/character/1returned the full character record with zero credentials, and the response carriedaccess-control-allow-origin: *.
Your key is stored only in this browser (localStorage) and sent directly to the API — never to greatapis.
Fetch a single character by ID
GEThttps://rickandmortyapi.com/api/character/1
{
"id": 1,
"name": "Rick Sanchez",
"status": "Alive",
"species": "Human",
"type": "",
"gender": "Male",
"origin": {
"name": "Earth (C-137)",
"url": "https://rickandmortyapi.com/api/location/1"
},
"location": {
"name": "Citadel of Ricks",
"url": "https://rickandmortyapi.com/api/location/3"
},
"image": "https://rickandmortyapi.com/api/character/avatar/1.jpeg",
"episode": [
"https://rickandmortyapi.com/api/episode/1",
"https://rickandmortyapi.com/api/episode/2",
"...49 more episode URLs omitted -- 51 total in the real response"
],
"url": "https://rickandmortyapi.com/api/character/1",
"created": "2017-11-04T18:48:46.250Z"
}A live GET this run against the comma-joined /character/1,2 returned HTTP 200 with a genuine 5,392 B JSON array of two character objects, not the 2,719 B single object the same ID alone returns — the response shape itself changes based on whether the path holds one ID or several.
Try it
Developer reference
https://rickandmortyapi.com/api- GET/character/{id}
- GET/location/{id}
- GET/episode/{id}
Gotchas & limits
- A single ID and a comma-joined ID list return different response shapes — confirmed live above:
/character/1is a bare object (2,719 B),/character/1,2is a JSON array (5,392 B), even though both are HTTP 200. Code that always expects an array (or always expects an object) will break on whichever form it didn't test. - An out-of-range ID is a real HTTP 404, not a 200 with an empty body — a live GET this run against
/character/99999returned{"error":"Character not found"}at HTTP 404. - The character list is paginated at 20 per page behind
info.next/info.prev, not returned in one shot — a live GET this run against the bare/characterreturned"info":{"count":826,"pages":42,"next":"https://rickandmortyapi.com/api/character?page=2","prev":null}alongside the first page'sresults. Code that readsresultsonce and stops will silently miss 41 more pages. episode,origin.url, andlocation.urlare cross-links to other endpoints, not embedded objects — confirmed live on/character/1above, whereepisodeis an array of 51 URL strings (one per/episode/{id}this character appears in) andorigin/locationeach carry only aname+urlpair. Getting episode or location details means a second request to the linked URL.