# Butterfly & moth records in Spain

**Use case:** 

Fetches GBIF occurrence records for the order Lepidoptera in Spain, returning up to 100 rows with species name, date, coordinates, and collector details.

## Input

```json
{
  "q": "panda",
  "country": "Spain",
  "max_items": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

## Output

```json
{
  "key": {
    "label": "Key",
    "format": "string"
  },
  "dataset_key": {
    "label": "Dataset Key",
    "format": "string"
  },
  "publishing_org_key": {
    "label": "Publishing Org Key",
    "format": "string"
  },
  "network_keys": {
    "label": "Network Keys",
    "format": "string"
  },
  "installation_key": {
    "label": "Installation Key",
    "format": "string"
  },
  "hosting_organization_key": {
    "label": "Hosting Organization Key",
    "format": "string"
  },
  "publishing_country": {
    "label": "Publishing Country",
    "format": "string"
  },
  "protocol": {
    "label": "Protocol",
    "format": "string"
  },
  "last_crawled": {
    "label": "Last Crawled",
    "format": "string"
  },
  "last_parsed": {
    "label": "Last Parsed",
    "format": "string"
  },
  "crawl_id": {
    "label": "Crawl Id",
    "format": "string"
  },
  "basis_of_record": {
    "label": "Basis Of Record",
    "format": "string"
  },
  "occurrence_status": {
    "label": "Occurrence Status",
    "format": "string"
  },
  "taxon_key": {
    "label": "Taxon Key",
    "format": "string"
  },
  "kingdom_key": {
    "label": "Kingdom Key",
    "format": "string"
  },
  "phylum_key": {
    "label": "Phylum Key",
    "format": "string"
  },
  "class_key": {
    "label": "Class Key",
    "format": "string"
  },
  "order_key": {
    "label": "Order Key",
    "format": "string"
  },
  "family_key": {
    "label": "Family Key",
    "format": "string"
  },
  "genus_key": {
    "label": "Genus Key",
    "format": "string"
  },
  "species_key": {
    "label": "Species Key",
    "format": "string"
  },
  "accepted_taxon_key": {
    "label": "Accepted Taxon Key",
    "format": "string"
  },
  "scientific_name": {
    "label": "Scientific Name",
    "format": "string"
  },
  "scientific_name_authorship": {
    "label": "Scientific Name Authorship",
    "format": "string"
  },
  "accepted_scientific_name": {
    "label": "Accepted Scientific Name",
    "format": "string"
  },
  "kingdom": {
    "label": "Kingdom",
    "format": "string"
  },
  "phylum": {
    "label": "Phylum",
    "format": "string"
  },
  "order": {
    "label": "Order",
    "format": "string"
  },
  "family": {
    "label": "Family",
    "format": "string"
  },
  "genus": {
    "label": "Genus",
    "format": "string"
  },
  "species": {
    "label": "Species",
    "format": "string"
  },
  "generic_name": {
    "label": "Generic Name",
    "format": "string"
  },
  "specific_epithet": {
    "label": "Specific Epithet",
    "format": "string"
  },
  "taxon_rank": {
    "label": "Taxon Rank",
    "format": "string"
  },
  "taxonomic_status": {
    "label": "Taxonomic Status",
    "format": "string"
  },
  "issues": {
    "label": "Issues",
    "format": "string"
  },
  "last_interpreted": {
    "label": "Last Interpreted",
    "format": "string"
  },
  "is_sequenced": {
    "label": "Is Sequenced",
    "format": "string"
  },
  "identifiers_identifier": {
    "label": "Identifier",
    "format": "string"
  },
  "institution_key": {
    "label": "Institution Key",
    "format": "string"
  },
  "is_in_cluster": {
    "label": "Is In Cluster",
    "format": "string"
  },
  "recorded_by": {
    "label": "Recorded By",
    "format": "string"
  },
  "class": {
    "label": "Class",
    "format": "string"
  },
  "published_by_gbif_region": {
    "label": "Published By Gbif Region",
    "format": "string"
  },
  "identifier": {
    "label": "Identifier",
    "format": "string"
  },
  "catalog_number": {
    "label": "Catalog Number",
    "format": "string"
  },
  "institution_code": {
    "label": "Institution Code",
    "format": "string"
  },
  "field_number": {
    "label": "Field Number",
    "format": "string"
  },
  "collection_code": {
    "label": "Collection Code",
    "format": "string"
  },
  "gbif_id": {
    "label": "Gbif ID",
    "format": "string"
  },
  "occurrence_id": {
    "label": "Occurrence ID",
    "format": "string"
  },
  "higher_classification": {
    "label": "Higher Classification",
    "format": "string"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The GBIF Species Occurrence Records - Product Data Scraper Actor is ready to run with the inputs already set for "Butterfly & moth records in Spain". [Sign up or log in](https://console.apify.com/create-task-from-example/inQ6LMhmyFijzrKZF) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Butterfly & moth records in Spain" task

The GBIF Species Occurrence Records - Product Data Scraper Actor will start running based on the input automatically. You can also change all the input fields, like search text, country, and more, to match your specific use case.

### 3. Receive the "Butterfly & moth records in Spain" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as key, dataset key, publishing org key, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Butterfly & moth records in Spain" task via API](https://apify.com/gettingtechnicl/gbif-species-occurrences.md).

## About this Actor

This example demonstrates how to use [GBIF Species Occurrence Records - Product Data Scraper](https://apify.com/gettingtechnicl/gbif-species-occurrences.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/gettingtechnicl/gbif-species-occurrences.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

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 full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/gettingtechnicl/gbif-species-occurrences.md

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`).
