# GBIF Biodiversity Scraper — Species, Occurrences & Datasets (`logiover/gbif-biodiversity-scraper`) Actor

Scrape GBIF by species name, taxon key, or country. Extract occurrence records with GPS coordinates, taxonomy, dataset, observer, and date. No API key, no login. 2B+ records.

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

## Pricing

from $1.50 / 1,000 results

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## GBIF Biodiversity Scraper — Species Occurrences, Taxonomy & Dataset Search

Extract millions of biodiversity occurrence records from the Global Biodiversity Information Facility (GBIF) — the world's largest open-access biodiversity database — with no API key and no login.

### What does GBIF Biodiversity Scraper do?

GBIF Biodiversity Scraper connects to the official, keyless GBIF REST API (`api.gbif.org/v1`) and retrieves structured occurrence records, taxonomic species data, and dataset metadata from the world's largest open biodiversity database.

The actor supports four operating modes. **Occurrences mode** is the flagship: it resolves any scientific species name to a GBIF taxon key via `/species/match`, then paginates `/occurrence/search` with offset-based pagination (300 records per page), collecting GPS coordinates, taxonomy, observer information, institution codes, event dates, and IUCN Red List categories. The GBIF occurrence index contains over 2 billion georeferenced records from 1,700+ publishers across 190+ countries — one run can pull thousands of records with a single species name.

**speciesMatch** mode resolves a taxon name to its accepted canonical name and GBIF usage key. **speciesSearch** mode returns paginated species catalog results for a keyword. **datasets** mode searches the GBIF dataset registry to discover data sources by theme or keyword. All modes are keyless, proxy-friendly, and production-hardened with retry logic and graceful error handling.

### Who is it for?

- **Conservation biologists and ecologists** tracking species distribution across time and geography.
- **Environmental data scientists** building GIS layers, biodiversity maps, or machine-learning datasets.
- **Academic researchers** needing bulk occurrence data for species distribution models (SDMs) like MaxEnt.
- **Nature NGOs and government agencies** monitoring population trends and protected-area coverage.
- **Data engineers** building biodiversity data pipelines for public or private analytics platforms.

### Use cases

- Pull 10,000 grizzly bear (`Ursus arctos`) sightings across Europe to model habitat range shifts under climate change.
- Extract all insect occurrence records in Germany from 2000–2024 to analyse pollinator decline trends.
- Search GBIF datasets related to "coral reef" to discover data sources for marine biodiversity research.
- Match the scientific name "Panthera leo" to its accepted GBIF taxon key and downstream metadata in one call.
- Build a country-level occurrence matrix for endangered amphibians using country + IUCN Red List filters.

### Why use GBIF Biodiversity Scraper?

- **No API key or account needed** — the GBIF API is fully open; zero setup friction.
- **2 billion+ records** — the largest open biodiversity index on the planet, updated daily.
- **25 structured output fields** per occurrence: coordinates, taxonomy (kingdom to species), observer, institution, dataset, IUCN status, event date, and more.
- **Intelligent taxon resolution** — supply a plain scientific name; the actor auto-resolves it to the correct GBIF taxon key before querying, handling synonyms and fuzzy matches.
- **Bulk pagination** — paginate up to 100,000 records per run using offset-based pagination; suitable for large-scale research workflows.
- **Export to CSV, JSON, or Excel** — one click in the Apify console; or integrate via API, Zapier, or Google Sheets.

### What data can you extract?

Each occurrence record contains the following fields:

| Field | Type | Description |
|---|---|---|
| `key` | number | GBIF unique occurrence key |
| `gbifID` | string | GBIF occurrence identifier |
| `scientificName` | string | Full accepted scientific name with authorship |
| `kingdom` | string | Taxonomic kingdom (e.g. Animalia, Plantae, Fungi) |
| `phylum` | string | Taxonomic phylum |
| `class` | string | Taxonomic class |
| `order` | string | Taxonomic order |
| `family` | string | Taxonomic family |
| `genus` | string | Taxonomic genus |
| `species` | string | Canonical species name (genus + epithet) |
| `taxonKey` | number | GBIF taxon key for the occurrence |
| `country` | string | Country name where occurrence was recorded |
| `countryCode` | string | ISO 3166-1 alpha-2 country code |
| `locality` | string | Verbatim locality description |
| `decimalLatitude` | number | WGS84 decimal latitude |
| `decimalLongitude` | number | WGS84 decimal longitude |
| `eventDate` | string | Date or date range of observation |
| `year` | number | Year of observation |
| `basisOfRecord` | string | Record type: HUMAN_OBSERVATION, PRESERVED_SPECIMEN, MACHINE_OBSERVATION, etc. |
| `datasetName` | string | Name of the contributing dataset |
| `datasetKey` | string | GBIF dataset UUID |
| `recordedBy` | string | Observer/collector name |
| `institutionCode` | string | Institution code of the contributing organisation |
| `occurrenceStatus` | string | PRESENT or ABSENT |
| `iucnRedListCategory` | string | IUCN category: LC, NT, VU, EN, CR, EW, EX, or null |
| `license` | string | Creative Commons license URL for the record |

