Skip to content

Get types

GET
/api/v2/type/{id}/
const url = 'https://pokeapi.co/api/v2/type/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);
}

Types are properties for Pokémon and their moves. Each type has three properties: which types of Pokémon it is super effective against, which types of Pokémon it is not very effective against, and which types of Pokémon it is completely ineffective against.

id
required
string

This parameter can be a string or an integer.

Examples

Example1
Terminal window
1
Media typeapplication/json

Serializer for the Type resource

object
id
required

The identifier for this resource.

integer
name
required

The name for this resource.

string
<= 200 characters
damage_relations
required

A detail of how effective this type is toward others and vice versa.

object
no_damage_to
required

A list of types this type has no effect on.

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
half_damage_to
required

A list of types this type is not very effect against.

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
double_damage_to
required

A list of types this type is very effect against.

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
no_damage_from
required

A list of types that have no effect on this type.

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
half_damage_from
required

A list of types that are not very effective against this type.

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
double_damage_from
required

A list of types that are very effective against this type.

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
past_damage_relations
required

A list of details of how effective this type was toward others and vice versa in previous generations

Array<object>
object
generation
required

The last generation in which the referenced type had the listed damage relations

object
name
required

The name of the referenced resource.

string
<= 200 characters
url
required

The URL of the referenced resource.

string format: uri
damage_relations
required

The damage relations the referenced type had up to and including the listed generation

object
no_damage_to
required

A list of types this type has no effect on.

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
half_damage_to
required

A list of types this type is not very effect against.

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
double_damage_to
required

A list of types this type is very effect against.

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
no_damage_from
required

A list of types that have no effect on this type.

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
half_damage_from
required

A list of types that are not very effective against this type.

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
double_damage_from
required

A list of types that are very effective against this type.

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
game_indices
required

A list of game indices relevent to this item by generation.

Array<object>
object
game_index
required

The internal id of an API resource within game data.

integer
<= 2147483647
generation
required

The generation relevent to this game index.

object
name
required

The name of the referenced resource.

string
<= 200 characters
url
required

The URL of the referenced resource.

string format: uri
generation
required

The generation this type was introduced in.

object
name
required

The name of the referenced resource.

string
<= 200 characters
url
required

The URL of the referenced resource.

string format: uri
move_damage_class
required

The class of damage inflicted by this type.

One of:
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
required

A list of details of Pokémon that have this type.

Array<object>
object
slot
required

The order the Pokémon’s types are listed in.

integer
>= 1 <= 2
pokemon
required

The Pokémon that has the referenced type.

object
name
required

The name of the referenced resource.

string
<= 200 characters
url
required

The URL of the referenced resource.

string format: uri
moves
required

A list of moves that have this type.

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
sprites
required

Type icons grouped by generation and game, with name_icon and symbol_icon URLs. Unavailable icons are null.

object
key
additional properties
object
key
additional properties
object
name_icon

The URL of the icon displaying the type name in this game, or null if unavailable.

string | null
symbol_icon

The URL of the type symbol icon in this game, or null if unavailable.

string | null

Example

Terminal window
{
"id": 1,
"name": "normal",
"damage_relations": {
"no_damage_to": [
{
"name": "ghost",
"url": "https://pokeapi.co/api/v2/type/8/"
}
],
"half_damage_to": [
{
"name": "rock",
"url": "https://pokeapi.co/api/v2/type/6/"
},
{
"name": "steel",
"url": "https://pokeapi.co/api/v2/type/9/"
}
],
"double_damage_to": [],
"no_damage_from": [
{
"name": "ghost",
"url": "https://pokeapi.co/api/v2/type/8/"
}
],
"half_damage_from": [],
"double_damage_from": [
{
"name": "fighting",
"url": "https://pokeapi.co/api/v2/type/2/"
}
]
},
"past_damage_relations": [],
"game_indices": [
{
"game_index": 0,
"generation": {
"name": "generation-i",
"url": "https://pokeapi.co/api/v2/generation/1/"
}
},
{
"game_index": 0,
"generation": {
"name": "generation-ii",
"url": "https://pokeapi.co/api/v2/generation/2/"
}
}
],
"generation": {
"name": "generation-i",
"url": "https://pokeapi.co/api/v2/generation/1/"
},
"move_damage_class": {
"name": "physical",
"url": "https://pokeapi.co/api/v2/move-damage-class/2/"
},
"names": [
{
"name": "Normal",
"language": {
"name": "en",
"url": "https://pokeapi.co/api/v2/language/9/"
}
}
],
"pokemon": [
{
"slot": 1,
"pokemon": {
"name": "pidgey",
"url": "https://pokeapi.co/api/v2/pokemon/16/"
}
},
{
"slot": 1,
"pokemon": {
"name": "pidgeotto",
"url": "https://pokeapi.co/api/v2/pokemon/17/"
}
}
],
"moves": [
{
"name": "pound",
"url": "https://pokeapi.co/api/v2/move/1/"
},
{
"name": "double-slap",
"url": "https://pokeapi.co/api/v2/move/3/"
}
],
"sprites": {
"generation-v": {
"black-white": {
"name_icon": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/types/generation-v/black-white/1.png",
"symbol_icon": null
},
"black-2-white-2": {
"name_icon": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/types/generation-v/black-2-white-2/1.png",
"symbol_icon": null
}
},
"generation-iv": {
"platinum": {
"name_icon": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/types/generation-iv/platinum/1.png",
"symbol_icon": null
},
"diamond-pearl": {
"name_icon": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/types/generation-iv/diamond-pearl/1.png",
"symbol_icon": null
}
}
}
}