Skip to content

IUCN API changed to v4, so IUCNquery.py not working #949

@hyanwong

Description

@hyanwong

Annoyingly, IUCN have changed their API from v3 to v4, and as far as I can seem there is no longer an endpoint for

http://api.iucnredlist.org/api/v3/species/page/X

(list at https://api.iucnredlist.org/api-docs/index.html)

This means that OZprivate/ServerScripts/Utilities/IUCNquery.py -v fails with something like "json.decoder.JSONDecodeError: Extra data: line 1 column 5 (char 4)".

The nearest to a list of species that I can see is either by "comprehensive group", e.g. https://api.iucnredlist.org/api/v4/comprehensive_groups/amphibians, or by category like "EW", "LC", etc:

https://api.iucnredlist.org/api/v4/red_list_categories/LC?page=1

However, pages are limited to 100 results per page, so it will take a while to go through all 80,000 assessements (the v3 API allowed 1,000 results per page). I'm worried that we will be thought of as scraping the data if we go via this route.

My inclination, unless we know someone in IUCN who knows how we can access the full list, is to simply rely on the (presumably less up-to-date) designations from wikidata? What do you think @jrosindell ? I guess this might come under @davidebbo 's wikidata reworking code.

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