**Sample output record:**

```json
{
  "key": "4126541301",
  "gbifID": "4126541301",
  "scientificName": "Ursus arctos Linnaeus, 1758",
  "kingdom": "Animalia",
  "phylum": "Chordata",
  "class": "Mammalia",
  "order": "Carnivora",
  "family": "Ursidae",
  "genus": "Ursus",
  "species": "Ursus arctos",
  "taxonKey": "2433433",
  "country": "Finland",
  "countryCode": "FI",
  "locality": null,
  "decimalLatitude": 64.201764,
  "decimalLongitude": 29.570151,
  "eventDate": "2010-01-01T00:00Z/2010-12-31T00:00Z",
  "year": 2010,
  "basisOfRecord": "HUMAN_OBSERVATION",
  "datasetName": "Finnish Insect Database",
  "datasetKey": "3b301884-51b9-443f-b63c-47feeccfb89f",
  "recordedBy": "Mikko Heikura",
  "institutionCode": null,
  "occurrenceStatus": "PRESENT",
  "iucnRedListCategory": "LC",
  "license": "http://creativecommons.org/licenses/by/4.0/legalcode"
}
````

### How to use

#### Option A — Search by species name (occurrences mode)

Use this when you want GPS-tagged sightings for a specific species.

1. Set **Mode** to `occurrences`.
2. Enter the scientific species name in **Taxon Name**, e.g. `Ursus arctos`.
3. Optionally filter by **Country Code** (e.g. `FI` for Finland) and **Year From / Year To**.
4. Set **Max Results** to control volume (default 300, max 100000).
5. Run. The actor resolves the name to a taxon key, then paginates results.

```json
{
  "mode": "occurrences",
  "taxonName": "Ursus arctos",
  "country": "FI",
  "yearFrom": 2010,
  "yearTo": 2024,
  "maxResults": 1000
}
```

#### Option B — Search datasets or species catalog

Use this when you want to discover what data sources exist for a topic, or look up species metadata.

1. Set **Mode** to `datasets` or `speciesSearch`.
2. Enter a keyword in **Query**, e.g. `coral reef`.
3. Set **Max Results** as needed.
4. Run.

```json
{
  "mode": "datasets",
  "query": "coral reef monitoring",
  "maxResults": 200
}
```

### Input parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `occurrences` | Operation mode: `occurrences`, `speciesMatch`, `speciesSearch`, `datasets` |
| `query` | string | — | Free-text search query for occurrences, species, or datasets |
| `taxonName` | string | — | Scientific species name to resolve + filter (e.g. `Panthera leo`) |
| `country` | string | — | ISO 2-letter country code to filter occurrences (e.g. `US`, `DE`) |
| `yearFrom` | integer | — | Filter occurrences from this year onwards |
| `yearTo` | integer | — | Filter occurrences up to this year |
| `maxResults` | integer | `300` | Maximum records to return (1–100000) |
| `proxy` | object | Datacenter | Apify proxy configuration |

**Full input JSON example:**

```json
{
  "mode": "occurrences",
  "taxonName": "Panthera leo",
  "country": "KE",
  "yearFrom": 2015,
  "yearTo": 2024,
  "maxResults": 5000,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["DATACENTER"]
  }
}
```

### Output example

```json
{
  "key": "2304895122",
  "gbifID": "2304895122",
  "scientificName": "Panthera leo (Linnaeus, 1758)",
  "kingdom": "Animalia",
  "phylum": "Chordata",
  "class": "Mammalia",
  "order": "Carnivora",
  "family": "Felidae",
  "genus": "Panthera",
  "species": "Panthera leo",
  "taxonKey": "5219404",
  "country": "Kenya",
  "countryCode": "KE",
  "locality": "Maasai Mara National Reserve",
  "decimalLatitude": -1.4061,
  "decimalLongitude": 35.0078,
  "eventDate": "2022-07-15",
  "year": 2022,
  "basisOfRecord": "HUMAN_OBSERVATION",
  "datasetName": "iNaturalist Research-grade Observations",
  "datasetKey": "50c9509d-22c7-4a22-a47d-8c48425ef4a7",
  "recordedBy": "kenya_wildlife_observer",
  "institutionCode": "iNaturalist",
  "occurrenceStatus": "PRESENT",
  "iucnRedListCategory": "VU",
  "license": "http://creativecommons.org/licenses/by-nc/4.0/legalcode"
}
```

### Tips for best results

- **Use scientific names**, not common names. "Brown bear" will produce vague results; `Ursus arctos` resolves precisely.
- **Combine taxonName + country** to narrow results to a specific region for a species of interest.
- **Set yearFrom / yearTo** when you need temporal trend analysis rather than historical archives.
- **Start with maxResults 300** to preview the data, then scale to thousands once you confirm the query is correct.
- **Check IUCN Red List category** in results to quickly identify threatened species (VU, EN, CR) in your dataset.
- **Use datasets mode** first to discover what GBIF data sources cover your topic — then note the datasetKey and filter by it using the `query` field.
- **Occurrence counts vary by species** — common widespread species like sparrows have millions of records; rare endemic species may have hundreds.
- **Coordinate precision varies** — some records are exact GPS points; others are generalised to 10 km grid cells for species protection. Check `coordinateUncertaintyInMeters` in raw data.
- **basisOfRecord helps filter quality** — `HUMAN_OBSERVATION` and `PRESERVED_SPECIMEN` are the most common; machine observations from camera traps are tagged as `MACHINE_OBSERVATION`.
- **GBIF data is CC-licensed** — most records are CC BY 4.0; always check the `license` field for proper attribution.

### Integrations

- **Google Sheets**: Use the Apify Google Sheets integration to push biodiversity occurrence data directly into a spreadsheet for mapping or analysis.
- **Slack**: Trigger a Slack notification when a new species occurrence dataset run completes.
- **Zapier / Make**: Connect GBIF data to any workflow — e.g. auto-export to Airtable, email a summary, or trigger GIS processing.
- **Webhooks**: Configure a webhook to receive the dataset URL as soon as the run finishes.
- **Schedule**: Run nightly or weekly to stay current with new GBIF occurrence records submitted by publishers globally.

### API usage

**cURL:**

```bash
curl -X POST "https://api.apify.com/v2/acts/logiover~gbif-biodiversity-scraper/runs?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode":"occurrences","taxonName":"Ursus arctos","maxResults":300}'
```

**Node.js:**

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

const client = new ApifyClient({ token: 'YOUR_TOKEN' });

const run = await client.actor('logiover/gbif-biodiversity-scraper').call({
  mode: 'occurrences',
  taxonName: 'Panthera leo',
  country: 'KE',
  maxResults: 1000,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

**Python:**

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")

run = client.actor("logiover/gbif-biodiversity-scraper").call(run_input={
    "mode": "occurrences",
    "taxonName": "Panthera leo",
    "country": "KE",
    "maxResults": 1000,
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

### Use with AI agents (MCP)

GBIF Biodiversity Scraper is compatible with the Apify MCP server, allowing AI agents to request biodiversity data in natural language. Connect the Apify MCP server to Claude, GPT-4, or any MCP-compatible agent and instruct it: *"Fetch 500 occurrence records for Apis mellifera in Germany from 2018 to 2023 using the GBIF Biodiversity Scraper actor."* The agent will invoke the actor, paginate the results, and return structured JSON ready for analysis or visualisation.

### FAQ

#### Does this actor require an API key or GBIF account?

No. The GBIF REST API is fully public and keyless. This actor requires zero credentials from you — no registration, no token, nothing. Just run it.

#### How many occurrence records does GBIF have?

GBIF indexes over 2 billion occurrence records from 1,700+ data publishers across 190+ countries. Data comes from natural history museums, citizen science platforms (iNaturalist, eBird, GBIF DwC-A), government agencies, and research institutions.

#### What is the maximum number of records per run?

This actor caps pagination at 100,000 records per run (GBIF's own API paginates up to this offset). For larger datasets, split by country or year range across multiple runs and merge the results.

#### Why did my run return zero results?

Check your filters: if you combine `taxonName` + `country` + a narrow year range for a rare species, the intersection may be empty. Start without `country` and `year` filters to confirm records exist for your species, then narrow.

#### Some records have null latitude/longitude — is that normal?

Yes. Not all occurrence records are georeferenced. Records from older specimens, some museum collections, or deliberately coarsened coordinates (for species protection) may lack GPS values. Filter on `decimalLatitude IS NOT NULL` in downstream analysis.

#### How do I export data to CSV or Excel?

From the Apify console dataset view, click **Export** and choose CSV, XLSX, or JSON. You can also use the Apify API to download results programmatically.

#### How fast does the actor run?

In occurrences mode, the actor fetches up to 300 records per API request. A run fetching 5,000 records typically completes in under 2 minutes. The GBIF API is fast and reliable with no throttling for typical research workloads.

#### Is GBIF data legal to use?

Yes. All data in GBIF is published under open Creative Commons licenses (CC0, CC BY, CC BY-NC). The GBIF API Terms of Use explicitly permit bulk programmatic access for research purposes. Always attribute the original data publisher as indicated in the `license` and `datasetName` fields.

#### What is `basisOfRecord` and which value should I trust most?

`basisOfRecord` describes how the observation was made:

- `HUMAN_OBSERVATION` — direct sighting by a person (iNaturalist, eBird, etc.)
- `PRESERVED_SPECIMEN` — museum collection specimen
- `MACHINE_OBSERVATION` — camera trap, acoustic detector, satellite tag
- `MATERIAL_SAMPLE` — DNA sample or environmental sample

For population and distribution studies, `HUMAN_OBSERVATION` is most common and generally reliable, especially with research-grade iNaturalist records.

#### Does the actor follow GBIF API pagination correctly?

Yes. The actor uses offset-based pagination (`offset=0, 300, 600, ...`) and respects the `endOfRecords` flag returned by GBIF. It stops cleanly when records are exhausted, the offset cap is reached, or `maxResults` is satisfied.

#### How often is GBIF data updated?

GBIF ingests new occurrence records from publishers continuously. Major publishers like iNaturalist push updates daily; museum collections update quarterly or annually. Running this actor weekly will catch new citizen science observations for common species.

#### Can I filter by IUCN Red List status?

Not directly as an input filter (GBIF API does not support IUCN category as a query parameter), but the `iucnRedListCategory` field is present in results. Export to CSV, then filter by VU, EN, or CR to isolate threatened species records for analysis.

### Is it legal?

GBIF data is published under open Creative Commons licenses and the GBIF API is explicitly designed for bulk programmatic access. The GBIF Terms of Use state: *"GBIF and its data publishers encourage the use of data from the GBIF network."* All data extracted by this actor is publicly available, openly licensed, and intended for scientific and research use. Users must attribute the original publisher as specified in each record's `license` and `datasetName` fields. This actor does not circumvent any authentication mechanism.

### Related scrapers

- **[iNaturalist Scraper](https://apify.com/logiover/inaturalist-scraper)** — Citizen science observations with photos, quality grades, and user profiles direct from iNaturalist.
- **[PubMed Scraper](https://apify.com/logiover/pubmed-scraper)** — Scientific publications from NCBI PubMed, including abstracts, authors, and DOIs.
- **[OpenAlex Academic Papers Scraper](https://apify.com/logiover/openalex-academic-papers-scraper)** — Bulk scientific literature from OpenAlex's open-access academic graph.
- **[WHO GHO Scraper](https://apify.com/logiover/who-gho-scraper)** — Public health and environmental indicators from the WHO Global Health Observatory.

# Actor input Schema

## `mode` (type: `string`):

Operation mode: occurrences (search occurrence records), speciesMatch (match a taxon name), speciesSearch (search species names), datasets (search GBIF datasets).

## `query` (type: `string`):

Free-text search query. For occurrences: full-text search. For species/datasets: keyword search. Example: 'Panthera leo'. Leave empty to browse all.

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

Scientific name of the species to look up and filter occurrences by (e.g. 'Ursus arctos'). Automatically resolved to a taxon key via the GBIF species match API. Optional.

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

Filter occurrences by country (ISO 3166-1 alpha-2). Leave as 'All countries' for no filter.

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

Filter occurrences from this year onwards (inclusive). Example: 2010. Optional.

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

Filter occurrences up to this year (inclusive). Example: 2024. Optional.

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

Maximum number of records to return. GBIF has 3.9B+ occurrences — set a reasonable cap. Default 300, max 100000.

## `proxy` (type: `object`):

Apify proxy configuration. Automatic proxy is recommended; the actor also falls back to a direct connection if the proxy is unavailable.

## Actor input object example

```json
{
  "mode": "occurrences",
  "query": "",
  "taxonName": "",
  "country": "",
  "maxResults": 500,
  "proxy": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

All records extracted by this run. Open the Dataset tab to browse, filter, and export as CSV, JSON, or Excel.

# 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 = {
    "maxResults": 500
};

