# Pexels Scraper - Free Stock Photos & Videos with Download Links (`hexagone-data/pexels-scraper`) Actor

Scrape Pexels free stock photos and videos: searches with filters, photo and video pages, profiles, collections, similar media. Download links, video files by quality, tags, colors, size, author; optional views, downloads, likes, EXIF. Past the 480-result window. Pay per media.

- **URL**: https://apify.com/hexagone-data/pexels-scraper.md
- **Developed by:** [Hexagone Data](https://apify.com/hexagone-data) (community)
- **Categories:** For creators, Automation, Agents
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 1,000 media

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Pexels Scraper - Free Stock Photos & Videos with Download Links

Scrape **free stock photos and videos from Pexels** for any search, as JSON, CSV or Excel: the **direct download link of the original file**, the large / medium / small images, for videos **every video file by quality** (width, height, fps, link), title, alt text, description, every keyword, colors, width, height, orientation, license, dates and the **author for attribution**. With *Include details*: views, downloads, likes, the tags shown on the page and, for photos, EXIF (camera, aperture, focal length, ISO, shutter speed, date taken), location and file size.

If this Actor helps you, please leave a review on its Store page: it helps others find it, and tells us what to improve.

### Why this one: past the 480-result window, with a true status

- **Pexels shows at most 480 results for one search** (20 pages of 24; page 21 is empty, measured on 13 searches), even when it announces 10,000. With *Go past 480 results* (on by default), the Actor splits the search with the site's own filters (orientation, then width ranges for photos or duration ranges for videos, halved until each slice is under the window) and reads every slice, without duplicates, until your *Max media*.
- **A true status for each input**: `done` only when what was listed reaches what Pexels announces; otherwise `partial_collection` with the numbers and the reason (`site_window`, `slice_cap`…). Pexels' announced total is approximate (it searches by meaning and caps the count at 10,000): the summary says so instead of hiding the gap.
- **Everything you can paste**: searches with their filters and language, photo and video pages, profiles (every page, past 480), collections, similar media, media ids.
- **One record per media, one charge**: a media seen by two searches or two slices is delivered and charged once.
- **Never the author's donation e-mail** (Pexels serves a PayPal link with the author's e-mail address: never delivered).

### Try it with 100 media

Click Start: the prefilled input searches **mountain** (photos) and stops at 100 media. Set **Max media** to 0 for every result, tick *Include details* for views, downloads, likes and EXIF.

### What to paste

