# PokéAPI

> Query the Pokémon world from the free, keyless PokéAPI: Pokémon, species, types, abilities, moves, berries, items, evolution chains, and game generations, plus paginated listings of any resource. No account or API key required. Disclaimer: this is an independent integration with the community-run PokéAPI (pokeapi.co). It is not affiliated with, endorsed by, or sponsored by Nintendo, Game Freak, Creatures Inc., or The Pokémon Company; Pokémon and all related names and trademarks belong to their respective owners.

App · Gaming · 10 actions. Web page: https://docs.lodol.com/docs/integrations/pokeapi

## Actions

### Get a berry

Get a berry's data: growth time, maximum harvest, size, smoothness, soil dryness, firmness, Natural Gift power and type, its five flavour potencies, and the item it maps to.

**Inputs**

- Name or ID (`identifier`, text, required): The berry's name or numeric id (for example, cheri or 1). The name of the berry's item (cheri-berry) works too.

**Outputs**

- `firmness` (text)
- `flavors` (list)
- `growth_time` (number)
- `id` (number)
- `item` (text)
- `max_harvest` (number)
- `name` (text)
- `natural_gift_power` (number)
- `natural_gift_type` (text)
- `size` (number)
- `smoothness` (number)
- `soil_dryness` (number)

**Example output**

```json
{
  "firmness": "soft",
  "flavors": [
    {
      "flavor": "spicy",
      "potency": 10
    },
    {
      "flavor": "dry",
      "potency": 0
    },
    {
      "flavor": "sweet",
      "potency": 0
    },
    {
      "flavor": "bitter",
      "potency": 0
    },
    {
      "flavor": "sour",
      "potency": 0
    }
  ],
  "growth_time": 3,
  "id": 1,
  "item": "cheri-berry",
  "max_harvest": 5,
  "name": "cheri",
  "natural_gift_power": 60,
  "natural_gift_type": "fire",
  "size": 20,
  "smoothness": 25,
  "soil_dryness": 15
}
```

### Get a generation

Get a game generation's data: its English name, main region, the types and version groups it introduced, and how many abilities, moves, and Pokémon species debuted in it.

**Inputs**

- Name or ID (`identifier`, text, required): The generation's name or numeric id (for example, generation-i or 1).

**Outputs**

- `abilities_count` (number)
- `display_name` (text)
- `id` (number)
- `main_region` (text)
- `moves_count` (number)
- `name` (text)
- `pokemon_species_count` (number)
- `types` (list)
- `version_groups` (list)

**Example output**

```json
{
  "abilities_count": 0,
  "display_name": "Generation I",
  "id": 1,
  "main_region": "kanto",
  "moves_count": 165,
  "name": "generation-i",
  "pokemon_species_count": 151,
  "types": [
    "normal",
    "fighting",
    "flying",
    "poison",
    "ground",
    "rock",
    "bug",
    "ghost",
    "fire",
    "water",
    "grass",
    "electric",
    "psychic",
    "ice",
    "dragon"
  ],
  "version_groups": [
    "red-blue",
    "yellow",
    "red-green-japan",
    "blue-japan"
  ]
}
```

### Get a move

Get a move's battle data: type, damage class, power, accuracy, PP, priority, target, English name, effect text and in-game description, the stat changes it makes, and combat metadata such as its ailment and the chance of it, hit counts, drain, healing, and stat-change chances. For a move PokéAPI has no effect text for yet, mostly ones from Scarlet and Violet, the effect fields hold the in-game description.

**Inputs**

- Name or ID (`identifier`, text, required): The move's name or numeric id (for example, thunderbolt or 85).

**Outputs**

- `accuracy` (number)
- `ailment` (text)
- `damage_class` (text)
- `display_name` (text)
- `effect` (text)
- `effect_chance` (number)
- `flavor_text` (text)
- `generation` (text)
- `id` (number)
- `meta` (object)
- `name` (text)
- `power` (number)
- `pp` (number)
- `priority` (number)
- `short_effect` (text)
- `stat_changes` (list)
- `target` (text)
- `type` (text)

