# GBIF Occurrence Search: Species, Coordinates & Licenses (`cliqtomedia/gbif-occurrence-search`) Actor

Search GBIF species observations by taxon, country, bounding box, year and license. Export coordinates, taxonomy, dataset titles and publisher attribution. No GBIF key needed.

- **URL**: https://apify.com/cliqtomedia/gbif-occurrence-search.md
- **Developed by:** [Cliqto Media](https://apify.com/cliqtomedia) (community)
- **Categories:** Developer tools, Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.25 / 1,000 occurrence records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

Search biodiversity observations from GBIF by species, country, area, year and record license. Get up to 1,000 records with published coordinates, taxonomy, dataset titles and publisher attribution. No GBIF account or API key is needed.

Start with `Panthera leo` and 50 records. On the Free tier, this costs $0.030 including the $0.012 start fee. A valid search can return no records. Source errors and money limits are explained in `RUN_SUMMARY`.

![GBIF Occurrence Search: species and area filters, published coordinates and license attribution, CSV and JSON export](https://api.apify.com/v2/key-value-stores/xxXlnXaT8wqAhRkHY/records/HERO.png)

### Table of contents

- [What it does](#what-it-does)
- [Data you get](#data-you-get)
- [Quick start](#quick-start)
- [Input](#input)
- [Input examples](#input-examples)
- [Output example](#output-example)
- [Output fields](#output-fields)
- [Pricing](#pricing)
- [Use cases](#use-cases)
- [Scheduling and repeat searches](#scheduling-and-repeat-searches)
- [API, export and integrations](#api-export-and-integrations)
- [Limits and partial results](#limits-and-partial-results)
- [Troubleshooting](#troubleshooting)
- [FAQ](#faq)
- [Support](#support)

### What it does

The Actor searches the public [GBIF API](https://techdocs.gbif.org/en/openapi/). It resolves an exact scientific name, or uses your numeric taxon key. A parent taxon includes child taxa. For example, a lion search can return lion subspecies.

Country, area, years and coordinate filters are combined using AND. Record licenses in a list are combined using OR. The Actor gets the current dataset title and publishing organization for each record. Duplicate GBIF IDs within a run are saved once.

Use it for small research exports, map inputs and license checks. For a full scientific download with a download DOI, use the GBIF download service. This Actor returns a limited live search, with the dataset DOI when available.

### Data you get

Each Dataset item is one occurrence. It has a GBIF ID, taxonomy, observation date, record type, license and attribution. Coordinates use WGS84. Uncertainty is in metres. Missing values stay `null`; they do not become zero.

Sensitive coordinates stay as published. The Actor includes `informationWithheld` and `dataGeneralizations` notices. It does not infer a hidden location or add personal information about observers.

### Quick start

1. Open **Input**.
2. Keep the form example: `Panthera leo`, years 2020–2025, coordinates enabled, 50 records.
3. Set a maximum run cost in Apify if you want a money limit.
4. Click **Start**.
5. Open **Dataset → Occurrences**. Use **Attribution** to check the dataset, publisher and license.
6. Open **Key-value store → RUN_SUMMARY** to check the status and counts.

You can export the Dataset as JSON or CSV. The source may change between runs.

### Input

All fields are optional on their own, but a search needs at least one of `taxonName`, `taxonKey`, `country` or `bbox`. The API input `{}` is an error. A run with no INPUT record uses the small lion example. The form example and **Restore example** use that same example.

| Field               | Type         | Default / form example                 | Allowed values and effect                                                                    | Recommendation                                                  |
| ------------------- | ------------ | -------------------------------------- | -------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| `taxonName`         | string       | No field default; form: `Panthera leo` | 1–200 characters; exact scientific-name match                                                | Use a known name. Clear it if you use `taxonKey`.               |
| `taxonKey`          | integer      | None                                   | 1–2147483647; GBIF backbone key, including children                                          | Use a key for an ambiguous name.                                |
| `country`           | string       | None                                   | ISO alpha-2, such as `KE`; case is normalized                                                | Use the observation country.                                    |
| `bbox`              | number array | None                                   | `[west, south, east, north]`; longitude −180…180, latitude −90…90; west\<east and south\<north | Use a WGS84 box. Split boxes at the antimeridian yourself.      |
| `yearFrom`          | integer      | No default; form: 2020                 | Inclusive year, 1–9999; missing lower bound is 1                                             | Set with `yearTo` for a fixed period.                           |
| `yearTo`            | integer      | No default; form: 2025                 | Inclusive year, 1–9999; missing upper bound is 9999                                          | Must be at least `yearFrom`.                                    |
| `hasCoordinate`     | boolean      | Omitted = both; form: true             | true = both coordinates present; false = records without both                                | Omit it for all records. Clear the box before requesting false. |
| `licenses`          | string array | `[]`                                   | `CC0_1_0`, `CC_BY_4_0`, `CC_BY_NC_4_0`; empty = all                                          | Use exact codes. Duplicates are ignored.                        |
| `commercialUseOnly` | boolean      | false                                  | Restricts record licenses to CC0 and CC BY                                                   | Check attribution and the full terms before reuse.              |
| `maxResults`        | integer      | 50                                     | 1–1000 unique saved occurrences                                                              | Start small. This is a result limit, not all source matches.    |
| `offset`            | integer      | 0                                      | 0–99999; `offset + maxResults` must be ≤100000                                               | Use summary `nextOffset` to continue a live search.             |

Empty names, `null` field values, unknown fields and invalid values fail before search work. Numbers must be numbers, and booleans must be true or false.

#### Interacting filters

- `taxonName` and `taxonKey` together cause an input error.
- `country` and `bbox` select their intersection. `bbox` with `hasCoordinate:false` is an error.
- `commercialUseOnly:true` intersects your license list with CC0 and CC BY. A list containing only CC BY-NC is an error in this mode.
- `maxResults` counts unique records. A money limit can stop the run before this number.

### Input examples

#### Lion observations with coordinates

```json
{ "taxonName": "Panthera leo", "yearFrom": 2020, "yearTo": 2025, "hasCoordinate": true, "maxResults": 50 }
```

Get up to 50 records, with taxonomy, coordinates and license attribution. This is the form example.

#### A country and area search

```json
{
  "taxonKey": 5219404,
  "country": "TZ",
  "bbox": [30, -5, 40, 0],
  "yearFrom": 2020,
  "yearTo": 2025,
  "maxResults": 10
}
```

Get lion records in Tanzania within this box and period. A narrow region can return no records.

#### Record licenses that allow commercial use

```json
{ "taxonKey": 5219404, "commercialUseOnly": true, "maxResults": 10 }
```

Get records with CC0 or CC BY licenses. A record license can differ from the dataset's overall license. The Actor uses the record license.

### Output example

This is a trimmed real record from a `Panthera leo`, year 2025 search. Observer information is omitted from this example. A subspecies is a valid child of the searched species.

```json
{
  "gbifID": "5006926565",
  "scientificName": "Panthera leo melanochaita (C.E.H.Smith, 1858)",
  "taxonKey": 5219411,
  "rank": "SUBSPECIES",
  "decimalLatitude": -2.637562,
  "decimalLongitude": 34.715044,
  "coordinateUncertaintyInMeters": 31434,
  "eventDate": "2025-01-02T13:53:58",
  "country": "Tanzania, United Republic of",
  "countryCode": "TZ",
  "basisOfRecord": "HUMAN_OBSERVATION",
  "datasetTitle": "iNaturalist Research-grade Observations",
  "publisher": "iNaturalist.org",
  "license": "http://creativecommons.org/licenses/by-nc/4.0/legalcode",
  "informationWithheld": "Coordinate uncertainty increased to 31434m to protect threatened taxon",
  "occurrenceUrl": "https://www.gbif.org/occurrence/5006926565"
}
```

### Output fields

All listed keys are present. Nullable fields use `null` when the source has no value.

| Field                           | Type   | Null? | Meaning                                                                                    | Example                                                                          |
| ------------------------------- | ------ | ----- | ------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------- |
| `gbifID`                        | string | no    | Stable GBIF occurrence ID as text.                                                         | `"5006926565"`                                                                   |
| `provider`                      | string | no    | Data provider: GBIF.                                                                       | `"GBIF"`                                                                         |
| `sourceUrl`                     | string | no    | GBIF occurrence API record URL.                                                            | `"https://api.gbif.org/v1/occurrence/5006926565"`                                |
| `occurrenceUrl`                 | string | no    | GBIF occurrence page URL.                                                                  | `"https://www.gbif.org/occurrence/5006926565"`                                   |
| `fetchedAt`                     | string | no    | UTC time when this row was normalized.                                                     | `"2026-10-13T12:35:00.202Z"`                                                     |
| `key`                           | number | no    | Stable GBIF occurrence ID as a safe integer.                                               | `5006926565`                                                                     |
| `scientificName`                | string | yes   | Interpreted scientific name including authorship.                                          | `"Panthera leo melanochaita (C.E.H.Smith, 1858)"`                                |
| `rank`                          | string | yes   | Interpreted taxon rank.                                                                    | `"SUBSPECIES"`                                                                   |
| `eventDate`                     | string | yes   | Observation date as supplied by GBIF; may include time or a date interval.                 | `"2025-01-02T13:53:58"`                                                          |
| `country`                       | string | yes   | Country name of the observation.                                                           | `"Tanzania, United Republic of"`                                                 |
| `countryCode`                   | string | yes   | ISO alpha-2 country code.                                                                  | `"TZ"`                                                                           |
| `basisOfRecord`                 | string | yes   | Record type, for example HUMAN_OBSERVATION or PRESERVED_SPECIMEN.                          | `"HUMAN_OBSERVATION"`                                                            |
| `occurrenceStatus`              | string | yes   | PRESENT or ABSENT if the source supplies it; neither is inferred.                          | `"PRESENT"`                                                                      |
| `datasetKey`                    | string | yes   | UUID of the source dataset.                                                                | `"50c9509d-22c7-4a22-a47d-8c48425ef4a7"`                                         |
| `datasetTitle`                  | string | yes   | Current title from the GBIF dataset registry.                                              | `"iNaturalist Research-grade Observations"`                                      |
| `datasetUrl`                    | string | yes   | GBIF dataset page for attribution.                                                         | `"https://www.gbif.org/dataset/50c9509d-22c7-4a22-a47d-8c48425ef4a7"`            |
| `datasetDoi`                    | string | yes   | Dataset DOI where available; not a DOI for this search.                                    | `"10.15468/ab3s5x"`                                                              |
| `datasetCitation`               | string | yes   | Citation provided by the dataset registry.                                                 | `"iNaturalist contributors, iNaturalist (2026). iNaturalist Research-grade Obs…` |
| `publisher`                     | string | yes   | Publishing organization title from the GBIF registry.                                      | `"iNaturalist.org"`                                                              |
| `publishingOrgKey`              | string | yes   | UUID of the publishing organization.                                                       | `"28eb1a3f-1c15-4a95-931a-4af90ecb574d"`                                         |
| `license`                       | string | yes   | License URL of this record, which can differ from the dataset license.                     | `"http://creativecommons.org/licenses/by-nc/4.0/legalcode"`                      |
| `recordedBy`                    | string | yes   | Observer/collector exactly as published; no personal enrichment.                           | `as published`                                                                   |
| `sourceUpdatedAt`               | string | yes   | GBIF lastInterpreted timestamp; not the date of the observation.                           | `"2026-10-07T01:29:48.970+00:00"`                                                |
| `informationWithheld`           | string | yes   | Source notice about hidden sensitive information.                                          | `"Coordinate uncertainty increased to 31434m to protect threatened taxon"`       |
| `dataGeneralizations`           | string | yes   | Source notice about generalization of sensitive data.                                      | `null`                                                                           |
| `kingdom`                       | string | yes   | Interpreted kingdom name; null when missing.                                               | `"Animalia"`                                                                     |
| `phylum`                        | string | yes   | Interpreted phylum name; null when missing.                                                | `"Chordata"`                                                                     |
| `class`                         | string | yes   | Interpreted class name; null when missing.                                                 | `"Mammalia"`                                                                     |
| `order`                         | string | yes   | Interpreted order name; null when missing.                                                 | `"Carnivora"`                                                                    |
| `family`                        | string | yes   | Interpreted family name; null when missing.                                                | `"Felidae"`                                                                      |
| `genus`                         | string | yes   | Interpreted genus name; null when missing.                                                 | `"Panthera"`                                                                     |
| `species`                       | string | yes   | Interpreted species name; null when missing.                                               | `"Panthera leo"`                                                                 |
| `taxonKey`                      | number | yes   | GBIF backbone taxon key assigned to this record.                                           | `5219411`                                                                        |
| `decimalLatitude`               | number | yes   | Published WGS84 latitude in degrees; null when unavailable.                                | `-2.637562`                                                                      |
| `decimalLongitude`              | number | yes   | Published WGS84 longitude in degrees; null when unavailable.                               | `34.715044`                                                                      |
| `coordinateUncertaintyInMeters` | number | yes   | Published horizontal uncertainty in metres; zero is preserved.                             | `31434`                                                                          |
| `year`                          | number | yes   | Observation year as an integer when supplied.                                              | `2025`                                                                           |
| `issues`                        | array  | no    | GBIF quality/interpretation flags.                                                         | `[]`                                                                             |
| `latitude`                      | number | yes   | Same published WGS84 latitude as decimalLatitude; compatibility alias.                     | `-2.637562`                                                                      |
| `longitude`                     | number | yes   | Same published WGS84 longitude as decimalLongitude; compatibility alias.                   | `34.715044`                                                                      |
| `taxonRank`                     | string | yes   | Same interpreted rank as rank; compatibility alias.                                        | `"SUBSPECIES"`                                                                   |
| `url`                           | string | yes   | Same GBIF record page as occurrenceUrl; compatibility alias.                               | `"https://www.gbif.org/occurrence/5006926565"`                                   |
| `datasetName`                   | string | yes   | Dataset name published on the occurrence record; may differ from the current datasetTitle. | `"iNaturalist research-grade observations"`                                      |
| `acceptedScientificName`        | string | yes   | Accepted scientific name assigned by GBIF; may differ for synonyms.                        | `"Panthera leo melanochaita (C.E.H.Smith, 1858)"`                                |

#### Output surfaces and run status

The **Occurrences** Dataset view shows the scientific name, country, coordinates, date, record type, dataset, publisher and license. **Attribution** shows dataset DOI/citation, license and sensitive-data notices. Output links lead to these views and `RUN_SUMMARY`.

`RUN_SUMMARY` includes `provider`, `license`, `status`, `reason`, `rowsSaved`, `rowsCharged`, `sourceCount`, `recordsScanned`, `duplicatesSkipped`, `requests`, `retries`, `bytesDownloaded`, `startOffset`, `nextOffset`, `maxResults`, `truncated`, `taxonMatch`, `datasetCount`, `publisherCount`, `startedAt` and `finishedAt`. `taxonMatch` includes exact match details or candidates for an ambiguous name. `sourceCount` is the current source match count, not the number exported.

| Outcome                                | Run status | Summary                                         | Next action                                          |
| -------------------------------------- | ---------- | ----------------------------------------------- | ---------------------------------------------------- |
| Requested result limit reached         | SUCCEEDED  | `complete`, `MAX_RESULTS`, `truncated:true`     | Use a narrower filter or continue from `nextOffset`. |
| Source has no more matches             | SUCCEEDED  | `complete`, `SOURCE_EXHAUSTED`                  | Use the returned records.                            |
| Valid empty search or unmatched name   | SUCCEEDED  | `not_found`, `NO_MATCHES` or `TAXON_NOT_FOUND`  | Check your filters or scientific name.               |
| Money limit reached                    | SUCCEEDED  | `partial`, `CHARGE_LIMIT`                       | Use saved records or start a bounded follow-up run.  |
| Source, deadline or cancellation error | FAILED     | `partial` if rows were saved, otherwise `error` | Keep saved rows and read the reason before retrying. |
| Invalid or ambiguous input             | FAILED     | `error`, input code or `AMBIGUOUS_TAXON`        | Correct the input. Use a candidate `taxonKey`.       |

`complete` means this limited request completed. It does not mean all GBIF records were exported. A `null` coordinate is missing data, not a technical failure.

### Pricing

Pay per event. One `occurrence` event is charged for each unique record saved. There is also an automatic **Actor Start** fee of **$0.012**. At 128 or 256 MB, it counts as one start event. Platform usage is included in this price model; it is paid by the developer.

| Your Apify tier         | Price per 1000 saved records |
| ----------------------- | ---------------------------: |
| Free                    |                        $0.36 |
| Bronze                  |                       $0.324 |
| Silver                  |                       $0.288 |
| Gold, Platinum, Diamond |                       $0.252 |

The following examples use the Free tier and one start event:

| Saved records | Record charge | Start fee |    Total |
| ------------: | ------------: | --------: | -------: |
|             0 |            $0 |    $0.012 |   $0.012 |
|             1 |      $0.00036 |    $0.012 | $0.01236 |
|            10 |       $0.0036 |    $0.012 |  $0.0156 |
|            50 |        $0.018 |    $0.012 |   $0.030 |
|           100 |        $0.036 |    $0.012 |   $0.048 |
|          1000 |         $0.36 |    $0.012 |   $0.372 |

A valid empty search or a filter with no matches pays only the start fee. A repeat search charges again for records saved in that run. On failed or partial runs, the start fee and saved-record events still apply. Unsaved records have no occurrence event. Dataset storage and charging are separate platform operations; if a platform write acknowledgement fails, check the Dataset and charge counts before a retry.

Set Apify's maximum run cost to control spending. The Actor stops with `CHARGE_LIMIT` when another record cannot fit. It does not start a new source page after this limit.

### Use cases

| Task                    | Input                                   | Fields to use                            |
| ----------------------- | --------------------------------------- | ---------------------------------------- |
| Explore species records | `taxonName` or `taxonKey`               | `gbifID`, taxonomy, `eventDate`          |
| Prepare a map input     | `country`, `bbox`, `hasCoordinate:true` | WGS84 coordinates and uncertainty        |
| Check reuse licenses    | `commercialUseOnly` or `licenses`       | `license`, `publisher`, dataset citation |

### Scheduling and repeat searches

You can create your own Apify schedule using these inputs. Each run is a new live search. There is no automatic baseline, `onlyNew` mode, change detection or deduplication across runs. Deduplicate exports using `gbifID`. An observation year filter does not select the date GBIF indexed a record.

### API, export and integrations

Run this Actor through the Apify API with the same JSON input. Read items from the run's default Dataset and the summary from its default key-value store. Use `gbifID` to join records, and check `license` before reuse. The API example below uses a token from your environment; do not put tokens in saved input or URLs.

```bash
curl --request POST \
  --header "Authorization: Bearer $APIFY_TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{"taxonName":"Panthera leo","yearFrom":2020,"yearTo":2025,"hasCoordinate":true,"maxResults":50}' \
  'https://api.apify.com/v2/acts/cliqtomedia~gbif-occurrence-search/runs?timeout=300&memory=256&maxTotalChargeUsd=0.1'
```

Use Apify's Dataset export to get CSV or JSON. Connect the completed run to your own Make, Zapier, n8n or webhook flow. The Actor does not create a schedule or integration for you.

#### Use with AI agents (MCP)

MCP server for this Actor: `https://mcp.apify.com?tools=cliqtomedia/gbif-occurrence-search`.

Small public input:

```json
{ "taxonName": "Panthera leo", "yearFrom": 2020, "yearTo": 2025, "hasCoordinate": true, "maxResults": 50 }
```

Use `gbifID` for record identity, `scientificName` for the matched taxon, `decimalLatitude`/`decimalLongitude` for published location, and `license` for reuse terms. Small searches normally take seconds; metadata from many datasets can take longer. The 50-record example costs $0.030 on the Free tier. Respect the 1000-record limit and check the summary for errors or partial output.

### Limits and partial results

- Maximum 1000 records and 8 search pages per run. GBIF search allows an offset plus result limit up to 100000.
- Each new dataset and publisher in the results needs metadata requests. A broad search whose records come from many dozens of datasets can reach the 100-request limit before 1000 records; the run then stops with `REQUEST_LIMIT` and keeps the records already saved. Narrow the taxon, area or years, or continue with `nextOffset`.
- The source can change between pages or runs. An offset continuation is not a frozen snapshot.
- At most 100 source requests including metadata and retries, 8 MiB per response, 24 MiB of downloaded responses, and 2 MiB of normalized output per run.
- Source work stops after 120 seconds, or 15 seconds before the platform deadline, whichever comes first. A larger Apify timeout does not increase this source-work budget.
- Requests are sequential, about one per second, with limited retries and `Retry-After` support. GBIF has no guaranteed search query rate.
- Invalid metadata, schema changes, rate-limit exhaustion and source outages fail honestly. Records saved before a later error remain available.
- Country and bounding box use published, interpreted locations. Null or generalized coordinates can limit map use. The Actor does not recover hidden coordinates.
- All three record license types are allowed by default. CC BY requires attribution. CC BY-NC is for non-commercial use. Read the [GBIF data user agreement](https://www.gbif.org/terms/data-user) and each record's license. This service is independent of GBIF.

### Troubleshooting

| Problem                                                | Likely reason                                    | What to do                                                                     |
| ------------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------------------------------------ |
| `AMBIGUOUS_TAXON`                                      | One name has several exact matches               | Read `taxonMatch.candidates`, clear `taxonName`, and set the right `taxonKey`. |
| `TAXON_NOT_EXACT`                                      | Match is fuzzy or at a higher rank               | Use a precise scientific name or numeric key.                                  |
| `TAXON_NOT_FOUND` or `NO_MATCHES`                      | Name not found, or valid filters have no records | Check the name, year, country and license filters.                             |
| `CHARGE_LIMIT`                                         | The next record does not fit your budget         | Read saved rows, then raise the cost limit or request fewer records.           |
| `OFFSET_LIMIT` / invalid range                         | Offset plus requested limit exceeds 100000       | Reduce offset or narrow your search.                                           |
| `DEADLINE`, `PAGE_LIMIT`, `REQUEST_LIMIT`, byte limits | Work exceeds the run's fixed safety budget       | Narrow the search or request fewer records.                                    |
| `SOURCE_*`                                             | Provider failure or unexpected response          | Keep saved rows. Retry later with a small request.                             |
| Null coordinates                                       | Coordinates are absent in the public record      | Set `hasCoordinate:true`; check uncertainty and withheld notices.              |

### FAQ

#### Do I need a GBIF account?

No. This Actor uses public search and metadata endpoints. It does not use the account-based download API.

#### Does a lion search include subspecies?

Yes. A taxon key includes child taxa in GBIF search. Check `rank` and `species` in the output.

#### Can I use every record commercially?

No. The default allows CC BY-NC too. Use `commercialUseOnly:true` for CC0 and CC BY, and follow attribution and source terms.

#### Why are coordinates missing or less precise?

Publishers may omit or generalize sensitive locations. Check `coordinateUncertaintyInMeters`, `informationWithheld` and `dataGeneralizations`.

#### Is this a full download or a live monitor?

It is a limited live search. It has no download DOI, baseline or only-new mode. Dataset DOI and citation are included when available.

### Support

Use the Actor's **Issues** tab for questions, bugs or feature requests. Include the run ID, non-sensitive filters and summary reason. Do not send API tokens, cookies or private data.

# Changelog

This Actor's version history is a separate document: https://apify.com/cliqtomedia/gbif-occurrence-search/changelog.md

# Actor input Schema

## `taxonName` (type: `string`):

Exact scientific name to resolve with GBIF species match. Do not set with taxonKey. Ambiguous names fail with candidates in the summary.

## `taxonKey` (type: `integer`):

Numeric GBIF backbone key. Includes child taxa. Use this to select an ambiguous name.

## `country` (type: `string`):

ISO alpha-2 country of the observation, such as KE. Combined with other filters using AND.

## `bbox` (type: `array`):

WGS84 \[west, south, east, north]. Longitude first. Values must increase; boxes crossing the antimeridian are not supported.

## `yearFrom` (type: `integer`):

Inclusive observation year, 1–9999. If only yearTo is set, the lower bound is 1.

## `yearTo` (type: `integer`):

Inclusive observation year, 1–9999. If only yearFrom is set, the upper bound is 9999.

## `hasCoordinate` (type: `boolean`):

True returns records with both coordinates; false returns records without both. Omit to allow both. Bounding boxes cannot be combined with false.

## `licenses` (type: `array`):

Allowed record licenses, combined using OR. Use the codes CC0_1_0, CC_BY_4_0 or CC_BY_NC_4_0. Empty means all. commercialUseOnly further restricts this list to CC0 and CC BY.

## `commercialUseOnly` (type: `boolean`):

Restrict record licenses to CC0 and CC BY. Attribution still applies to CC BY. Conflicting licenses cause an input error.

## `maxResults` (type: `integer`):

Maximum unique occurrences saved, 1–1000. A result limit is not an export of every source match.

## `offset` (type: `integer`):

Source pagination offset, 0–99999. offset + maxResults must not exceed 100000. The live source may change between runs.

## Actor input object example

```json
{
  "taxonName": "Panthera leo",
  "yearFrom": 2020,
  "yearTo": 2025,
  "hasCoordinate": true,
  "licenses": [],
  "commercialUseOnly": false,
  "maxResults": 50,
  "offset": 0
}
```

# Actor output Schema

## `occurrences` (type: `string`):

Occurrence rows and coordinates.

## `attribution` (type: `string`):

Dataset titles, publisher and record licenses.

## `runSummary` (type: `string`):

Status, reason, match candidates and request/row counts.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "taxonName": "Panthera leo",
    "yearFrom": 2020,
    "yearTo": 2025,
    "hasCoordinate": true,
    "maxResults": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("cliqtomedia/gbif-occurrence-search").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "taxonName": "Panthera leo",
    "yearFrom": 2020,
    "yearTo": 2025,
    "hasCoordinate": True,
    "maxResults": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("cliqtomedia/gbif-occurrence-search").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "taxonName": "Panthera leo",
  "yearFrom": 2020,
  "yearTo": 2025,
  "hasCoordinate": true,
  "maxResults": 50
}' |
apify call cliqtomedia/gbif-occurrence-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,cliqtomedia/gbif-occurrence-search"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/DN9hhCGXdcQneDbHf/builds/vSuVidYljhpWNm14D/openapi.json