// Run the Actor and wait for it to finish
const run = await client.actor("logiover/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 = { "maxResults": 500 }

# Run the Actor and wait for it to finish
run = client.actor("logiover/gbif-biodiversity-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "maxResults": 500
}' |
apify call logiover/gbif-biodiversity-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=logiover/gbif-biodiversity-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "GBIF Biodiversity Scraper — Species, Occurrences & Datasets",
        "description": "Scrape GBIF by species name, taxon key, or country. Extract occurrence records with GPS coordinates, taxonomy, dataset, observer, and date. No API key, no login. 2B+ records.",
        "version": "1.0",
        "x-build-id": "gSMaMps1pNKS5r7t6"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/logiover~gbif-biodiversity-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-logiover-gbif-biodiversity-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/logiover~gbif-biodiversity-scraper/runs": {
            "post": {
                "operationId": "runs-sync-logiover-gbif-biodiversity-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/logiover~gbif-biodiversity-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-logiover-gbif-biodiversity-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "occurrences",
                            "speciesMatch",
                            "speciesSearch",
                            "datasets"
                        ],
                        "type": "string",
                        "description": "Operation mode: occurrences (search occurrence records), speciesMatch (match a taxon name), speciesSearch (search species names), datasets (search GBIF datasets).",
                        "default": "occurrences"
                    },
                    "query": {
                        "title": "Query / Keyword",
                        "type": "string",
                        "description": "Free-text search query. For occurrences: full-text search. For species/datasets: keyword search. Example: 'Panthera leo'. Leave empty to browse all.",
                        "default": ""
                    },
                    "taxonName": {
                        "title": "Taxon Name (scientific)",
                        "type": "string",
                        "description": "Scientific name of the species to look up and filter occurrences by (e.g. 'Ursus arctos'). Automatically resolved to a taxon key via the GBIF species match API. Optional.",
                        "default": ""
                    },
                    "country": {
                        "title": "Country",
                        "enum": [
                            "",
                            "US",
                            "CA",
                            "MX",
                            "BR",
                            "AR",
                            "CO",
                            "PE",
                            "CL",
                            "GB",
                            "IE",
                            "FR",
                            "DE",
                            "NL",
                            "BE",
                            "ES",
                            "PT",
                            "IT",
                            "CH",
                            "AT",
                            "SE",
                            "NO",
                            "FI",
                            "DK",
                            "IS",
                            "PL",
                            "CZ",
                            "RO",
                            "GR",
                            "RU",
                            "UA",
                            "TR",
                            "ZA",
                            "KE",
                            "TZ",
                            "NG",
                            "EG",
                            "MA",
                            "MG",
                            "CN",
                            "JP",
                            "KR",
                            "IN",
                            "ID",
                            "MY",
                            "TH",
                            "VN",
                            "PH",
                            "AU",
                            "NZ",
                            "CR",
                            "PA",
                            "EC"
                        ],
                        "type": "string",
                        "description": "Filter occurrences by country (ISO 3166-1 alpha-2). Leave as 'All countries' for no filter.",
                        "default": ""
                    },
                    "yearFrom": {
                        "title": "Year From",
                        "type": "integer",
                        "description": "Filter occurrences from this year onwards (inclusive). Example: 2010. Optional."
                    },
                    "yearTo": {
                        "title": "Year To",
                        "type": "integer",
                        "description": "Filter occurrences up to this year (inclusive). Example: 2024. Optional."
                    },
                    "maxResults": {
                        "title": "Max Results",
                        "minimum": 1,
                        "maximum": 100000,
                        "type": "integer",
                        "description": "Maximum number of records to return. GBIF has 3.9B+ occurrences — set a reasonable cap. Default 300, max 100000.",
                        "default": 300
                    },
                    "proxy": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Apify proxy configuration. Automatic proxy is recommended; the actor also falls back to a direct connection if the proxy is unavailable.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