**Example output**

```json
{
  "accuracy": 100,
  "ailment": "none",
  "damage_class": "physical",
  "display_name": "Pound",
  "effect": "Inflicts regular damage.",
  "effect_chance": null,
  "flavor_text": "The target is physically pounded with a long tail, a foreleg, or the like.",
  "generation": "generation-i",
  "id": 1,
  "meta": {
    "ailment_chance": 0,
    "category": "damage",
    "crit_rate": 0,
    "drain": 0,
    "flinch_chance": 0,
    "healing": 0,
    "max_hits": null,
    "max_turns": null,
    "min_hits": null,
    "min_turns": null,
    "stat_chance": 0
  },
  "name": "pound",
  "power": 40,
  "pp": 35,
  "priority": 0,
  "short_effect": "Inflicts regular damage with no additional effect.",
  "stat_changes": [],
  "target": "selected-pokemon",
  "type": "normal"
}
```

### Get a Pokémon

Look up a Pokémon by name or id and get its core data: types, abilities, base stats, height, weight, base experience, and sprite images. Names can be typed as the games print them (Mr. Mime, Farfetch'd, Nidoran♀), and a Pokémon that comes in several forms, such as Giratina, returns its default form.

**Inputs**

- Name or ID (`identifier`, text, required): The Pokémon's name or numeric id (for example, pikachu or 25). Names can be typed as the games print them (Mr. Mime) or in PokéAPI's lowercase, hyphenated form (mr-mime).

**Outputs**

- `abilities` (list)
- `base_experience` (number)
- `cry` (text)
- `height` (number)
- `id` (number)
- `moves_count` (number)
- `name` (text)
- `order` (number)
- `species` (text)
- `sprite_front_default` (text)
- `sprite_front_shiny` (text)
- `stats` (object)
- `types` (list)
- `weight` (number)

**Example output**

```json
{
  "abilities": [
    {
      "is_hidden": false,
      "name": "static",
      "slot": 1
    },
    {
      "is_hidden": true,
      "name": "lightning-rod",
      "slot": 3
    }
  ],
  "base_experience": 112,
  "cry": "https://raw.githubusercontent.com/PokeAPI/cries/main/cries/pokemon/latest/25.ogg",
  "height": 4,
  "id": 25,
  "moves_count": 109,
  "name": "pikachu",
  "order": 35,
  "species": "pikachu",
  "sprite_front_default": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/25.png",
  "sprite_front_shiny": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/shiny/25.png",
  "stats": {
    "attack": 55,
    "defense": 40,
    "hp": 35,
    "special-attack": 50,
    "special-defense": 50,
    "speed": 90
  },
  "types": [
    "electric"
  ],
  "weight": 60
}
```

### Get a Pokémon species

Get a species' Pokédex data: its English name, flavor text and genus, capture rate, base happiness, growth rate, egg groups, colour, shape, habitat, the legendary/mythical/baby flags, and the id of its evolution chain.

**Inputs**

- Name or ID (`identifier`, text, required): The species' name or numeric id (for example, bulbasaur or 1). For most Pokémon the species name matches the Pokémon name.

**Outputs**

- `base_happiness` (number)
- `capture_rate` (number)
- `color` (text)
- `display_name` (text)
- `egg_groups` (list)
- `evolution_chain_id` (number)
- `evolution_chain_url` (text)
- `flavor_text` (text)
- `gender_rate` (number)
- `generation` (text)
- `genus` (text)
- `growth_rate` (text)
- `habitat` (text)
- `has_gender_differences` (true/false)
- `hatch_counter` (number)
- `id` (number)
- `is_baby` (true/false)
- `is_legendary` (true/false)
- `is_mythical` (true/false)
- `name` (text)
- `order` (number)
- `shape` (text)
- `varieties` (list)

**Example output**

```json
{
  "base_happiness": 70,
  "capture_rate": 45,
  "color": "green",
  "display_name": "Bulbasaur",
  "egg_groups": [
    "monster",
    "plant"
  ],
  "evolution_chain_id": 1,
  "evolution_chain_url": "https://pokeapi.co/api/v2/evolution-chain/1/",
  "flavor_text": "While it is young, it uses the nutrients that are stored in the seed on its back in order to grow.",
  "gender_rate": 1,
  "generation": "generation-i",
  "genus": "Seed Pok\u00e9mon",
  "growth_rate": "medium-slow",
  "habitat": "grassland",
  "has_gender_differences": false,
  "hatch_counter": 20,
  "id": 1,
  "is_baby": false,
  "is_legendary": false,
  "is_mythical": false,
  "name": "bulbasaur",
  "order": 1,
  "shape": "quadruped",
  "varieties": [
    "bulbasaur"
  ]
}
```

### Get a type

Get an elemental type's English name and damage relations: which types it deals double or half damage to, takes double or half damage from, and the match-ups it has no effect on either way.

**Inputs**

- Name or ID (`identifier`, text, required): The type's name or numeric id (for example, ground or 5).

**Outputs**

- `damage_relations` (object)
- `display_name` (text)
- `generation` (text)
- `id` (number)
- `move_damage_class` (text)
- `moves_count` (number)
- `name` (text)
- `pokemon_count` (number)

**Example output**

```json
{
  "damage_relations": {
    "double_damage_from": [
      "water",
      "grass",
      "ice"
    ],
    "double_damage_to": [
      "poison",
      "rock",
      "steel",
      "fire",
      "electric"
    ],
    "half_damage_from": [
      "poison",
      "rock"
    ],
    "half_damage_to": [
      "bug",
      "grass"
    ],
    "no_damage_from": [
      "electric"
    ],
    "no_damage_to": [
      "flying"
    ]
  },
  "display_name": "Ground",
  "generation": "generation-i",
  "id": 5,
  "move_damage_class": "physical",
  "moves_count": 31,
  "name": "ground",
  "pokemon_count": 96
}
```

### Get an ability

Get an ability's English name, effect text (full and short) and in-game description, the generation it debuted in, and the list of Pokémon that can have it.

**Inputs**

- Name or ID (`identifier`, text, required): The ability's name or numeric id (for example, levitate or 26).

**Outputs**

- `display_name` (text)
- `effect` (text)
- `flavor_text` (text)
- `generation` (text)
- `id` (number)
- `is_main_series` (true/false)
- `name` (text)
- `pokemon` (list)
- `short_effect` (text)

**Example output**

```json
{
  "display_name": "Stench",
  "effect": "This Pok\u00e9mon's damaging moves have a 10% chance to make the target flinch with each hit if they do not already cause flinching as a secondary effect. This ability does not stack with a held item. Overworld: The wild encounter rate is halved while this Pok\u00e9mon is first in the party.",
  "flavor_text": "By releasing a stench when attacking, the Pok\u00e9mon may cause the target to flinch.",
  "generation": "generation-iii",
  "id": 1,
  "is_main_series": true,
  "name": "stench",
  "pokemon": [
    "gloom",
    "grimer",
    "muk",
    "stunky",
    "skuntank"
  ],
  "short_effect": "Has a 10% chance of making target Pok\u00e9mon flinch with each hit."
}
```

### Get an evolution chain

Get a Pokémon family's evolution tree by its numeric chain id. Returns the nested chain, with every condition for reaching each species (level, item, move, time of day, region, form, nature, and the games the method is for), plus a flat list of every species in the family. Get a species' chain id from Get a Pokémon species.

**Inputs**

- Chain ID (`chain_id`, number, required): The numeric id of the evolution chain (for example, 1 for the Bulbasaur family), such as the evolution chain id from Get a Pokémon species.

**Outputs**

- `baby_trigger_item` (text)
- `base_species` (text)
- `chain` (object)
- `id` (number)
- `species_names` (list)

**Example output**

```json
{
  "baby_trigger_item": null,
  "base_species": "bulbasaur",
  "chain": {
    "evolution_details": [],
    "evolves_to": [
      {
        "evolution_details": [
          {
            "is_default": true,
            "min_level": 16,
            "trigger": "level-up",
            "version_group": "red-blue"
          }
        ],
        "evolves_to": [
          {
            "evolution_details": [
              {
                "is_default": true,
                "min_level": 32,
                "trigger": "level-up",
                "version_group": "red-blue"
              }
            ],
            "evolves_to": [],
            "is_baby": false,
            "species": "venusaur"
          }
        ],
        "is_baby": false,
        "species": "ivysaur"
      }
    ],
    "is_baby": false,
    "species": "bulbasaur"
  },
  "id": 1,
  "species_names": [
    "bulbasaur",
    "ivysaur",
    "venusaur"
  ]
}
```

### Get an item

Get an item's data: its English name, its shop prices in each game and the newest Poké Dollar price, category, attributes, Fling power and effect, English effect text and in-game description, and its sprite image.

**Inputs**

- Name or ID (`identifier`, text, required): The item's name or numeric id (for example, master-ball or 1).

**Outputs**

- `attributes` (list)
- `category` (text)
- `cost` (number)
- `display_name` (text)
- `effect` (text)
- `flavor_text` (text)
- `fling_effect` (text)
- `fling_power` (number)
- `id` (number)
- `name` (text)
- `prices` (list)
- `short_effect` (text)
- `sprite` (text)

**Example output**

```json
{
  "attributes": [
    "countable",
    "consumable",
    "usable-in-battle",
    "holdable"
  ],
  "category": "standard-balls",
  "cost": null,
  "display_name": "Master Ball",
  "effect": "Used in battle: Catches a wild Pok\u00e9mon without fail. If used in a trainer battle, nothing happens and the ball is lost.",
  "flavor_text": "The best Pok\u00e9 Ball with the ultimate level of performance. With it, you will catch any wild Pok\u00e9mon without fail.",
  "fling_effect": null,
  "fling_power": null,
  "id": 1,
  "name": "master-ball",
  "prices": [
    {
      "currency": "poke-dollar",
      "purchase_price": null,
      "sell_price": 0,
      "version_group": "red-blue"
    },
    {
      "currency": "poke-dollar",
      "purchase_price": null,
      "sell_price": 0,
      "version_group": "yellow"
    }
  ],
  "short_effect": "Catches a wild Pok\u00e9mon every time.",
  "sprite": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/items/master-ball.png"
}
```

### List resources

List the available entries of any PokéAPI resource endpoint (pokemon, move, type, berry, item, and more), paginated. Each entry gives a name, its numeric id, and its resource URL, and the next offset says where the following page starts. Use limit and offset to page through the full catalogue.

**Inputs**

- Resource (`endpoint`, text, required): Which resource endpoint to list (for example, pokemon). One of: `pokemon`, `pokemon-species` (Pokemon Species), `pokemon-form` (Pokemon Form), `pokemon-color` (Pokemon Color), `pokemon-habitat` (Pokemon Habitat), `pokemon-shape` (Pokemon Shape), `ability`, `characteristic`, `egg-group` (Egg Group), `gender`, and 40 more.
- Limit (`limit`, number): How many entries to return per page (1–100). Leave empty for PokéAPI's default of 20. From 1 to 100.
- Offset (`offset`, number): How many entries to skip before the page starts, for paging through results (for example, 20 to start at the 21st entry, or the next offset of the previous page). Leave empty to start at the beginning.

**Outputs**

- `count` (number)
- `endpoint` (text)
- `next` (text)
- `next_offset` (number)
- `previous` (text)
- `results` (list)

**Example output**

```json
{
  "count": 1351,
  "endpoint": "pokemon",
  "next": "https://pokeapi.co/api/v2/pokemon?offset=20&limit=20",
  "next_offset": 20,
  "previous": null,
  "results": [
    {
      "id": 1,
      "name": "bulbasaur",
      "url": "https://pokeapi.co/api/v2/pokemon/1/"
    },
    {
      "id": 2,
      "name": "ivysaur",
      "url": "https://pokeapi.co/api/v2/pokemon/2/"
    }
  ]
}
```
