# Pixabay Image Scraper 📸 (`shahidirfan/pixabay-image-scraper`) Actor

Unlock stunning, royalty-free visuals! Effortlessly extract high-resolution image URLs, tags, and creator metadata from Pixabay. Perfect for marketers, this fast data extraction tool accelerates workflows and scales your content strategy.

- **URL**: https://apify.com/shahidirfan/pixabay-image-scraper.md
- **Developed by:** [Shahid Irfan](https://apify.com/shahidirfan) (community)
- **Categories:** Automation, Developer tools, Other
- **Stats:** 4 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.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/platform/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

## Pixabay Image Scraper

Extract rich Pixabay image search results with metadata that goes beyond basic titles and URLs. Collect image details, search result metrics, uploader information, download links, and quality flags in a clean dataset for research, trend tracking, and content planning.

### Features

- **Structured Result Extraction** — Collects data from Pixabay's structured search payload instead of relying on brittle card parsing
- **Richer Metadata** — Returns image dimensions, engagement counts, descriptive fields, uploader details, and quality indicators
- **Duplicate Protection** — Skips repeated records across pages using stable image identifiers
- **Clean Output** — Omits null, empty, and incomplete records before saving to the dataset
- **Flexible Search Input** — Supports keyword search, location-enhanced search terms, and direct Pixabay search URLs
- **Pagination Control** — Stops at your requested image count or page limit

### Use Cases

#### Visual Trend Research
Track which styles, subjects, and image types are popular for a keyword. Use engagement counts, tags, and descriptive metadata to compare search trends over time.

#### Content Planning
Build reference collections for blog posts, social campaigns, or design work. Search by topic and keep direct image links, download paths, and creator details together.

#### Dataset Creation
Create structured datasets for analysis, tagging workflows, or internal cataloging. The output includes both image-level fields and uploader-level context.

#### Creative Market Monitoring
Review result pages for quality signals such as editor's choice flags, AI-generated labels, media type, and result volume to understand the current image landscape.

---

### Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `url` | String | No | — | Full Pixabay search URL to scrape. Takes priority over keyword input. |
| `keyword` | String | No | — | Search term such as `nature`, `sunset`, or `city skyline`. |
| `location` | String | No | — | Extra search context appended to the keyword, such as `Tokyo` or `Pakistan`. |
| `results_wanted` | Integer | No | `20` | Maximum number of unique images to collect. |
| `max_pages` | Integer | No | `10` | Maximum number of result pages to visit. |
| `proxyConfiguration` | Object | No | — | Proxy settings for more reliable access when needed. |

---

### Output Data

Each dataset item can contain:

| Field | Type | Description |
|-------|------|-------------|
| `id` | Number | Unique Pixabay image ID |
| `mediaType` | String | Media type such as photo, illustration, or vector |
| `mediaSubType` | Number | Pixabay media subtype code |
| `mediaDescriptiveType` | String | Human-readable media category |
| `width` | Number | Image width in pixels |
| `height` | Number | Image height in pixels |
| `uploadDate` | String | Upload timestamp returned by Pixabay |
| `name` | String | Pixabay display name for the asset |
| `title` | String | Download-oriented title text |
| `alt` | String | Accessible alt text from the search result |
| `description` | String | Description text when available |
| `pageUrl` | String | Direct Pixabay page URL for the image |
| `href` | String | Original relative page path |
| `imageUrl_small` | String | Smaller image URL |
| `imageUrl_large` | String | Larger image URL |
| `downloadUrl` | String | Download path expanded to a full URL |
| `tags` | String | Comma-separated keyword tags |
| `likeCount` | Number | Number of likes |
| `commentCount` | Number | Number of comments |
| `viewCount` | Number | Number of views |
| `downloadCount` | Number | Number of downloads |
| `isEditorsChoice` | Boolean | Whether Pixabay marks the asset as editor's choice |
| `isAiGenerated` | Boolean | Whether the asset is marked as AI-generated |
| `nsfw` | Boolean | Whether the asset is flagged as sensitive |
| `vector` | Boolean | Whether the asset is a vector |
| `isLowQuality` | Boolean | Quality warning flag |
| `qualityStatus` | Number | Pixabay quality status code |
| `username` | String | Uploader username |
| `profileUrl` | String | Full uploader profile URL |
| `user_id` | Number | Uploader ID |
| `user_avatarSrc` | String | Uploader avatar image URL |
| `user_isAvailableForHire` | Boolean | Hire availability flag |
| `user_isActive` | Boolean | Uploader active status |
| `user_donation_paypal` | String | Donation URL when provided |
| `canvaRetouchUrl` | String | Edit-in-Canva link when available |

---

### Usage Examples

#### Basic Keyword Search

```json
{
    "keyword": "nature",
    "results_wanted": 20,
    "max_pages": 2
}
````

#### Search With Extra Context

```json
{
    "keyword": "cherry blossom",
    "location": "Tokyo",
    "results_wanted": 40,
    "max_pages": 3
}
```

#### Existing Pixabay Search URL

```json
{
    "url": "https://pixabay.com/images/search/mountain-landscape/",
    "results_wanted": 50,
    "max_pages": 4
}
```

***

### Sample Output

```json
{
    "id": 7133867,
    "mediaType": "photo",
    "mediaSubType": 1,
    "mediaDescriptiveType": "photo",
    "width": 3150,
    "height": 2100,
    "uploadDate": "2026-06-02T10:22:48.283309",
    "name": "Sunset, Sand, Beach, Islands",
    "title": "Download free HD stock image of Sunset Sand",
    "alt": "Free Sunset Sand photo and picture",
    "pageUrl": "https://pixabay.com/photos/sunset-sand-beach-islands-leaf-7133867/",
    "imageUrl_small": "https://cdn.pixabay.com/photo/2022/04/15/07/58/sunset-7133867_640.jpg",
    "imageUrl_large": "https://cdn.pixabay.com/photo/2022/04/15/07/58/sunset-7133867_1280.jpg",
    "downloadUrl": "https://pixabay.com/images/download/x-7133867_1920.jpg",
    "tags": "Sunset, Sand, Beach",
    "likeCount": 875,
    "commentCount": 144,
    "viewCount": 415881,
    "downloadCount": 376185,
    "isEditorsChoice": true,
    "isAiGenerated": false,
    "username": "Kanenori",
    "profileUrl": "https://pixabay.com/users/kanenori-4749850/",
    "user_id": 4749850,
    "user_avatarSrc": "https://cdn.pixabay.com/user/2023/03/30/07-49-26-304_96x96.jpg",
    "canvaRetouchUrl": "https://canva.com/content-partner/?utm_medium=partner&utm_source=pixabay&utm_campaign=retouch_in_canva_edit_image&image-url=https%3A//pixabay.com/get/g6f4b1d4e20e2b5841de54991192c08a9aed5c39d4ab77f74e4d07e79408e8edd51ccb1a4df4784ab45c3280aff3d94ae_1920.jpg%3Flonglived%3D&external-id=7133867&canva-media-id="
}
```

***

### Tips for Best Results

#### Start With Smaller Runs

- Use `results_wanted: 20` to validate a search quickly
- Increase the limit after confirming the keyword or URL returns the right assets

#### Use Focused Search Terms

- Specific topics usually return cleaner datasets than broad one-word searches
- Add `location` when you want geographic context included in the search

#### Set Reasonable Page Limits

- Each page can contain many records, so a small `max_pages` value is often enough
- The actor stops automatically once the requested number of unique items is reached

***

### Integrations

Connect your data with:

- **Google Sheets** — Review tags, creators, and engagement data in a spreadsheet
- **Airtable** — Build searchable reference libraries for creative work
- **Webhooks** — Send results to downstream systems automatically
- **Make** — Trigger enrichment or reporting workflows
- **Zapier** — Route new records into business tools

#### Export Formats

- **JSON** — For applications and automation
- **CSV** — For spreadsheet analysis
- **Excel** — For reporting and sharing
- **XML** — For system integrations

***

### Frequently Asked Questions

#### Does the actor skip duplicate records?

Yes. Records are deduplicated before saving so repeated items across pages are not written to the dataset twice.

#### What happens when a field is empty?

Empty, null, and incomplete values are filtered out automatically, so the dataset stays cleaner and easier to use.

#### Can I scrape using a Pixabay URL instead of a keyword?

Yes. Provide a Pixabay search URL through `url` or `startUrl` and the actor will continue pagination from that search.

#### How many results can I collect?

You can collect up to the limit set in `results_wanted`, subject to the available search results and your `max_pages` setting.

#### Are uploader details included?

Yes. The dataset can include uploader usernames, profile URLs, avatar URLs, and some availability or donation fields when Pixabay provides them.

***

### Support

For issues or feature requests, contact support through the Apify Console.

#### Resources

- [Apify Documentation](https://docs.apify.com/)
- [API Reference](https://docs.apify.com/api/v2)
- [Scheduling Runs](https://docs.apify.com/schedules)

***

### Legal Notice

This actor is designed for legitimate data collection purposes. Users are responsible for ensuring compliance with Pixabay terms and applicable laws when collecting and using data.

# Actor input Schema

## `url` (type: `string`):

Full Pixabay search URL, e.g. https://pixabay.com/images/search/nature/ — overrides keyword if provided.

## `keyword` (type: `string`):

Search keyword(s), e.g. 'nature', 'sunset', 'city skyline'. Used if URL is not provided.

## `results_wanted` (type: `integer`):

Maximum number of images to collect. Leave empty to collect all available.

## `max_pages` (type: `integer`):

Maximum number of pages to scrape. Each page returns ~100 images.

## `proxyConfiguration` (type: `object`):

Proxy configuration (Residential group recommended to bypass Cloudflare 403 blocks). Completely optional — toggle off to run without a proxy.

## Actor input object example

```json
{
  "keyword": "nature",
  "results_wanted": 20,
  "max_pages": 10,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

# 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 = {
    "url": "",
    "keyword": "nature",
    "results_wanted": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("shahidirfan/pixabay-image-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 = {
    "url": "",
    "keyword": "nature",
    "results_wanted": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("shahidirfan/pixabay-image-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 '{
  "url": "",
  "keyword": "nature",
  "results_wanted": 20
}' |
apify call shahidirfan/pixabay-image-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Pixabay Image Scraper 📸",
        "description": "Unlock stunning, royalty-free visuals! Effortlessly extract high-resolution image URLs, tags, and creator metadata from Pixabay. Perfect for marketers, this fast data extraction tool accelerates workflows and scales your content strategy.",
        "version": "0.0",
        "x-build-id": "zjznsyyChUdcfyvF0"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/shahidirfan~pixabay-image-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-shahidirfan-pixabay-image-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/shahidirfan~pixabay-image-scraper/runs": {
            "post": {
                "operationId": "runs-sync-shahidirfan-pixabay-image-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/shahidirfan~pixabay-image-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-shahidirfan-pixabay-image-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": {
                    "url": {
                        "title": "Pixabay URL",
                        "type": "string",
                        "description": "Full Pixabay search URL, e.g. https://pixabay.com/images/search/nature/ — overrides keyword if provided."
                    },
                    "keyword": {
                        "title": "Keyword",
                        "type": "string",
                        "description": "Search keyword(s), e.g. 'nature', 'sunset', 'city skyline'. Used if URL is not provided."
                    },
                    "results_wanted": {
                        "title": "Maximum number of images",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of images to collect. Leave empty to collect all available.",
                        "default": 20
                    },
                    "max_pages": {
                        "title": "Maximum number of pages",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of pages to scrape. Each page returns ~100 images.",
                        "default": 10
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Proxy configuration (Residential group recommended to bypass Cloudflare 403 blocks). Completely optional — toggle off to run without a proxy.",
                        "default": {
                            "useApifyProxy": false
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
