# Pexels Scraper - Photos, Videos, Stats & Creators (`topapi/pexels-scraper`) Actor

Scrape Pexels photos and videos by search, link, id, creator or collection: every image size and video file, tags, colors, creator, views, downloads, likes, camera EXIF. Creator rows add-on, monitor mode. No API key, no login. $0.90 per 1,000.

- **URL**: https://apify.com/topapi/pexels-scraper.md
- **Developed by:** [Top Api](https://apify.com/topapi) (community)
- **Categories:** Videos, AI, Developer tools
- **Features:** Limited permissions
- **Stats:** 28 total users, 4 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.90 / 1,000 photo or videos

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

### What does Pexels Scraper do?

**Pexels Scraper** extracts free stock photos and videos from [Pexels](https://www.pexels.com) with all their data. Give it search terms, Pexels links, photo or video ids, creator profiles or collections, and every photo or video comes back as one row: title, description, tags, size, colors, the original file and every image size or every video file, the creator with their socials, publish dates, and views, downloads, likes and camera data.

Also known as: Pexels API · Pexels image scraper · Pexels video downloader links · stock photo scraper · Pexels photographer scraper

- **Every way into Pexels**: keyword search, search links with their filters, photo and video pages, creator profiles, collections (every item, not just the first page), "more like this" and Pexels' curated feed. Mix them in one run.
- **Every Pexels search filter**: orientation, size, color, number and age of people, minimum and maximum width and height, video length, frame rate, 1080p / 4K / 8K, and upload date (last 24 hours, week, month, year).
- **Download links at every size**: the original file plus large, medium, small, portrait, landscape and tiny sizes for photos; every MP4 rendition with its width, height and fps for videos.
- **Stats and camera data in every row**: views, downloads, likes, camera, lens settings, file size, place and content-safety ratings, at no extra cost.
- **Creator rows add-on**: one row per creator with bio, location, Instagram, Twitter, YouTube, TikTok, website, followers and all-time views and downloads.
- **Monitor mode**: scheduled runs return only photos and videos you have not received before.
- **No API key, no login**: nothing to sign up for at Pexels.

### What data can you get from Pexels?

<table>
<tr><td>🖼️ Title, description, alt text</td><td>🏷️ Tags (`tags`)</td><td>📐 Width, height, aspect ratio, orientation</td></tr>
<tr><td>🎨 Average color + palette (`mainColor`, `colors`)</td><td>⬇️ Original file + download link</td><td>🗂️ 8 image sizes (`imageSizes`)</td></tr>
<tr><td>🎬 Video files at every quality (`videoFiles`)</td><td>⏱️ Duration, fps, thumbnails</td><td>🏆 Highest-quality video link</td></tr>
<tr><td>👤 Creator name, id, handle, profile link</td><td>📍 Creator location, avatar</td><td>📱 Creator Instagram, Twitter</td></tr>
<tr><td>👁️ Views, downloads, likes</td><td>💬 Reactions (emotional, technical, stylistic)</td><td>⭐ Featured flag, Hero badge</td></tr>
<tr><td>📷 Camera, maker, aperture, focal length, ISO, shutter</td><td>💾 File size, taken-at date</td><td>🗺️ Place + Google place id</td></tr>
<tr><td>🛡️ Content-safety ratings</td><td>📅 Uploaded, published, updated dates</td><td>🔎 Search term, rank, input that found it</td></tr>
</table>

Measured on a 1,000-photo run (searches "nature", "city", "food", 2026-10-28): id, link, title, description, tags, width, height, colors, original file, all image sizes, download link, creator, views, downloads, likes, reactions, publish date and file size were filled on 1,000 of 1,000 rows; content-safety ratings on 96%; camera, maker and taken-at date on 68%; aperture, focal length and ISO on 66-67%; shutter speed on 62%; place on 51%; creator Instagram on 80%, creator location on 63%. Camera data is only there when the creator kept it in the file. A 100-video run filled duration, fps, every video file, the highest-quality link, thumbnails, tags, views, downloads and likes on 100 of 100 rows.

### How to scrape Pexels with Pexels Scraper

1. [Create a free Apify account](https://console.apify.com/sign-up). It comes with $5 of monthly credit and no card is needed.
2. Open **Pexels Scraper** and click **Try for free**.
3. Type search terms into **Search terms** (e.g. `coffee`), or paste Pexels links, ids, creator handles or collections.
4. Pick **Photos**, **Videos** or both, set the filters you need and **Max photos and videos**.
5. Click **Start**. Rows appear in the dataset as they are read: 1,000 photos with stats and camera data took 59 seconds on our test run.
6. Open the **Storage** tab and **Export** as JSON, CSV or Excel, or connect a schedule.

### ⬇️ Input

| Parameter | Type | Description |
|---|---|---|
| **🔍 What to scrape** | | Use any mix. Empty = a 10-photo sample search. |
| `searchQueries` | List | Search terms, e.g. `coffee`, `mountain lake`. |
| `startUrls` | List | Pexels links: a search page with its filters (`/search/coffee/?orientation=landscape`), a video search (`/search/videos/ocean/`), photo or video pages, creator profiles (`/@username/`), collections (`/collections/name-id/`), `images.pexels.com` file links. |
| `mediaIds` | List | Photo or video ids, e.g. `27860686`. |
| `usernames` | List | Creator handles or profile links; returns their uploads. |
| `collections` | List | Collection links, slugs or ids, e.g. `bw7dkse`. |
| `similarTo` | List | Ids or links; returns Pexels' "More like this" media for each. |
| `curated` | Boolean | Also read Pexels' curated feed. Default `false`. |
| `mediaType` | Select | `photos`, `videos` or `all`. Default `photos`. |
| `maxItems` | Integer | Photos and videos in total. Default `100`. |
| `maxResultsPerSearch` | Integer | Per search term, link, creator or collection. |
| **🎯 Search filters** | | Pexels' own filters, sent with every search term. |
| `orientation` | Select | `landscape`, `portrait`, `square`. |
| `size` | Select | `large` (24 MP / 4K), `medium` (12 MP / Full HD), `small` (4 MP / HD). |
| `color` | Text | A color name (`red`, `blue`, `teal`...) or a hex code (`#2196F3`). Photos. |
| `peopleCount` | Select | `0`, `1`, `2`, `3_plus`. |
| `peopleAge` | Select | `baby`, `child`, `teenager`, `adult`, `senior_adult`. |
| `uploadedWithin` | Select | `last_24_hours`, `last_week`, `last_month`, `last_year`. |
| `minWidth`, `maxWidth`, `minHeight`, `maxHeight` | Integer | Pixels, photos. |
| `minDuration`, `maxDuration` | Integer | Seconds, videos (Pexels' filter runs from 5 to 120). |
| `frameRate` | Select | `24`, `25`, `30`, `50`, `60_plus`. Videos. |
| `resolution` | Select | `1080p`, `4K`, `8K`. Videos. |
| `locale` | Select | The language search terms are read in, e.g. `de-DE`. Default `en-US`. |
| `creatorSort` | Select | Creator uploads `recent` or `popular` first. |
| **✂️ Refine results** | | Filtered rows are not charged. |
| `publishedAfter` | Date | Only media Pexels published on or after this date. |
| `dedupe` | Boolean | One row per photo across all inputs. Default `true`. |
| **➕ Extra data** | | |
| `includeDetails` | Boolean | Views, downloads, likes, camera data, file size, place, content safety. Default `true`, same price. |
| `includeCreators` | Boolean | Creator rows, charged per creator. Default `false`. |
| **🔁 Monitoring** | | |
| `monitorMode` | Boolean | Only media not delivered in an earlier monitor run. Default `false`. |
| `monitorStoreName` | Text | Memory between runs. Default `pexels-monitor`. |
| `resetMonitor` | Boolean | Start the memory from scratch. |
| **⚙️ Advanced** | | |
| `apiKey` | Text | Optional: your own free Pexels API key, used only if Pexels refuses the website route (fewer fields). |
| `webClientId` | Text | Rarely needed: the public client id Pexels' own page uses. The actor re-reads it when Pexels changes it. |
| `maxConcurrency` | Integer | Parallel requests. Default `8`. |
| `proxyConfiguration` | Proxy | Not needed. The actor reads Pexels from Apify's network and moves to a datacenter, then a residential proxy, only if Pexels refuses it. |

Field names from other Pexels actors work too (`searchQuery`, `query`, `photoIds`, `username`, `collectionSlug`, `mode: "curated"`, `mode: "similarPhotos"`, `url`, `searchUrl`, `maxResults`, `secretKey`), so a saved task can be switched by copy-paste.

#### Input JSON

```json
{
  "searchQueries": ["coffee", "remote work"],
  "mediaType": "photos",
  "orientation": "landscape",
  "size": "large",
  "uploadedWithin": "last_month",
  "maxItems": 200,
  "includeCreators": true
}
```

#### Paste a search link to keep its filters

Filter a search on pexels.com, then paste the address into **Pexels links**: orientation, size, color, people, dates, width, duration, frame rate and resolution in the link are kept. **Do:** `https://www.pexels.com/search/videos/ocean/?resolution_name=4K&min_duration=30` · **Don't:** type `ocean 4k` as a search term (that searches for the words).

#### More than ~500 results for one term

Pexels serves about 480 results per search (20 pages of 24), even when it says 10,000 match. To go deeper, run the same term with different filters (orientation, size, upload date, people) or split it into narrower terms; duplicates across them are removed.

### ⬆️ Output

Each photo or video becomes one item. Real photo row from a run (search "nature", trimmed):

```json
{
  "type": "photo",
  "id": "40016974",
  "url": "https://www.pexels.com/photo/waterbuck-grazing-in-cantabria-park-40016974/",
  "title": "Waterbuck Grazing in Cantabria Park",
  "description": "Close-up of a waterbuck grazing in Cabárceno, Cantabria, Spain's scenic parkland.",
  "width": 1996,
  "height": 3000,
  "orientation": "portrait",
  "tags": ["Animal Pictures", "Animal Behavior", "Animal Closeup", "..."],
  "mainColor": "#84741d",
  "colors": ["#411e07", "#94aa35", "#9f5d14"],
  "imageOriginal": "https://images.pexels.com/photos/40016974/pexels-photo-40016974.jpeg",
  "imageLarge": "https://images.pexels.com/photos/40016974/pexels-photo-40016974.jpeg?auto=compress&cs=tinysrgb&w=1440",
  "downloadUrl": "https://images.pexels.com/photos/40016974/pexels-photo-40016974.jpeg?cs=srgb&dl=pexels-liane-ferreira-1033991071-40016974.jpg&fm=jpg",
  "photographer": "Liane Ferreira",
  "photographerUrl": "https://www.pexels.com/@liane-ferreira-1033991071/",
  "photographerLocation": "Braga, Portugal",
  "photographerInstagram": "lianefotografia",
  "photographerIsHero": true,
  "views": 176247,
  "downloads": 2338,
  "likes": 4,
  "publishedAt": "2026-10-04T10:00:33.016Z",
  "fileSize": 3508470,
  "camera": "Canon EOS RP",
  "aperture": 4,
  "focalLength": 210,
  "iso": 160,
  "shutterSpeed": "1/160s",
  "location": "La Penilla, Cantabria, Espanha",
  "contentSafety": { "adult": "very_unlikely", "racy": "very_unlikely", "violence": "unlikely", "medical": "very_unlikely", "spoof": "very_unlikely" },
  "foundBy": "search",
  "searchQuery": "nature",
  "position": 2
}
```

A video row (search "ocean", trimmed) carries the files instead of image sizes:

```json
{
  "type": "video",
  "id": "25961000",
  "url": "https://www.pexels.com/video/a-boat-is-in-the-water-with-a-person-on-it-25961000/",
  "width": 2160,
  "height": 3840,
  "duration": 2,
  "fps": 60,
  "videoFiles": [
    { "width": 360, "height": 640, "fps": 60, "fileType": "video/mp4", "link": "https://videos.pexels.com/video-files/25961000/11924316_360_640_60fps.mp4", "downloadLink": "https://www.pexels.com/download/video/25961000/?fps=60.0&h=640&w=360" },
    "..."
  ],
  "highestQualityUrl": "https://videos.pexels.com/video-files/25961000/11924321_2160_3840_60fps.mp4",
  "views": 1431484,
  "downloads": 4006,
  "likes": 25
}
```

With **Creator rows** on, each creator found becomes one `creator` item (search "portrait", trimmed):

```json
{
  "type": "creator",
  "id": "2153436981",
  "name": "Pete Miller Portraits",
  "username": "PeteMiller",
  "url": "https://www.pexels.com/@PeteMiller/",
  "location": "Chiang Mai, Thailand",
  "instagram": "asia_focuss",
  "website": "https://www.petemiller.com/",
  "followers": 85,
  "views": 5646336,
  "downloads": 15526,
  "mediaCount": 1074,
  "photosCount": 911,
  "videosCount": 163,
  "firstUploadedOn": "2025-10-29",
  "lastUploadedAt": "2026-08-07T07:24:58.000Z",
  "isHero": true
}
```

On a 100-photo run with creator rows (search "portrait"), 70 creators came back: name, profile link, followers, all-time views, downloads and likes, photo and video counts and first upload were filled on 70 of 70; Instagram on 81%, bio on 77%, location on 69%, website on 44%, YouTube on 16%.

#### Fields

The dataset's **Photos and videos**, **Files and sizes**, **Stats and camera data** and **Creators** views group the fields. Video rows leave photo-only fields (image sizes, colors, camera data) empty; photo rows leave the video fields empty. Pexels' detail answer also lists latitude and longitude, but they were empty on all 1,150 photos read, so they are not in the rows.

### How can I use Pexels data?

- **Content and design teams**: build an on-brand image library by color, orientation and size, with download links ready.
- **Video editors and faceless channels**: pull 4K, 60 fps or vertical clips of a theme with every rendition.
- **AI and ML datasets**: tags, descriptions, alt text and colors for image-text pairs, at scale.
- **Trend research**: see which images get the most views and downloads for a topic, and what was uploaded this week.
- **Creator outreach**: find active photographers and videographers with their socials, websites and audience.

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

Pexels Scraper charges **$0.90 per 1,000 photos or videos** ($0.0009 each), with views, downloads, likes and camera data included. Creator rows are $0.0009 each. There is no start fee and no monthly rent. Filtered rows, duplicates, ids Pexels does not serve and media already seen in monitor mode are not charged.

| Run | Rows | Charge |
|---|---|---|
| 20 photos (the prefill) | 20 | $0.018 |
| 100 photos | 100 | $0.09 |
| 1,000 photos | 1,000 | $0.90 |
| 100 photos + their 70 creators | 170 | $0.153 |

Platform usage is included in the price. Set a **maximum charge** on the run to cap the cost: the actor stops at it.

### Integrations, API, scheduling & MCP

Pexels Scraper works with the [Apify API](https://docs.apify.com/api/v2), the Apify Python and JavaScript clients, [Make](https://apify.com/integrations/make), [Zapier](https://apify.com/integrations/zapier), [n8n](https://apify.com/integrations/n8n), Google Sheets, webhooks and the [Apify MCP server](https://mcp.apify.com) for AI agents.

#### Run it on a schedule

Turn on **Only new media (monitor)**, give the watch list a **Monitor memory name**, and add an [Apify schedule](https://docs.apify.com/platform/schedules) (e.g. daily). Each run returns only photos and videos not delivered before (`monitorStatus: "new"`); a run with nothing new returns 0 rows and costs nothing in charges. Media delivered with **Views, downloads, likes and camera data** (`includeDetails`) off come back once with the details and stats when a later run turns it on (`monitorStatus: "details"`), charged like any delivered photo or video. Example: a creator's new uploads every morning.

```json
{
  "usernames": ["ekaterina-bolovtsova"],
  "creatorSort": "recent",
  "maxResultsPerSearch": 48,
  "monitorMode": true,
  "monitorStoreName": "watch-ekaterina"
}
```

### Limits & empty runs

- Pexels serves about 480 results per search term; split by filters for more (see above).
- The color filter is Pexels' own: it ranks matching photos first and is strict on some terms and loose on others.
- Camera data, place and file size come with photos only; Pexels has no camera data for videos.
- An id Pexels no longer serves is listed in the run summary and not charged.
- If Pexels refuses every request, the run ends **FAILED** with the reason and charges nothing. A run that matches nothing ends with a status that says what to change.

### FAQ

#### How many photos can Pexels Scraper collect in one run?

As many as your inputs reach: about 480 per search term, every item of a collection, a creator's whole portfolio. 1,000 photos with stats and camera data took 59 seconds on our test run.

#### Can Pexels Scraper get videos?

Yes. Set **Media type** to `videos` or `all`. Each video row has its duration, fps, thumbnails and every MP4 file with its size and download link.

#### Does Pexels Scraper download the files?

It returns direct links to the original file and every size or rendition. Pipe `imageOriginal`, `downloadUrl` or `highestQualityUrl` into your own downloader or storage.

#### Can I get views and downloads of Pexels photos?

Yes. With **Views, downloads, likes and camera data** on (the default), every row has them at no extra cost.

#### Can Pexels Scraper scrape a photographer's profile?

Yes. Add the handle or profile link to **Creators** for their uploads, newest or most popular first, and turn on **Creator rows** for the profile itself.

#### Do I need a Pexels account or API key?

No. Pexels Scraper reads Pexels the way its own website does. You can add your own free Pexels API key as a fallback, but it is not needed.

#### Can I use Pexels Scraper with the Apify API or an MCP server?

Yes. Call it from the API, the Python or JavaScript client, or connect the Apify MCP server to Claude, ChatGPT or Cursor and ask for Pexels photos in plain words.

#### Why did my Pexels Scraper run return no results?

Check the status message: it says whether the input matched nothing (a typo in a handle or collection), whether everything was filtered out by **Published after**, or whether monitor mode found nothing new.

#### Your feedback

Found a bug or need a field? Open an issue in the **Issues** tab and we will look at it.

# Actor input Schema

## `searchQueries` (type: `array`):

Words to search Pexels for, one per line, as typed in the Pexels search bar, e.g. "coffee", "mountain lake", "remote work". Each term is its own search (24 results a page, up to about 500 per search).

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

Any Pexels link: a search page with its filters (https://www.pexels.com/search/coffee/?orientation=landscape), a video search (/search/videos/ocean/), a photo or video page, a creator profile (/@username/), a collection (/collections/name-id/) or an images.pexels.com file link.

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

Pexels photo or video ids (the number at the end of a Pexels link), one per line, e.g. 27860686. Read 24 at a time.

## `usernames` (type: `array`):

Creator handles or profile links, one per line, e.g. "ekaterina-bolovtsova" or https://www.pexels.com/@ekaterina-bolovtsova/. Returns that creator's uploads.

## `collections` (type: `array`):

Collection links, slugs or ids, one per line, e.g. https://www.pexels.com/collections/aquatic-aesthetic-bw7dkse/ or bw7dkse. Every item of the collection is read.

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

Photo or video ids or links; returns the media Pexels shows as similar to each one ("More like this").

## `curated` (type: `boolean`):

Also read Pexels' curated discover feed (the home page feed), newest first.

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

Photos, videos or both. Applies to search terms, creators, collections, similar media and the curated feed. "All" runs each search twice (photos, then videos).

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

Stop the run after this many photos and videos in total (each is one charged row). Creator rows do not count here.

## `maxResultsPerSearch` (type: `integer`):

Stop each search term, link, creator or collection after this many rows. Empty = no limit per input. In monitor mode, the window checked each run.

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

Pexels' orientation filter. Applies to search terms.

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

Large = 24 MP photos or 4K video, medium = 12 MP or Full HD, small = 4 MP or HD.

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

A color name (red, pink, violet, indigo, blue, turquoise, teal, green, lime, yellow, orange, brown, gray, black, white) or a hex code such as #2196F3.

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

How many people appear in the photo or video.

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

Age group of the people shown.

## `uploadedWithin` (type: `string`):

Only media uploaded in this window (Pexels' upload-date filter).

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

Only photos at least this wide, e.g. 3840.

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

Only photos at most this wide.

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

Only photos at least this tall.

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

Only photos at most this tall.

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

Only videos at least this long, in seconds (Pexels' filter works from 5 to 120).

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

Only videos at most this long, in seconds.

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

Only videos at this frame rate.

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

Only videos available in this resolution.

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

The Pexels language the search terms are read in (e.g. de-DE for "kaffee").

## `creatorSort` (type: `string`):

For creators: their newest uploads first, or their most popular.

## `publishedAfter` (type: `string`):

Keep only media Pexels published on or after this date (checked before any charge), e.g. 2026-10-01.

## `dedupe` (type: `boolean`):

One row per photo or video across all inputs. Off = a photo found by two inputs is one row per input.

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

Adds views, downloads and likes, and for photos the camera, lens settings (aperture, focal length, ISO, shutter speed), file size, place and content-safety ratings. Same price per row.

## `includeCreators` (type: `boolean`):

Adds one row per creator found: profile, bio, location, Instagram, Twitter, YouTube, TikTok, website, followers, all-time views, downloads and likes, number of photos and videos, first and last upload. Charged per creator row.

## `monitorMode` (type: `boolean`):

Return only photos and videos not delivered in an earlier monitor run. Run it on a schedule to collect new uploads for a search, creator or collection.

## `monitorStoreName` (type: `string`):

The named storage that remembers what was already delivered. Use one name per watch list.

## `resetMonitor` (type: `boolean`):

Start the monitor memory from scratch in this run.

## `apiKey` (type: `string`):

Your own free Pexels API key (pexels.com/api). Not needed: it is used only if Pexels refuses the website route, for searches, ids, collections and the curated feed (fewer fields: no tags, stats or camera data).

## `webClientId` (type: `string`):

The actor reads Pexels with the public client id Pexels' own page uses, and re-reads it if Pexels changes it. Only set this if runs stop returning rows.

## `maxConcurrency` (type: `integer`):

How many Pexels requests run at once.

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

The actor reads Pexels from Apify's own network first and moves to an Apify datacenter, then a residential proxy, only if Pexels refuses it. Switch Apify Proxy off to never use a proxy, or give your own proxy URLs.

## Actor input object example

```json
{
  "searchQueries": [
    "coffee"
  ],
  "curated": false,
  "mediaType": "photos",
  "maxItems": 20,
  "orientation": "all",
  "size": "all",
  "peopleCount": "all",
  "peopleAge": "all",
  "uploadedWithin": "all",
  "frameRate": "all",
  "resolution": "all",
  "locale": "en-US",
  "creatorSort": "recent",
  "dedupe": true,
  "includeDetails": true,
  "includeCreators": false,
  "monitorMode": false,
  "monitorStoreName": "pexels-monitor",
  "resetMonitor": false,
  "maxConcurrency": 8,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

One item per Pexels photo (type "photo"), video ("video") or creator ("creator", add-on).

# 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 = {
    "searchQueries": [
        "coffee"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("topapi/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 = {
    "searchQueries": ["coffee"],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("topapi/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 '{
  "searchQueries": [
    "coffee"
  ],
  "maxItems": 20
}' |
apify call topapi/pexels-scraper --silent --output-dataset

```

## MCP server setup

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