# GBIF Scraper: Species & Wildlife Occurrence Data (`recordsdata/gbif-biodiversity-scraper`) Actor

Scrape GBIF biodiversity data: species search with full taxonomy and threat status, plus wildlife occurrence records with GPS coordinates, dates, observers and photos. Filter by country, year, record type. Export CSV, Excel, JSON. No login or API key. 96,549 jaguar records in Brazil.

- **URL**: https://apify.com/recordsdata/gbif-biodiversity-scraper.md
- **Developed by:** [RecordsData](https://apify.com/recordsdata) (community)
- **Categories:** Education, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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

<p align="center">
  <img src="https://api.apify.com/v2/key-value-stores/AAm3a1h3Z9nYfrvh9/records/banner?v=3" alt="RecordsData" width="100%" />
</p>

## 🦋 GBIF Scraper: Species & Wildlife Occurrence Data

> The GBIF Scraper extracts species taxonomy, wildlife occurrence records and dataset registry entries from the Global Biodiversity Information Facility. Search by scientific name or taxon key, filter by country, year, area (bounding box or WKT polygon), IUCN category and photos, and get up to 92 columns: full taxonomy, GPS coordinates with uncertainty, institution, license and photo URLs. Monitor new records with a seen-id store. Export CSV, Excel, JSON or XML. No login, no API key.

The GBIF Scraper reads the official, open [GBIF](https://www.gbif.org) API, the largest open biodiversity database in the world (about 3.96 billion occurrence records from museums, iNaturalist, eBird and thousands of institutions, counted live on 2026-10-03). A single query such as *Panthera onca* in Brazil returns 96,549 georeferenced records. It has three row types, set by `recordType`: `occurrence`, `species` and `dataset`. It is built for ecologists, GIS analysts, conservation NGOs, data journalists and students.

### 🔎 What does the GBIF Scraper do?

- **Occurrences** for scientific names, GBIF taxon keys, or a whole area with no names, filtered by country, years, basis of record, continent, IUCN Red List category (including Threatened), institution, dataset, photos and coordinates.
- **Area search** with a `boundingBox` or `geometryWkt` polygons.
- **Species backbone** search by common or scientific name, resolving synonyms to the accepted name.
- **Dataset registry** search: title, DOI, type, license, publisher and record count.
- **Monitoring** with `updatedSince` and `onlyNew`. Duplicates are skipped and errors or empty runs are never charged.

### 📋 What data can you extract from GBIF?

Output has 92 keys across the three row types. Fields GBIF does not provide are left out of the row, not returned as empty columns. The dataset has four views: Records, Occurrences, Species and Datasets.

| Record type | Fields |
|---|---|
| Occurrence (`recordType: occurrence`) | Identity: `occurrenceKey`, `catalogNumber`, `taxonKey`, `speciesKey`. Taxonomy: `species`, `scientificName`, `acceptedScientificName`, `taxonRank`, `kingdom` to `genus`. Place: `latitude`, `longitude`, `coordinateUncertaintyInMeters`, `country`, `countryCode`, `stateProvince`, `locality`, `elevation`. Time: `eventDate`, `year`, `month`, `day`. Source: `basisOfRecord`, `datasetName`, `institutionCode`, `recordedBy`, `license`, `rightsHolder`. Biology: `individualCount`, `sex`, `lifeStage`, `iucnRedListCategory`. Media: `imageUrl`, `mediaUrls`, `mediaCount`, `imageCreator`, `imageLicense`. Quality: `issues`, `modified`, `lastInterpreted`, `url` |
| Species (`recordType: species`) | `taxonKey`, `scientificName`, `canonicalName`, `authorship`, `rank`, `taxonomicStatus`, `isSynonym`, `acceptedScientificName`, `acceptedTaxonKey`, `kingdom` to `genus`, `parent`, `basionym`, `publishedIn`, `nomenclaturalStatus`, `isExtinct`, `numDescendants`, `url`. When GBIF has them: `commonNames`, `threatStatuses`, `habitats`, `numOccurrences` |
| Dataset (`recordType: dataset`) | `datasetKey`, `datasetName`, `datasetType`, `description`, `doi`, `license`, `publishingOrganization`, `publishingCountry`, `recordCount`, `keywords`, `publicationDate`, `modified`, `url` |

Known limit: `stateProvince` can show the legacy placeholder `Not Disclosed` where GBIF has no value.

### 📊 Sample output

Abridged first row of a cloud run (jaguar occurrences in Brazil since 2020, photos only). `family`, `genus`, `countryCode` and `institutionCode` were added by hand; the rest is the real row.

```json
{
  "recordType": "occurrence",
  "occurrenceKey": 6129956519,
  "species": "Panthera onca",
  "scientificName": "Panthera onca (Linnaeus, 1758)",
  "family": "Felidae",
  "genus": "Panthera",
  "latitude": -20.061761,
  "longitude": -56.797438,
  "country": "Brazil",
  "countryCode": "BR",
  "stateProvince": "Mato Grosso do Sul",
  "eventDate": "2026-01-04T15:31",
  "year": 2026,
  "basisOfRecord": "HUMAN_OBSERVATION",
  "datasetName": "iNaturalist research-grade observations",
  "institutionCode": "iNaturalist",
  "recordedBy": "Miguel A. Paixão",
  "imageUrl": "https://inaturalist-open-data.s3.amazonaws.com/photos/626403359/original.jpg",
  "license": "http://creativecommons.org/licenses/by/4.0/legalcode",
  "url": "https://www.gbif.org/occurrence/6129956519",
  "scrapedAt": "2026-10-04T04:08:27.826Z"
}
```

### 💰 How much does it cost to scrape GBIF?

Pay per event: you pay only for rows delivered to your dataset (lower rates on paid plans).

| Event | When it is charged | Free plan | Bronze | Silver | Gold and up |
|---|---|---|---|---|---|
| `occurrence-record` | One wildlife observation delivered | $0.020 | $0.01833 | $0.01667 | $0.015 |
| `species-record` | One taxon delivered | $0.020 | $0.01833 | $0.01667 | $0.015 |
| `dataset-record` | One dataset registry row delivered | $0.005 | $0.005 | $0.005 | $0.005 |

That is $20 per 1,000 rows on Free and $15 on Gold. Worked examples: 1,000 occurrence rows on Free cost 1,000 x $0.02 = $20.00, and on Gold $15.00. 200 species rows plus 800 occurrence rows on Free also cost $20.00. 500 dataset rows cost 500 x $0.005 = $2.50 on any plan. You are not charged for error rows, empty results, duplicates, rows skipped by `onlyNew` or a failed run. The actor stops cleanly at your maximum charge. Free users get a 10-row preview.

### 🚀 How to scrape GBIF in 3 steps

1. Enter scientific names (for example `Panthera onca`), taxon keys, an area, or a species or dataset search.
2. Set optional filters.
3. Click **Start**, then download CSV, Excel, JSON or XML.

### ⚙️ Input

| Field | What it does |
|---|---|
| `scientificNames`, `taxonKeys` | Names (default `["Panthera onca"]`) or GBIF taxon keys for occurrences. Use `[]` for species, dataset or area-only runs. |
| `speciesQuery`, `speciesBackboneOnly`, `speciesRank` | Species search by common or scientific name; only the GBIF Backbone Taxonomy; keep one rank such as `SPECIES`. |
| `datasetQuery`, `datasetType`, `datasetPublishingCountry` | Dataset registry search; `OCCURRENCE`, `CHECKLIST`, `SAMPLING_EVENT` or `METADATA`; publisher country code. |
| `country` | Two-letter ISO code such as `BR`, `US`, `CO`. Invalid values stop the run before charging. |
| `yearFrom`, `yearTo` | Year range. |
| `boundingBox`, `geometryWkt` | `south,west,north,east` such as `-20,-58,-17,-55`; closed `POLYGON` or `MULTIPOLYGON` list, longitude first. |
| `continent`, `basisOfRecord`, `occurrenceStatus` | Continent, evidence type (human observation, preserved specimen, fossil and more), `PRESENT` or `ABSENT`. |
| `iucnRedListCategory` | `THREATENED` (CR, EN, VU), or one of CR, EN, VU, NT, LC, DD, EX, EW, NE. |
| `datasetKeys`, `institutionCode` | Occurrences from specific datasets; one institution code such as `NHMUK`. |
| `onlyWithCoordinates`, `onlyWithPhotos`, `excludeGeospatialIssues` | Map-ready records only (default on); records with an image; drop coordinate problems. |
| `updatedSince` | A date such as `2026-09-01`, or `7d`, `4w`, `3m`, `1y`, `today`. Filters by `lastInterpreted`. |
| `onlyNew`, `stateKey`, `resetSeen` | Deliver only unseen rows; monitor memory name; forget what was seen. |
| `maxItems` | Row limit across all row types. Default 10, maximum 1,000,000. |

Example: threatened preserved specimens inside a polygon.

```json
{
  "scientificNames": [],
  "geometryWkt": ["POLYGON((-58 -20, -55 -20, -55 -17, -58 -17, -58 -20))"],
  "basisOfRecord": "PRESERVED_SPECIMEN",
  "iucnRedListCategory": "THREATENED",
  "maxItems": 100
}
```

### 📦 Output and empty results

Every input is validated before the first request; an invalid country, bounding box, WKT or date range fails immediately with no charge. A search that matches nothing finishes as succeeded with no charge. If the GBIF API is unreachable and nothing was delivered, the run fails.

### ⚖️ GBIF Scraper vs alternatives

Read from the public Apify Store pages on 2026-10-10.

| | This actor | chrisp1211 | logiover |
|---|---|---|---|
| Modes | Occurrences, species, dataset registry | Occurrences | Occurrences, species match and search, datasets |
| Occurrence fields | 92 keys over all row types, with media and issues | About 40 fields | 26 fields |
| Area, IUCN and monitor | Bounding box, WKT, IUCN filter, only-new | Not stated in their listing | IUCN not a filter; area and monitor not stated |
| Price per 1,000 rows | $20 Free, $15 Gold | $0.40 | From $1.50 |

Two other actors read the same day: hipersoft (from $0.0004 per record, species and occurrences, no area or dataset search stated) and openclawmara ($0.005 per record, species with optional occurrences and an IUCN field). We are the most expensive in this group, between 4 and 50 times their occurrence prices. The data is open and free from GBIF, so for a few plain fields at scale a cheaper actor is the better buy. Our extra price pays for area and IUCN filters, taxon keys, synonym handling, license and photo columns, issue flags and a seen-id monitor.

### 🧭 Use cases

Species distribution datasets for conservation reports, threatened-species evidence for impact assessments, GIS map layers, licensed photos for editorial work, weekly regional monitoring, and citable datasets with DOIs.

### 🔌 Run the GBIF Scraper via API and integrations

```bash
curl -X POST "https://api.apify.com/v2/acts/RecordsData~gbif-biodiversity-scraper/runs?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"scientificNames":["Panthera onca"],"country":"BR","maxItems":100}'
```

Schedule it on Apify, send results to Google Sheets, Make, Zapier or n8n.

### 🤖 GBIF Scraper MCP server for AI agents

AI agents can call this Actor through the Apify MCP server at `https://mcp.apify.com?tools=RecordsData/gbif-biodiversity-scraper`.

Add this to your MCP client configuration (Claude Desktop, Cursor, VS Code):

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=RecordsData/gbif-biodiversity-scraper"
    }
  }
}
```

Example agent prompt:

> Use the GBIF Scraper to get 50 photographed jaguar (Panthera onca) occurrences in Brazil since 2020, then tell me which states have the most sightings.

Tool description: choose this Actor when an agent needs species taxonomy, georeferenced wildlife observations or the GBIF dataset registry, filtered by country, year, area, IUCN category, record type or photos.

### 🛡️ Is it legal to scrape GBIF?

The actor calls the official public GBIF API at a respectful rate and returns open biodiversity data. Each row carries its license (usually Creative Commons) and dataset rows carry a DOI. Cite GBIF and the source datasets in publications and follow each license's attribution terms. Collector and determiner names (`recordedBy`, `identifiedBy`) appear as published by the source dataset.

### ❓ Frequently asked questions

#### 🦋 What is an occurrence record in GBIF?

In GBIF, an occurrence record is one documented presence of a species at a place and time, such as an iNaturalist photo, a museum specimen or a sensor detection. The GBIF Scraper returns each one as a row with coordinates, date, dataset and observer, and its basisOfRecord field tells you which kind of evidence it is.

#### 🌍 How many GBIF records can I get per species?

GBIF serves up to 100,000 occurrence records per search, and the GBIF Scraper inherits that API limit and logs a warning when GBIF reports more matches. For a species with more records, narrow the query by country, year range or area and run it several times. For example, Panthera onca in Brazil alone matched 96,549 records on 2026-10-03.

#### 📷 Are the GBIF photos free to use?

Each row from the GBIF Scraper carries a license field, an imageUrl and, where GBIF has them, imageCreator and imageLicense. Licenses are usually Creative Commons, but photos are not free of conditions: respect the license shown on the row and credit the observer and the source dataset. Cite GBIF and the original datasets in any publication that uses the data.

#### 🔑 Do I need a GBIF account or API key for the GBIF Scraper?

No. The GBIF Scraper uses the official open GBIF API, so you do not need a GBIF account, a login or an API key. You only need an Apify account to run the actor, and a free Apify account includes monthly credit plus a 10-row preview of the GBIF Scraper output.

#### 🧬 Why do GBIF Scraper species rows have no common names?

Common names, threat statuses, habitats and occurrence counts are included in a GBIF Scraper species row only when GBIF returns them for that taxon. When GBIF has no value, the field is omitted instead of being returned as an empty column. Core taxonomy such as kingdom, family, genus and rank is always present.

#### 0️⃣ Why did my GBIF scrape return 0 results?

Check the spelling of the scientific name, remove the country or year filter, or untick Only with photos in the GBIF Scraper. A search with no matches finishes as succeeded with a status message and no charge. Also remember that speciesQuery searches the taxonomy backbone, scientificNames pulls observations, and datasetQuery searches the dataset registry.

#### 💵 Will I be charged for failed GBIF Scraper runs?

No. The GBIF Scraper charges only for rows delivered to your dataset. Error rows, empty results, duplicate GBIF records and failed runs create no charge. You can also set a maximum charge per run, and the GBIF Scraper stops cleanly when it is reached, so the cost of any run is bounded in advance.

#### 🆓 Can I try the GBIF Scraper for free?

Yes. Free Apify users get a 10-row preview of the GBIF Scraper, which is enough to check the fields, coordinates and photo URLs on your own query. Paid Apify plans unlock larger runs, up to 1,000,000 rows, and lower per-row prices on the Bronze, Silver and Gold tiers.

#### 🗺️ How do I search GBIF by area, and what are the limits?

Use boundingBox as south,west,north,east, or geometryWkt with one or more closed POLYGON or MULTIPOLYGON shapes, longitude first. Leave the names empty to sweep the whole area. The GBIF request line allows about 4 KB, roughly 140 polygon vertices, and a bounding box cannot cross longitude 180. For that, use two polygons. The actor rejects oversized filters before charging.

#### 🗂️ Can I search the GBIF dataset registry?

Yes. Set datasetQuery, and optionally datasetType and datasetPublishingCountry, and the GBIF Scraper returns rows with recordType dataset: title, DOI, type, license, publishing organization and record count. Use the datasetKey with the datasetKeys input to pull occurrences from one dataset. Dataset rows cost a flat $0.005 each ($5 per 1,000).

#### 🔔 How do I monitor GBIF for new records?

Set updatedSince, for example 7d, to keep records GBIF indexed or re-processed in that window, based on lastInterpreted. For true new-only delivery, turn on onlyNew and give the schedule a stateKey. Seen ids are skipped before the row cap and before charging. Use resetSeen to start over. Note that updatedSince alone also returns old records GBIF re-interpreted.

#### 🔁 What happens with synonyms and old names?

When you search a synonym, such as Felis onca, the GBIF Scraper returns the species row with isSynonym true and the accepted scientific name and key resolved, here Panthera onca. Occurrence rows carry both scientificName as recorded and acceptedScientificName. Set speciesBackboneOnly to get one reconciled name per taxon instead of every checklist.

#### 🐆 Can I filter by IUCN threat status?

Yes. Set iucnRedListCategory to THREATENED to keep taxa in CR, EN or VU together, or pick one category such as VU, NT or LC. The filter applies to occurrence searches, and each occurrence row also carries its iucnRedListCategory when GBIF has it. Species rows add threatStatuses, which can list regional assessments.

#### ⚖️ Can I reuse the records commercially?

Check the license on each row. GBIF records are mostly CC0, CC BY or CC BY-NC, and CC BY-NC forbids commercial use. The rows carry license, rightsHolder and the dataset DOI, so you can filter and cite correctly. This is general information, not legal advice.

### 🛟 Support

Found a bug or a missing field? Open the Issues tab on this actor's page, or write to contact.punkrecordsdata@gmail.com. Custom solutions are available on request.

Last updated: 2026-10-11

# Actor input Schema

## `speciesQuery` (type: `string`):

Search the GBIF species backbone by common or scientific name (for example jaguar, Quercus or hummingbird). Returns one species-record row per taxon with kingdom-to-genus taxonomy, authorship, accepted name for synonyms, threat status and occurrence counts. Leave empty to skip species search.

## `speciesBackboneOnly` (type: `boolean`):

Search only the GBIF Backbone Taxonomy, one reconciled name per taxon, instead of every checklist that GBIF indexes (the same species can appear many times across checklists). Off keeps all checklists.

## `speciesRank` (type: `string`):

Keep only taxa of one rank, for example SPECIES to skip genera, families and subspecies. Choose Any to keep every rank.

## `datasetQuery` (type: `string`):

Search the GBIF dataset registry by title, keyword or description (for example camera trap, herbarium or bird atlas). Returns one dataset-record row per dataset with publisher, DOI, license, record count and keywords. Clear the default scientific name below if you only want datasets. Leave empty to skip.

## `datasetType` (type: `string`):

Keep only one kind of dataset. Setting a type without a search text lists every dataset of that type, up to the maximum number of rows. Choose Any to keep all types.

## `datasetPublishingCountry` (type: `string`):

Two-letter ISO 3166 country code of the organisation that publishes the dataset (for example BR, US or CO). Leave empty for worldwide. Any other format stops the run before charging.

## `scientificNames` (type: `array`):

Scientific names to pull wildlife occurrence records for (for example Panthera onca). Returns one occurrence-record row per observation or specimen with GPS coordinates, date, observer, dataset, higher taxonomy and photo. Use an empty list to run species or dataset search only.

## `taxonKeys` (type: `array`):

GBIF taxon keys (whole numbers such as 5219426 for Panthera onca) to pull occurrences for, without name matching. A key of a genus or family includes all species below it. The taxonKey column of a species search gives the keys. Runs in addition to the scientific names.

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

Two-letter ISO 3166 country code that restricts occurrence records to one country (for example BR, US or CO). Leave empty for worldwide results. Any other format stops the run before charging.

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

Return only occurrences observed in this year or later (for example 2020). Leave empty for no lower bound.

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

Return only occurrences observed up to and including this year (for example 2025). Leave empty for no upper bound.

## `onlyWithCoordinates` (type: `boolean`):

Keep only occurrences with decimal latitude/longitude (map-ready).

## `onlyWithPhotos` (type: `boolean`):

Keep only occurrences that include at least one image.

## `basisOfRecord` (type: `string`):

Restrict occurrences to one GBIF basis of record, such as human observation (iNaturalist, eBird) or preserved specimen (museum). Choose Any to keep all record types.

## `boundingBox` (type: `string`):

Keep only occurrences inside a latitude/longitude rectangle, written as four numbers in the order south,west,north,east (minLatitude,minLongitude,maxLatitude,maxLongitude), for example -20,-58,-17,-55 for the northern Pantanal. For an area that crosses longitude 180 use the WKT polygon input. With no scientific names or taxon keys, the box returns every species inside it.

## `geometryWkt` (type: `array`):

One or more closed polygons in WKT, longitude first, for example POLYGON((-58 -20, -55 -20, -55 -17, -58 -17, -58 -20)) or a MULTIPOLYGON. Occurrences are returned only if they fall inside one of them. GBIF refuses requests longer than about 4,000 characters, so keep each polygon to roughly 140 vertices or fewer.

## `continent` (type: `string`):

Keep only occurrences on one continent, as GBIF derives it from the coordinates. Choose Any to keep all.

## `iucnRedListCategory` (type: `string`):

Keep only occurrences of taxa in one IUCN Red List category. Threatened covers CR, EN and VU together. Choose Any to keep all.

## `occurrenceStatus` (type: `string`):

Present keeps records where the organism was seen, Absent keeps the records that report it was not found. Choose Any to keep both.

## `datasetKeys` (type: `array`):

GBIF dataset keys (UUIDs such as 50c9509d-22c7-4a22-a47d-8c48425ef4a7) to take occurrences from. The datasetKey column of a dataset search gives them. Leave empty for all datasets.

## `institutionCode` (type: `string`):

Keep only records from one institution or collection code as GBIF stores it, for example iNaturalist, NHMUK or MNHN. Leave empty for all.

## `excludeGeospatialIssues` (type: `boolean`):

Drop occurrences that GBIF flagged with a coordinate problem (zero coordinates, country mismatch, out of range). The issues column lists every flag when it is off.

## `updatedSince` (type: `string`):

Keep only occurrences that GBIF indexed or re-processed on or after this day (the lastInterpreted date). Write a date such as 2026-09-01 or a relative window such as 7d, 4w, 3m, 1y, today or yesterday. Leave empty for no date filter.

## `onlyNew` (type: `boolean`):

Deliver only species, occurrences and datasets that an earlier run of the same search did not deliver. Rows already seen are skipped before the item limit and are not charged. The memory is kept in your Apify account and is separate for every combination of search inputs.

## `stateKey` (type: `string`):

Optional text that gives this monitor its own memory, so two schedules with identical inputs do not share what they have seen. Leave empty to share by inputs only.

## `resetSeen` (type: `boolean`):

Forget everything this search delivered before and start again. The current run then delivers every match up to the item limit.

## `maxItems` (type: `integer`):

Maximum number of rows to return across species, dataset and occurrence records, which is also the most you can be charged for. Free Apify users are limited to 10 rows (preview). Paid users can request up to 1,000,000.

## Actor input object example

```json
{
  "speciesQuery": "",
  "speciesBackboneOnly": false,
  "speciesRank": "",
  "datasetQuery": "",
  "datasetType": "",
  "datasetPublishingCountry": "",
  "scientificNames": [
    "Panthera onca"
  ],
  "taxonKeys": [],
  "country": "",
  "onlyWithCoordinates": true,
  "onlyWithPhotos": false,
  "basisOfRecord": "",
  "boundingBox": "",
  "geometryWkt": [],
  "continent": "",
  "iucnRedListCategory": "",
  "occurrenceStatus": "",
  "datasetKeys": [],
  "institutionCode": "",
  "excludeGeospatialIssues": false,
  "updatedSince": "",
  "onlyNew": false,
  "stateKey": "",
  "resetSeen": false,
  "maxItems": 10
}
```

# Actor output Schema

## `overview` (type: `string`):

Key fields per row

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

Wildlife occurrences with taxonomy, coordinates and photos

## `species` (type: `string`):

Taxonomy rows from the species search

## `datasets` (type: `string`):

GBIF dataset registry rows

## `fullData` (type: `string`):

Complete dataset with all fields

# 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 = {
    "speciesQuery": "",
    "datasetQuery": "",
    "datasetPublishingCountry": "",
    "scientificNames": [
        "Panthera onca"
    ],
    "taxonKeys": [],
    "country": "",
    "boundingBox": "",
    "geometryWkt": [],
    "datasetKeys": [],
    "institutionCode": "",
    "updatedSince": "",
    "stateKey": "",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("recordsdata/gbif-biodiversity-scraper").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 = {
    "speciesQuery": "",
    "datasetQuery": "",
    "datasetPublishingCountry": "",
    "scientificNames": ["Panthera onca"],
    "taxonKeys": [],
    "country": "",
    "boundingBox": "",
    "geometryWkt": [],
    "datasetKeys": [],
    "institutionCode": "",
    "updatedSince": "",
    "stateKey": "",
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("recordsdata/gbif-biodiversity-scraper").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 '{
  "speciesQuery": "",
  "datasetQuery": "",
  "datasetPublishingCountry": "",
  "scientificNames": [
    "Panthera onca"
  ],
  "taxonKeys": [],
  "country": "",
  "boundingBox": "",
  "geometryWkt": [],
  "datasetKeys": [],
  "institutionCode": "",
  "updatedSince": "",
  "stateKey": "",
  "maxItems": 10
}' |
apify call recordsdata/gbif-biodiversity-scraper --silent --output-dataset

```

## MCP server setup

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

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/lozecju2mFK73QkFm/builds/UBs4U7FUrPyECEXas/openapi.json
