{id}: Get a single location

API: rickandmortyapi.com:rick-and-morty
Endpoint: /location/{id}
Response format: application/json
Auth: unknown
Method: GET
Last Status: 200
Latency: 145ms

Description

Returns a single location object with the location name, type (e.g., Planet, Space station), dimension, and a list of resident character URLs. Use this to learn about places in the Rick and Morty universe and see who lives or is located there.

From spec: Returns a specific location by its ID.

Usage Tips

- Location IDs start at 1 - Common location types include Planet, Space station, Microverse, and Dream - The residents array contains URLs to all characters known to be at this location - The dimension field indicates which universe/dimension the location exists in

Parameters (1)

id (integer, path, required)

The ID of the location

Examples (1)

Get Earth (C-137) location by ID probe-gate

Demonstrates fetching Earth from Dimension C-137, the primary setting of the show.

curl 'https://rickandmortyapi.com/api/location/1'
import requests

resp = requests.get("https://rickandmortyapi.com/api/location/1")
data = resp.json()
import zingu_apis

api = zingu_apis.api("rickandmortyapi")
result = api.fetch("location/{id}")

for item in result:
    print(item)
const resp = await fetch("https://rickandmortyapi.com/api/location/1");
const data = await resp.json();

Probe History

Latency

Status Codes

TimeStatusLatencySize
2026-04-16 17:34:35.073531 200 145ms
2026-04-16 02:15:51.570067 200 168ms
2026-04-15 02:27:30.555747 200 152ms
2026-04-14 01:23:23.459292 200 168ms
2026-04-12 12:54:33.879641 200 133ms
2026-04-10 03:17:38.620114 200 80ms
2026-04-09 01:14:47.658885 200 158ms