# API: Occurrence search for only species?

**URL:** https://discourse.gbif.org/t/api-occurrence-search-for-only-species/4469
**Category:** Miscellaneous
**Created:** [May 23, 2024, 8:35am UTC](https://discourse.gbif.org/t/api-occurrence-search-for-only-species/4469 "2024-05-23T08:35:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![larsgw](https://sea1.discourse-cdn.com/gbif1/user_avatar/discourse.gbif.org/larsgw/32/715_2.png) [@larsgw](https://discourse.gbif.org/u/larsgw)
#### Post date: [May 23, 2024, 8:35am UTC](https://discourse.gbif.org/t/api-occurrence-search-for-only-species/4469/1 "2024-05-23T08:35:16Z")

</div>

Is it possible to search e.g. for all occurrence records in the family Chrysididae that are identified to species? I don’t see a `taxonRank` option. Would I need to first list all species in the family and then use `taxonKey`?

---

<div class="post-metadata">

### Author: ![mgrosjean](https://avatars.discourse-cdn.com/v4/letter/m/97f17d/32.png) [@mgrosjean](https://discourse.gbif.org/u/mgrosjean)
#### Post date: [May 23, 2024, 3:07pm UTC](https://discourse.gbif.org/t/api-occurrence-search-for-only-species/4469/2 "2024-05-23T15:07:15Z")

</div>

I think you would have to use the taxonKeys of the species in the family (which you can get with this call: [https://api.gbif.org/v1/species/search?datasetKey=d7dddbf4-2cf0-4f39-9b2a-bb099caae36c&rank=SPECIES&higherTaxonKey=7903](https://api.gbif.org/v1/species/search?datasetKey=d7dddbf4-2cf0-4f39-9b2a-bb099caae36c&rank=SPECIES&higherTaxonKey=7903) and some paging through the results).

---

<div class="post-metadata">

### Author: ![system](https://global.discourse-cdn.com/gbif1/original/1X/d2525d53d815eb0c992cc44730ed8a6a1be1dbb5.png) [@system](https://discourse.gbif.org/u/system)
#### Post date: [June 23, 2024, 1:07am UTC](https://discourse.gbif.org/t/api-occurrence-search-for-only-species/4469/3 "2024-06-23T01:07:28Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