| You give | The Actor reads |
|---|---|
| **Search words** (`mountain`, `coffee shop`) | one Pexels search per word, for the *Media type* (`photos`, `videos`, or `all` = one photo search and one video search), with the form's filters and *Language* |
| `https://www.pexels.com/search/mountain/` (also `/search/?q=mountain`, `/search/videos/ocean/`, with the site's filters such as `?orientation=landscape&color=blue&people_count=0`) | that search as the page shows it: its media type, filters and language (`/fr-fr/chercher/montagne/`, `/de-de/suche/berg/`…); `page=` is ignored (every page is read), `size=` too (Pexels ignores it, measured) |
| a photo or video page, `https://www.pexels.com/photo/<title>-<id>/` (the address you get by clicking a media) | that one media, read by its number (an old or wrong title in the address does not matter) |
| a profile `https://www.pexels.com/@name/` | every media of the profile (all pages; *Media type* chooses photos, videos or all) |
| a collection `https://www.pexels.com/collections/<name>-<id>/` | every media of the collection (photos and videos mixed; *Media type* chooses what is kept, the rest is counted) |
| **Media ids** (`1287145`) | that media (photo or video) |
| **Similar to media ids** | the media Pexels shows as similar to it, every page |

Search filters of the form (search words only; a pasted search keeps its own): orientation, color (hex code such as `F44336`, or a name such as `red`: a name Pexels does not know is ignored silently by the site, so the Actor checks it and refuses the search instead of delivering the unfiltered one), number and age of people, published since, minimum / maximum width and height (photos), minimum / maximum duration, frame rate and resolution (videos).

Rejected with the reason, nothing charged for them: the home page and the videos home page (curated feeds), Discover, Challenges, Leaderboard, other sites, a profile's `/videos/` page (it does not exist on Pexels).

### Output

One record per media and language. Unknown values are `null`, never invented. Example (a real record produced by the Actor from a Pexels photo page, with *Include details*):

```json
{
  "id": 8738528,
  "type": "photo",
  "locale": "en-US",
  "url": "https://www.pexels.com/photo/a-rocky-mountain-under-a-clear-sky-8738528/",
  "slug": "a-rocky-mountain-under-a-clear-sky",
  "title": "A Rocky Mountain under a Clear Sky",
  "description": "Beautiful twilight capture of a rocky mountain peak in Lombardy, Italy.",
  "alt": "Beautiful twilight capture of a rocky mountain peak in Lombardy, Italy.",
  "width": 5127,
  "height": 2884,
  "aspectRatio": 1.777739251040222,
  "orientation": "landscape",
  "mainColor": "#b48782",
  "colors": ["#000000", "#696969", "#a0522d", "#bc8f8f"],
  "license": "Pexels",
  "licenseUrl": "https://www.pexels.com/license/",
  "createdAt": "2021-07-13T19:57:09.000Z",
  "publishedAt": "2021-07-14T13:00:49.738Z",
  "updatedAt": "2025-07-02T01:07:50.000Z",
  "keywords": ["adventure", "alpenglow", "alps", "clear sky", "cloudless", "dusk", "earth tones", "elevation", "europe", "evening", "exploration", "geography", "hiking", "holiday", "italy", "landforms", "landscape", "lanzada", "launched", "lombardy", "majestic", "mountain", "natural beauty", "nature", "orange sky", "outdoors", "panorama", "peak", "photography", "picturesque", "pinnacle", "remote", "ridge", "rocky", "rocky mountain", "rugged", "scenery", "scenic", "serene", "sky", "snow", "summit", "sunset", "tranquil", "tranquility", "travel", "trekking", "twilight", "wilderness"],
  "imageUrl": "https://images.pexels.com/photos/8738528/pexels-photo-8738528.jpeg?cs=srgb&dl=pexels-marek-piwnicki-3907296-8738528.jpg&fm=jpg",
  "imageLarge": "https://images.pexels.com/photos/8738528/pexels-photo-8738528.jpeg?auto=compress&cs=tinysrgb&w=1440",
  "imageMedium": "https://images.pexels.com/photos/8738528/pexels-photo-8738528.jpeg?auto=compress&cs=tinysrgb&w=750",
  "imageSmall": "https://images.pexels.com/photos/8738528/pexels-photo-8738528.jpeg?auto=compress&cs=tinysrgb&h=130",
  "videoUrl": null,
  "videoPreviewUrl": null,
  "videoDownloadUrl": null,
  "videoFiles": null,
  "duration": null,
  "fps": null,
  "author": {
    "id": 3907296,
    "name": "Marek Piwnicki",
    "firstName": "Marek",
    "lastName": "Piwnicki",
    "username": null,
    "slug": "marek-piwnicki-3907296",
    "profileUrl": "https://www.pexels.com/@marek-piwnicki-3907296/",
    "location": "Gdynia / Poland",
    "avatarUrl": "https://images.pexels.com/users/avatars/3907296/marek-piwnicki-260.jpeg?auto=compress&fit=crop&h=256&w=256",
    "instagram": "marekpiwnicki",
    "twitter": null
  },
  "views": 127377,
  "downloads": 750,
  "likes": 5,
  "tags": ["Mountain Peak", "Mountain Summit", "Mountain Top", "Mountain", "Mountain Background", "Mountain 4k", "Mountain Drone Shot", "Mountain Cinematic", "4k Mountain Wallpaper", "Rocky Mountain", "Mountain Wallpaper", "Mountain Aesthetic", "Mountain Drone", "Peak", "Matterhorn"],
  "exif": {
    "camera": "Canon EOS 6D",
    "manufacturer": "Canon",
    "aperture": "5.0",
    "focalLength": "120.0",
    "iso": 800,
    "shutterSpeed": "0.003125",
    "software": "Adobe Photoshop Lightroom Classic 10.3 (Windows)",
    "photographedAt": "2020-10-12T07:41:47.000Z"
  },
  "location": "Lanzada, Lombardy, Italy",
  "fileSize": 11986599,
  "detailsStatus": "ok",
  "searchTerm": null,
  "sourceUrl": "https://www.pexels.com/photo/8738528/",
  "position": null,
  "scrapedAt": "2026-11-14T13:03:29+00:00"
}
```

Fields: `id`, `type` (photo / video), `locale`, `url`, `slug`, `title`, `description`, `alt`, `width`, `height`, `aspectRatio`, `orientation`, `mainColor`, `colors`, `license`, `licenseUrl`, `createdAt`, `publishedAt`, `updatedAt`, `keywords` (every keyword stored by Pexels), `imageUrl` (photos: the original file), `imageLarge`, `imageMedium`, `imageSmall` (videos: the thumbnail), `videoUrl`, `videoPreviewUrl`, `videoDownloadUrl` (redirects to the largest file), `videoFiles` (quality, width, height, fps, fileType, link), `duration`, `fps`, `author` (id, name, firstName, lastName, username, slug, profileUrl, location, avatarUrl, instagram, twitter), and with *Include details*: `views`, `downloads`, `likes` (live counters), `tags` (the tags shown on the page), `exif`, `location`, `fileSize`; `detailsStatus` (`ok`, `not_requested`, or `incomplete: …` when Pexels refused part of the details: those fields are then null and the media is still delivered); `searchTerm`, `sourceUrl` (the Pexels page of the input that gave the media; `null` for `mediaIds` and `similarTo`, which have no page of their own), `position` (rank as Pexels served the list), `scrapedAt`.

Pexels media are free to use under the [Pexels license](https://www.pexels.com/license/); crediting the author (`author.name`, `author.profileUrl`) is appreciated by Pexels.

### Run summary

The `OUTPUT` record (and the readable `SUMMARY` page) gives, in `pages`, one line per input (search × media type × filters × language, media, profile, collection, similar): `status` (`done`, `partial_collection`, `no_results`, `not_found`, `refused`, `stopped_at_limit`; and, if a run ends early, `not_processed` (not started), `interrupted` (cut while being read) or `internal_error`), `reason` (`site_window`, `slice_cap`, `slices_empty`, `slice_refused`, `refused_by_site`, `run_limit` (the run's timeout or its saved-progress size), `input_error`, `max_items` (your *Max media* or your maximum charge)), `siteTotal` and `totalAnnounced` (Pexels' announced count, the same number; `totalAnnounced` is `null` for a search refused for its input), `pagesRead`, `listed`, `seen` (media the list showed: `listed` plus those of another type, `filteredOut`), `delivered`, `duplicatesSkipped` (already delivered by an earlier input, delivered once), `filteredOut`, `slices` and `slicesAboveWindow` (deep search), `pagesFailed`, and a `detail` sentence. Checks list every warning. A search Pexels answers with nothing (filters that leave no media) is `no_results`; a refused access is never reported as "no results". **A run that delivers no media at all ends as FAILED** (useful for alerts and integrations), with the cause in its status message: nothing found, input refused (for example a colour name Pexels ignores, or a minimum above its maximum), or access refused by Pexels; the $0.005 start fee of that run is still paid, no media is charged.

### Pricing

Pay per event: **$0.001 per delivered media** ($1.00 per 1,000 media), details included when you ask for them, plus **$0.005 per run** (Apify's start fee, one per GB of memory: the default 1 GB is one start). Pages, slices, refusals, retries, duplicates and media Pexels does not have are never charged. Tier discounts of the Apify Store apply (Bronze -10 %, Silver -20 %, Gold to Diamond -30 %).

| Run | Price at the base rate (Free plan) |
|---|---|
| 20 media | $0.025 |
| 1,000 media | $1.005 |

Set a maximum charge per run in Apify: the Actor stops at it, the start fee counted, and says so (`maxChargeReached` in `OUTPUT`; checked on Apify on 14 November 2026: the run stopped at the last media its maximum could pay, the start fee included).

### Known limits

- Pexels' API is the site's own (the one its pages call); the Actor reads the public access key the site serves to every visitor at the start of each run. If Pexels changes it during the run, the Actor reads it again, once per run (requests in flight at that moment wait for the new key and are sent again with it), and stops and says so only if Pexels refuses the new key too (never "no results"). That start page is read through Apify's datacenter proxy; about one fresh datacenter session in five gets a Cloudflare challenge on it (measured on 14 November 2026), so the Actor takes another session at once, up to 3 times (`bootstrapNewSessions` in `OUTPUT`, not a refusal: no media is read on that page); then the usual rule applies (pause, refusal counted and reported, next access level).
- One search shows at most 480 results; past that, the deep search depends on the site's filters: a slice that still shows more than 480 at the finest split (1 pixel of width and height) is read on its first 480 and the search is `partial_collection`. The splitting stops at 200 slices per search, or after 5 splits in a row where Pexels answers every half like the wider slice (filter ignored): said in the summary.
- The deep search was measured on Pexels' filters (each slice has its own window, a slice under 480 is read whole); the edge slices below and above the site's sliders (width under 1,080 or over 20,000 px, duration under 5 or over 120 s) have no slider on the site: the width ones were accepted by Pexels on 14 November 2026 (a real 4,890-photo split), the duration ones are not measured yet; if Pexels refuses one, the search is `partial_collection` with `slice_refused`.
- Views, downloads and likes are live counters: they move between two readings.
- In a translated language (any `language` but en-US, or a pasted `/fr-fr/…` address), Pexels' lists serve fewer keywords than its media pages (measured on 14 November 2026: 8 of 20 French and 17 of 20 German media), so the Actor reads the complete keywords media by media (one more request per translated media; `keywordsFromBulk` in `OUTPUT`); a media Pexels does not serve that way keeps the list's keywords, counted in `keywordsFromList` and reported. English lists already carry all of them.
- Not delivered: the curated home feed (its next pages are not served to visitors), image sizes the site does not serve (only original, large, medium, small), the author's donation e-mail, moderation scores.
- Speed measured on Apify on 14 November 2026: 1,000 photos in about 1 minute, 1,000 photos with Include details in about 5 minutes, 10,000 videos in about 11 minutes, a 4,890-photo deep search in 6 minutes. A translated language adds one request per media (complete keywords).

### Support

Questions, a search that does not give what you expect, a field you need: open an issue on the Actor's page, with the run link. This Actor is not affiliated with, endorsed by or sponsored by Pexels or Canva; it reads public pages and data that Pexels shows to any visitor without an account. Respect the Pexels license and the rights of the people shown in the media.

# Actor input Schema

## `searchTerms` (type: `array`):

Each word or phrase is one Pexels search (e.g. mountain, coffee shop, business meeting), for the media type below, with the filters below. Pexels searches by meaning: any word gives results.

## `mediaType` (type: `string`):

photos (default), videos, or all (one photo search AND one video search per word, each with its own results). Also chooses what is kept from a pasted profile or collection.

## `startUrls` (type: `array`):

Addresses as in your browser: a search (https://www.pexels.com/search/mountain/, /search/videos/ocean/, with the site's filters such as ?orientation=landscape\&color=blue, or a language prefix such as /fr-fr/chercher/montagne/), a photo or video page (the address you get by clicking a media), a profile (/@name/) or a collection (/collections/name-id/). The address is read as the page shows it: its language, media type and filters. Home, Discover, Challenges and other pages without a media list are rejected with the reason.

## `mediaIds` (type: `array`):

Pexels media numbers (photos or videos, e.g. 1287145, the number at the end of a media address): one record each. An id Pexels does not have is said in the Run summary (not_found), nothing charged for it.

## `similarTo` (type: `array`):

For each media number, the media Pexels shows as similar (More like this), every page of them.

## `language` (type: `string`):

The language of titles, page addresses and of the search itself for search words and ids (default en-US). A pasted address keeps its own language prefix.

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

Search filter (search words only): landscape, portrait or square. Empty: all.

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

Search filter: a 6-digit hex code (e.g. F44336 or #f44336; the site's swatches are hex codes) or a colour name (e.g. red). A name Pexels does not know is ignored silently by the site: the actor checks it and refuses the search if Pexels ignores it.

## `peopleCount` (type: `string`):

Search filter: 0, 1, 2 or 3 and more people.

## `peopleAge` (type: `string`):

Search filter: age group of the people shown.

## `dateFrom` (type: `string`):

Search filter: last 24 hours, week, month or year.

## `minWidth` (type: `integer`):

Search filter for photos: minimum width in pixels (e.g. 1920).

## `maxWidth` (type: `integer`):

Search filter for photos: maximum width in pixels.

## `minHeight` (type: `integer`):

Search filter for photos: minimum height in pixels.

## `maxHeight` (type: `integer`):

Search filter for photos: maximum height in pixels.

## `minDuration` (type: `integer`):

Search filter for videos: minimum duration in seconds.

## `maxDuration` (type: `integer`):

Search filter for videos: maximum duration in seconds.

## `frameRate` (type: `string`):

Search filter for videos: frames per second.

## `resolution` (type: `string`):

Search filter for videos: 1080p, 4K or 8K.

## `includeDetails` (type: `boolean`):

Also read, for each media: views, downloads and likes, the 15 tags shown on its page and, for photos, EXIF (camera, lens settings, date taken), location and file size. 2 to 3 more small requests per media, same price per media. Off: those fields are null and detailsStatus is not_requested.

## `deepSearch` (type: `boolean`):

Pexels shows at most 480 results for one search. On (default): when a search reaches that window and Pexels announces more, the actor splits it with the site's own filters (orientation, then width or duration ranges) and reads each slice, without duplicates, until your Max media limit. Off: 480 at most per search, said in the Run summary.

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

Stop after this many media in the whole run (0 = no limit).

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

No proxy (default): the actor uses what works, measured: Pexels' API without a proxy, Apify datacenter proxy for the page that gives the site's public access key, residential US only if refused. If you choose a proxy, it is used for every request.

## Actor input object example

```json
{
  "searchTerms": [
    "mountain"
  ],
  "startUrls": [],
  "mediaIds": [],
  "similarTo": [],
  "includeDetails": false,
  "deepSearch": true,
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `media` (type: `string`):

All media records, one per media and language, with every field.

## `mediaOverview` (type: `string`):

Id, type, title, page, download link, size, author, license.

## `summary` (type: `string`):

Readable per-input summary: status, media listed vs the site's total, reason for anything not delivered.

## `summaryJson` (type: `string`):

The same summary as JSON (OUTPUT record).

# 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 = {
    "searchTerms": [
        "mountain"
    ],
    "startUrls": [],
    "mediaIds": [],
    "similarTo": [],
    "maxItems": 100,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("hexagone-data/pexels-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 = {
    "searchTerms": ["mountain"],
    "startUrls": [],
    "mediaIds": [],
    "similarTo": [],
    "maxItems": 100,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("hexagone-data/pexels-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 '{
  "searchTerms": [
    "mountain"
  ],
  "startUrls": [],
  "mediaIds": [],
  "similarTo": [],
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call hexagone-data/pexels-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hexagone-data/pexels-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/c9rs6oBghNZpb4eo7/builds/WBRXg13UJKINmpt1w/openapi.json
