Skip to content

List locations

GET
/api/v2/location/
const url = 'https://pokeapi.co/api/v2/location/';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}

Locations that can be visited within the games. Locations make up sizable portions of regions, like cities or routes.

limit
integer

Number of results to return per page.

offset
integer

The initial index from which to return the results.

q
string

Only available locally and not at pokeapi.co Case-insensitive query applied on the name property.

Media typeapplication/json
object
count
required
integer
next
string format: uri
nullable
previous
string format: uri
nullable
results
required
Array<object>
object
name
required
string
<= 200 characters
url
required
string format: uri
Example
Terminal window
{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100"
}