# Pexels Stock Image Scraper (`parsebird/pexels-stock-image-scraper`) Actor

Extract free stock photos from Pexels: titles, tags, colors, dimensions, download URLs, and photographer details. Search by keyword or paste a Pexels search URL, filter by orientation, size, and color.

- **URL**: https://apify.com/parsebird/pexels-stock-image-scraper.md
- **Developed by:** [ParseBird](https://apify.com/parsebird) (community)
- **Categories:** Videos, Automation, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.90 / 1,000 photos

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 web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

### Pexels Stock Image Scraper

Extract free stock photos from [Pexels](https://www.pexels.com) by keyword or search URL. The **Pexels Stock Image Scraper** returns clean, structured photo data — titles, tags, dominant colors, dimensions, download links, and full photographer details — ready for design tools, content pipelines, or dataset building.

<table><tr>
<td style="border-left:4px solid #1C1917;padding:12px 16px;font-weight:600">
Search by keyword or paste a Pexels search URL, filter by orientation, size, and dominant color, and get every photo's download links, tags, colors, and photographer metadata in one structured record.
</td>
</tr></table>

##### Copy to your AI assistant

Copy this block into ChatGPT, Claude, Cursor, or any LLM to start using this actor.

```
Apify Actor: parsebird/pexels-stock-image-scraper. Scrapes free stock photos from Pexels (pexels.com). Call via ApifyClient: client.actor("parsebird/pexels-stock-image-scraper").call(run_input={"keyword": "summer", "results_wanted": 20}). Also accepts url (a Pexels search URL, filters preserved), max_pages, page (start page), orientation ("horizontal"/"vertical"/"square"), size ("large"/"medium"/"small"), color (name or hex), locale (e.g. "en-us", "de-de"), and proxyConfiguration. Returns per photo: id, type, slug, title, description, alt, photo_url, download_page_url, download_image_url, small_image_url, medium_image_url, large_image_url, width, height, aspect_ratio, license, created_at, updated_at, publish_at, tags, colors, main_color_rgb, photographer_id/name/slug/username/location/avatar/hero/instagram/twitter/badges, reactions_emotional/technical/stylistic_count, user, image, reactions, search (query/locale/source_url/page/total_photo_results/current_page). Full API spec: https://apify.com/parsebird/pexels-stock-image-scraper/api. Get your token: https://console.apify.com/settings/integrations.
```

### What does Pexels Stock Image Scraper do?

This actor renders Pexels' own search results page and reads the same structured data Pexels' frontend uses to display photos — no manual clicking, no rate-limit guesswork. You give it a keyword, a Pexels search URL, or both, and it returns every matching photo with dimensions, license, tags, dominant colors, and download links.

- 🔍 **Keyword or URL search** — search by a plain keyword, or paste a Pexels search URL with filters already applied (`?orientation=`, `?color=`, etc.) to preserve your exact search settings.
- 🎚️ **Orientation, size, and color filters** — narrow results to horizontal, vertical, or square photos, a minimum resolution tier, or a dominant color (by name or hex code).
- 📄 **Configurable pagination** — set a start page and a max-pages cap to control exactly how deep a run goes.
- 🖼️ **Full image variants** — small, medium, large preview URLs plus the direct high-resolution download link for every photo.
- 👤 **Full photographer metadata** — name, username, location, avatar, hero/badge status, and social links for attribution.
- 🌍 **Locale support** — fetch results in a specific Pexels locale (e.g. `de-de`) to get localized titles and descriptions.

### What data can you extract from Pexels?

| Field | Description |
|-------|-------------|
| `title` / `description` / `alt` | Photo title, description, and alt text |
| `tags` | Pexels' own keyword tags for the photo |
| `colors` / `main_color_rgb` | Dominant color palette (hex) and main color (RGB) |
| `width` / `height` / `aspect_ratio` | Image dimensions |
| `download_image_url` / `download_page_url` | Direct download link and Pexels download page |
| `small_image_url` / `medium_image_url` / `large_image_url` | Preview image variants at three sizes |
| `license` | License label supplied by Pexels (typically `Pexels`, free to use) |
| `photographer_name` / `photographer_username` / `photographer_location` | Photographer attribution |
| `photographer_avatar_small` / `photographer_avatar_medium` | Photographer avatar images |
| `search` | The query, locale, source URL, and page context the photo was found under |

### Input parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `url` | string | No | — | Public Pexels photo search URL; preserves filters already in the URL |
| `keyword` | string | No | `summer` | Search keyword; used when no URL is given, or as the active query when both are supplied |
| `results_wanted` | integer | No | `20` | Maximum number of photo results to save |
| `max_pages` | integer | No | `10` | Maximum number of result pages to process |
| `page` | integer | No | `1` | Page number to start collecting from |
| `orientation` | string | No | — | `horizontal`, `vertical`, or `square` |
| `size` | string | No | — | `large`, `medium`, or `small` (approximate minimum resolution tier) |
| `color` | string | No | — | Dominant color filter — a color name (e.g. `blue`) or hex code |
| `locale` | string | No | `en-us` | Locale override, e.g. `en-us` or `de-de` |
| `proxyConfiguration` | object | No | Residential proxy on | Apify Proxy settings — residential proxy is required and on by default (Pexels blocks Apify's datacenter IPs) |

### Output example

```json
{
  "id": 8455817,
  "type": "photo",
  "slug": "color-flipflops-on-the-sand",
  "title": "Color Flipflops on the Sand",
  "description": "Vibrant flip flops stand in the sand against a clear blue sky.",
  "alt": "Vibrant flip flops stand in the sand against a clear blue sky.",
  "photo_url": "https://www.pexels.com/photo/color-flipflops-on-the-sand-8455817/",
  "download_page_url": "https://www.pexels.com/photo/8455817/download/",
  "download_image_url": "https://images.pexels.com/photos/8455817/pexels-photo-8455817.jpeg?cs=srgb&dl=pexels-rdne-8455817.jpg&fm=jpg",
  "small_image_url": "https://images.pexels.com/photos/8455817/pexels-photo-8455817.jpeg?auto=compress&cs=tinysrgb&w=130",
  "medium_image_url": "https://images.pexels.com/photos/8455817/pexels-photo-8455817.jpeg?auto=compress&cs=tinysrgb&w=350",
  "large_image_url": "https://images.pexels.com/photos/8455817/pexels-photo-8455817.jpeg?auto=compress&cs=tinysrgb&w=1440",
  "width": 4442,
  "height": 6663,
  "aspect_ratio": 0.6666666667,
  "license": "Pexels",
  "publish_at": "2021-06-23T22:00:45.455Z",
  "tags": ["beach", "summer", "vacation"],
  "colors": ["#008b8b", "#00bfff", "#cd5c5c"],
  "photographer_name": "RDNE Stock project",
  "photographer_slug": "rdne",
  "photographer_location": "Los Angeles",
  "search": {
    "query": "summer",
    "locale": "en-us",
    "source_url": "https://www.pexels.com/search/summer/",
    "page": 1,
    "total_photo_results": 5186,
    "current_page": 1
  }
}
```

Download results as **JSON, CSV, Excel, HTML, or XML** directly from the Apify Console, or fetch them via the [Apify API](https://docs.apify.com/api/v2) / [dataset endpoint](https://apify.com/parsebird/pexels-stock-image-scraper/api).

### Use cases

- **Design and content pipelines** — pull curated, license-clear stock photos by keyword directly into a CMS, design tool, or asset library.
- **Dataset building** — build labeled image datasets with tags, colors, and dimensions for computer vision or ML projects.
- **Website and blog imagery** — automate sourcing relevant photos for articles, landing pages, or social posts by topic.
- **Color-based mood boards** — use the `color` filter to collect photos matching a specific brand palette.
- **Photographer discovery** — surface active, high-output photographers on Pexels by keyword niche.

### How to scrape Pexels stock photos

1. **Set your search** — enter a Keyword, or paste a Pexels search URL into the URL field to preserve existing filters.
2. **Choose filters** — set Orientation, Size, and Color to narrow the results.
3. **Set limits** — Results Wanted caps total photos returned; Max Pages and Start Page control how deep pagination goes.
4. **Leave Proxy Configuration on** — residential proxy is enabled by default and required for reliable access.
5. **Run the actor** — click **Start** in the Apify Console, or trigger it via the [API](https://docs.apify.com/api/v2) or on a [schedule](https://docs.apify.com/platform/schedules).
6. **Get your data** — download the dataset as JSON/CSV/Excel, or pull it via the API.

### How much does it cost to scrape Pexels?

This actor uses [Pay-Per-Event (PPE)](https://docs.apify.com/platform/actors/publishing/monetize#pay-per-event-pricing) pricing — you're charged per photo extracted, not per compute unit.

| Event | Price per event | Price per 1,000 |
|-------|----------------|-----------------|
| `photo-scraped` (Free plan) | $0.0011 | **$1.10** |
| `photo-scraped` (Bronze) | $0.001 | **$1.00** |
| `photo-scraped` (Silver) | $0.00095 | **$0.95** |
| `photo-scraped` (Gold) | $0.0009 | **$0.90** |

A run collecting 500 photos costs roughly $0.45–$0.55 depending on your Apify plan. All Apify accounts include a [free trial](https://apify.com/pricing) with credits to try the actor before committing to a paid plan.

### FAQ

**What does the `size` filter actually do?**
Pexels' own site filters photos by minimum width/height rather than a named size tier, so `large`/`medium`/`small` are mapped to approximate minimum-resolution thresholds (roughly matching Pexels' official API's 24MP/12MP/4MP tiers).

**What format does `color` accept?**
Either a common color name (`red`, `blue`, `green`, etc.) or a hex code (with or without the `#`). The filter matches photos by dominant color, not exact pixel color.

**Why do `main_color_rgb` or `photographer_location` sometimes come back empty?**
Not every photo has a Pexels-computed main color, and not every photographer has a location set on their profile. These fields are returned empty when Pexels doesn't supply a value.

**Why is a proxy required?**
Pexels blocks Apify's datacenter IPs via Cloudflare, even from a real browser. A residential proxy is enabled by default in Proxy Configuration to keep runs reliable — turning it off will cause runs to fail.

**Does this actor download the actual image files?**
No — it returns the `download_image_url` and image preview URLs so you can download files yourself, on your own schedule and infrastructure.

**Does this actor support scheduling and integrations?**
Yes. Use [Apify Schedules](https://docs.apify.com/platform/schedules) to run it daily or weekly, connect it to [Zapier, Make, or Slack](https://apify.com/integrations), or call it through the [Apify API](https://docs.apify.com/api/v2) from your own backend.

**What are the limitations of this actor?**
⚠️

- Pexels' search results are effectively capped around 10,000 matches per query, regardless of the total match count shown
- Results reflect Pexels' public photo search only (not videos or user profiles)

### Is it legal to scrape Pexels?

Yes. This actor only accesses publicly available photo listings that Pexels makes visible to any visitor. It does not bypass login walls or access private accounts. Scraping publicly available data is generally considered legal — see [Apify's overview of web scraping legality](https://www.apify.com/is-web-scraping-legal) for more detail. All photos returned are licensed under the free [Pexels License](https://www.pexels.com/license/). Users are responsible for ensuring their use of the collected data complies with applicable laws and [Pexels' Terms of Service](https://www.pexels.com/terms-of-service/).

### Python and JavaScript usage

**Python** ([apify-client](https://docs.apify.com/api/client/python/)):

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")

run_input = {
    "keyword": "summer",
    "results_wanted": 50,
    "orientation": "horizontal",
}

run = client.actor("parsebird/pexels-stock-image-scraper").call(run_input=run_input)

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

**JavaScript** ([apify-client](https://docs.apify.com/api/client/js/)):

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

const client = new ApifyClient({ token: '<YOUR_API_TOKEN>' });

const input = {
    keyword: 'summer',
    results_wanted: 50,
    orientation: 'horizontal',
};

const run = await client.actor('parsebird/pexels-stock-image-scraper').call(input);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### Related Actors

- [Unsplash Image Scraper](https://apify.com/parsebird/unsplash-image-scraper) — free stock photos from Unsplash
- [Pinterest Search Scraper](https://apify.com/parsebird/pinterest-search-scraper) — image search results from Pinterest
- [Pinterest Image Downloader](https://apify.com/parsebird/pinterest-image-downloader) — bulk-download Pinterest images
- [Pinterest Profile Scraper](https://apify.com/parsebird/pinterest-profile-scraper) — pins and boards from a Pinterest profile

Browse the full catalog on the [ParseBird Apify Store page](https://apify.com/parsebird).

# Actor input Schema

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

Public Pexels photo search URL. Use a URL with existing filters when you want to preserve search settings.

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

Search keyword used when a URL is not provided, or used as the active query when both inputs are supplied.

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

Maximum number of photo results to save.

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

Maximum number of result pages to process.

## `page` (type: `integer`):

Page number from which to start collecting results.

## `orientation` (type: `string`):

Optional filter such as horizontal, vertical, or square.

## `size` (type: `string`):

Optional Pexels size filter (minimum image dimensions).

## `color` (type: `string`):

Optional dominant color filter — a color name (e.g. "blue") or a hex code (e.g. "#0000ff").

## `locale` (type: `string`):

Locale override such as en-us or de-de.

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

Apify Proxy settings. Pexels blocks Apify's datacenter IPs via Cloudflare, so a residential proxy is required for reliable access — this is on by default.

## Actor input object example

```json
{
  "url": "https://www.pexels.com/search/summer/",
  "keyword": "summer",
  "results_wanted": 20,
  "max_pages": 10,
  "page": 1,
  "orientation": "",
  "size": "",
  "locale": "en-us",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `dataset` (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": "https://www.pexels.com/search/summer/",
    "keyword": "summer",
    "results_wanted": 20,
    "max_pages": 10,
    "locale": "en-us",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("parsebird/pexels-stock-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": "https://www.pexels.com/search/summer/",
    "keyword": "summer",
    "results_wanted": 20,
    "max_pages": 10,
    "locale": "en-us",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("parsebird/pexels-stock-image-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 '{
  "url": "https://www.pexels.com/search/summer/",
  "keyword": "summer",
  "results_wanted": 20,
  "max_pages": 10,
  "locale": "en-us",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call parsebird/pexels-stock-image-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parsebird/pexels-stock-image-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/WaEmNXWxSgOotUJaP/builds/j2j1706lXTj8jNagX/openapi.json
