gbif_occurrence_download_predicate_builder
Converts simple occurrence search filters into the predicate format required by the GBIF download API, helping request occurrence downloads by year, country, taxon, or dataset.
Instructions
Helper tool to build a download predicate from simple search parameters. Converts occurrence search filters into the complex predicate format required by the download API.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| year | No | Year or year range for occurrence date. Example: "2020" (single year), "2015,2020" (range from 2015 to 2020). | |
| country | No | 2-letter ISO country code where occurrence was recorded. Example: "US", "BR", "KE". | |
| geometry | No | WKT geometry polygon to limit download to geographic area. Polygons must be anticlockwise. Example: "POLYGON ((30.1 10.1, 40 40, 20 40, 10 20, 30.1 10.1))". | |
| taxonKey | No | GBIF taxon key. A taxon key from the GBIF backbone. All child taxa are included in the download. Example: 212 (for Aves - all birds). | |
| datasetKey | No | Dataset UUID to limit download to specific dataset. Example: "13b70480-bd69-11dd-b15f-b8a03c50a862". | |
| basisOfRecord | No | Basis of record types to include. Example: ["PRESERVED_SPECIMEN", "FOSSIL_SPECIMEN"] for museum specimens only. Values: OBSERVATION (general), HUMAN_OBSERVATION, MACHINE_OBSERVATION, MATERIAL_SAMPLE, PRESERVED_SPECIMEN, FOSSIL_SPECIMEN, LIVING_SPECIMEN, MATERIAL_CITATION, OCCURRENCE. | |
| hasCoordinate | No | Filter to records with (true) or without (false) geographic coordinates. Example: true for georeferenced records only. | |
| scientificName | No | Scientific name from the GBIF backbone. Example: "Panthera leo". All synonyms and child taxa included. |