Skip to content

Get location area

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

Location areas are sections of areas, such as floors in a building or cave. Each area has its own set of possible Pokémon encounters.

id
required
integer

A unique integer value identifying this location area.

Examples

Example1
Terminal window
1
Media typeapplication/json
object
id
required

The identifier for this resource.

integer
name
required

The name for this resource.

string
<= 200 characters
game_index
required

The internal id of an API resource within game data.

integer
<= 2147483647
encounter_method_rates
required

A list of methods in which Pokémon may be encountered in this area and how likely the method will occur depending on the version of the game.

Array<object>
object
encounter_method
required

The method in which Pokémon may be encountered in an area..

object
name
required

The name of the referenced resource.

string
<= 200 characters
url
required

The URL of the referenced resource.

string format: uri
version_details
required

The chance of the encounter to occur on a version of the game.

Array<object>
object
rate
required

The chance of an encounter to occur.

integer
version
required

The version of the game in which the encounter can occur with the given chance.

object
name
required

The name of the referenced resource.

string
<= 200 characters
url
required

The URL of the referenced resource.

string format: uri
location
required

The region this location area can be found in.

object
name
required

The name of the referenced resource.

string
<= 200 characters
url
required

The URL of the referenced resource.

string format: uri
names
required

The name of this resource listed in different languages.

Array<object>
object
name
required

The localized name for an API resource in a specific language.

string
<= 200 characters
language
required

The language this name is in.

object
name
required

The name of the referenced resource.

string
<= 200 characters
url
required

The URL of the referenced resource.

string format: uri
pokemon_encounters
required

A list of Pokémon that can be encountered in this area along with version specific details about the encounter.

Array<object>
object
pokemon
required

The Pokémon being encountered.

object
name
required

The name of the referenced resource.

string
<= 200 characters
url
required

The URL of the referenced resource.

string format: uri
version_details
required

A list of versions and encounters with Pokémon that might happen in the referenced location area.

Array<object>
object
version
required

The game version this encounter happens in.

object
name
required

The name of the referenced resource.

string
<= 200 characters
url
required

The URL of the referenced resource.

string format: uri
max_chance
required

The total percentage of all encounter potential.

integer
encounter_details
required

A list of encounters and their specifics.

Array<object>
object
min_level
required

The lowest level the Pokémon could be encountered at.

integer
max_level
required

The highest level the Pokémon could be encountered at.

integer
chance

Percent chance that this encounter will occur.

integer
0
method

The method by which this encounter happens.

object
name
required

The name of the referenced resource.

string
<= 200 characters
url
required

The URL of the referenced resource.

string format: uri
condition_values
required

A list of condition values that must be in effect for this encounter to occur.

Array<object>
object
name
required

The name of the referenced resource.

string
<= 200 characters
url
required

The URL of the referenced resource.

string format: uri
pokemon_details
required

Additional properties of the encountered Pokémon, or null if unspecified.

One of:
object
min_perfect_ivs

The minimum number of perfect IVs, or null if unspecified.

integer | null
<= 6
always_shiny

Whether the encountered Pokémon is always shiny.

boolean
never_shiny

Whether the encountered Pokémon can never be shiny.

boolean
is_alpha

Whether the encountered Pokémon is an alpha Pokémon.

boolean

Example

Terminal window
{
"id": 1,
"name": "canalave-city-area",
"game_index": 1,
"encounter_method_rates": [
{
"encounter_method": {
"name": "old-rod",
"url": "https://pokeapi.co/api/v2/encounter-method/2/"
},
"version_details": [
{
"rate": 25,
"version": {
"name": "diamond",
"url": "https://pokeapi.co/api/v2/version/12/"
}
},
{
"rate": 25,
"version": {
"name": "pearl",
"url": "https://pokeapi.co/api/v2/version/13/"
}
}
]
},
{
"encounter_method": {
"name": "good-rod",
"url": "https://pokeapi.co/api/v2/encounter-method/3/"
},
"version_details": [
{
"rate": 50,
"version": {
"name": "diamond",
"url": "https://pokeapi.co/api/v2/version/12/"
}
},
{
"rate": 50,
"version": {
"name": "pearl",
"url": "https://pokeapi.co/api/v2/version/13/"
}
}
]
}
],
"location": {
"name": "canalave-city",
"url": "https://pokeapi.co/api/v2/location/1/"
},
"names": [
{
"name": "Canalave City",
"language": {
"name": "en",
"url": "https://pokeapi.co/api/v2/language/9/"
}
}
],
"pokemon_encounters": [
{
"pokemon": {
"name": "tentacool",
"url": "https://pokeapi.co/api/v2/pokemon/72/"
},
"version_details": [
{
"version": {
"name": "diamond",
"url": "https://pokeapi.co/api/v2/version/12/"
},
"max_chance": 60,
"encounter_details": [
{
"min_level": 20,
"max_level": 30,
"chance": 60,
"method": {
"name": "surf",
"url": "https://pokeapi.co/api/v2/encounter-method/5/"
},
"condition_values": [],
"pokemon_details": null
}
]
},
{
"version": {
"name": "pearl",
"url": "https://pokeapi.co/api/v2/version/13/"
},
"max_chance": 60,
"encounter_details": [
{
"min_level": 20,
"max_level": 30,
"chance": 60,
"method": {
"name": "surf",
"url": "https://pokeapi.co/api/v2/encounter-method/5/"
},
"condition_values": [],
"pokemon_details": null
}
]
}
]
},
{
"pokemon": {
"name": "tentacruel",
"url": "https://pokeapi.co/api/v2/pokemon/73/"
},
"version_details": [
{
"version": {
"name": "diamond",
"url": "https://pokeapi.co/api/v2/version/12/"
},
"max_chance": 5,
"encounter_details": [
{
"min_level": 20,
"max_level": 40,
"chance": 5,
"method": {
"name": "surf",
"url": "https://pokeapi.co/api/v2/encounter-method/5/"
},
"condition_values": [],
"pokemon_details": null
}
]
},
{
"version": {
"name": "pearl",
"url": "https://pokeapi.co/api/v2/version/13/"
},
"max_chance": 5,
"encounter_details": [
{
"min_level": 20,
"max_level": 40,
"chance": 5,
"method": {
"name": "surf",
"url": "https://pokeapi.co/api/v2/encounter-method/5/"
},
"condition_values": [],
"pokemon_details": null
}
]
}
]
}
]
}