const res = await fetch(
'https://api.gbif.org/v1/occurrence/search?scientificName=Panthera+leo&limit=5'
);
const { results } = await res.json();
results.forEach(r =>
console.log(`${r.species} — ${r.country} (${r.year})`)
);const res = await fetch(
'https://api.inaturalist.org/v1/observations?taxon_name=Panthera+leo&per_page=5&order_by=created_at'
);
const { results } = await res.json();
results.forEach(o =>
console.log(`${o.species_guess} — ${o.place_guess} (${o.observed_on})`)
);const res = await fetch(
`https://apiv3.iucnredlist.org/api/v3/species/page/0?token=${process.env.IUCN_TOKEN}`
);
const { result } = await res.json();
result.slice(0, 5).forEach(s =>
console.log(`${s.scientific_name} [${s.category}]`)
);