🐝 CSWG SGCN Bee API

REST API for querying IUCN Red List bee species assessments

Species Endpoints

GET /api/species
Get all species with basic info (name, category, assessment date)
GET /api/species/id/:id
Get complete data for a single species (includes distribution, population, threats, habitats, etc.)
Example: /api/species/id/3
GET /api/species/search/:term
Search species by scientific or common name
Example: /api/species/search/Andrena
GET /api/species/category/:category
Get species by Red List category
Example: /api/species/category/Endangered
Categories: Endangered, Vulnerable, Near Threatened, Least Concern, Data Deficient, etc.
GET /api/species/habitat/:habitatCode
Get species by habitat IUCN code
Example: /api/species/habitat/8.1 (Desert - Hot)
GET /api/species/threat/:threatCode
Get species by threat IUCN code
Example: /api/species/threat/11 (Droughts)
GET /api/species/state/:state
Get species by state name
Example: /api/species/country/California

Reference Data Endpoints

GET /api/habitats
Get all habitat types with species counts
GET /api/threats
Get all threat types with species counts
GET /api/actions
Get all conservation action types with species counts
GET /api/stats
Get summary statistics (total species, by category, top habitats, top threats)

Response Format

All endpoints return JSON. Species detail endpoint includes:

Examples