Skip to content

Blank past ability entries #1631

Open
Open

Description

@FallenDeity

The past_abilites field in pokemon endpoint has some redundant data which points to no actual ability for example for bulbasaur (1)

"past_abilities": [
    {
        "abilities": [
            {
                "ability": null,
                "is_hidden": true,
                "slot": 3
            }
        ],
        "generation": {
            "name": "generation-iv",
            "url": "https://pokeapi.co/api/v2/generation/4/"
        }
    }
]

imo either it should point to an ability resource or the past_abilities array should be empty also idt bulbasaur got any change of abilities and this issue is across a bunch of pokemon where the ability_id is blank in here https://github.com/PokeAPI/pokeapi/blob/master/data/v2/csv/pokemon_abilities_past.csv which is causing this

think historically it got added somewhere around here in this commit b23cd6f removing the rows with blank entries should fix it

just wanted to ask tho was there any reason why it was added that I might be missing? thank you :)

cc: @jemarq04

Activity

  1. jemarq04 commented on Aug 2, 2026

    @jemarq04
    Member

    The idea behind that was that a null field meant that the slot was previously empty. For the Bulbasaur example, that's saying that until that generation Bulbasaur didn't have a hidden ability in slot 3. I added that detail to the docs for the model: https://pokeapi.co/docs/v2#pokemonabilitypast

    That being said, if you have other ideas on how to do this we can definitely explore it.

  2. FallenDeity commented on Aug 2, 2026

    @FallenDeity
    ContributorAuthor

    ah I see that was a bit confusing so it shows null to say the slot was empty till that particular generation or the pokemon didn't have that ability, but as such then don't we also require an equivalent record saying even the 2nd normal ability slot is null or empty upto the most recent generation for a more complete view (in case of bulbasaur for example)

    I think a better way to indicate this might be just adding version groups on the abilities > ability fields is that feasible that way we can see which generation that ability came to be, and the past ability fields can have the concrete records of historic abilities then its a diff bw past ability slot + vg vs current ability slot +vg if past ability has nothing then it was null for that slot till that vg

    this seems cleaner over a record null holding slot for all normal and hidden abilities for gen 3 and gen 5 intro since its more like a global pokemon setting than per pokemon

  3. jemarq04 commented on Aug 25, 2026

    @jemarq04
    Member

    Yes, you're right that we should also have something to show that slot 2 was empty for Bulbasaur and other related cases - this was a change I added myself and it seems like I missed some entries.

    I'm open to updating abilities with what you're suggesting (adding a version group to pokemon_abilities.csv), in which case pokemon_abilities_past.csv and its related endpoint can likely be removed. If we do something like this, I think we'd want to also want to update pokemon_past_stats.csv and pokemon_past_types.csv to be consistent.

    Additionally, the moves are done in a very different way, so it would be nice if we could converge on a consistent format across these endpoints. I'll ping @notblisy since this was touched on in another issue recently (#1423).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions