Pexels stock media scraper in n8n
Scrape free stock photos and videos from Pexels. Search by keyword, browse curated/popular media, a photographer's portfolio, or a curated collection. Get direct image and video file URLs, photographer credit, tags, colors, and more.
What this workflow does
Import it and n8n runs the Pexels Stock Media Scraper Actor on Apify every day at 08:00 with the starter input below. Each row comes back with photo id, video id, title, photographer name and 9 more; repeats with the same videoId are dropped. A Google Sheets append is included and stays off until you add your sheet. The only credential it needs is your Apify API token.
Read from the workflow file, built for Pexels Stock Media Scraper version 1.0.2. Updated 2026-11-14.How the rows travel
6 nodes, in the order n8n runs them. The yellow stop is the call to the Apify Actor; the dashed stop is optional.
- Daily trigger Schedule trigger
- Configure input Code
- Run Apify Actor HTTP Request
- Normalize + dedupe Code
- Rows ready No operation
- Google Sheets (optional) Google Sheets, off until you switch it on
From the Short
This workflow is the one the video points to: the number in each video opens this page.
Input
The Configure input node holds the starter input. Change it there; every setting the Actor accepts is listed below.
{
"searchQueries": [
"nature"
],
"mediaIds": [
"18872916"
],
"username": "alex-ivanov-773258579",
"collectionSlug": "aquatic-aesthetic-bw7dkse",
"maxItems": 25,
"mode": "search"
} | Setting | Type | Required | Default | What it does |
|---|---|---|---|---|
| mode | string | Yes | search | What to fetch from Pexels. Use Search by keyword for discovery, Look up media by ID/URL for exact assets, Photographer portfolio or Collection for a catalog, Similar media for… 7 choices. |
| searchQueries | array | No | – | One or more keywords for mode=search, one per line. Each query is searched separately and duplicates are removed. Example: nature, city skyline, coffee. |
| mediaType | string | No | photos | Photos, videos, or both. all searches photos and videos and merges the results. Exact ID/URL lookups return the requested media type regardless of this setting. One of: photos, videos, all. |
| startUrls | array | No | – | Pexels search, photo, video, photographer, collection, image-file, or video-file URLs for mode=byUrl. Search URLs keep their orientation, size, color, people, and page filters. |
| orientation | string | No | all | Filter by media orientation. Applies to search, profile, and collection modes. One of: all, landscape, portrait, square. |
| size | string | No | all | Pexels minimum-size filter. Photos: large is 24 MP, medium is 12 MP, small is 4 MP. Videos: large is 4K, medium is Full HD, small is HD. One of: all, large, medium, small. |
| color | string | No | all | Filter photos by dominant color. Use Color hex instead for an exact hex value. Photos only. 13 choices. |
| colorHex | string | No | – | Optional hex color such as #2563eb or #fff. Overrides the Color dropdown when set. Photos only. |
| peopleCount | string | No | all | Filter by how many people appear in the media. Applies to photos and videos. One of: all, 0, 1, 2. |
| peopleAge | string | No | all | Filter by the age of people in the media. Applies to photos and videos. One of: all, baby, child, teenager, adult. |
| locale | string | No | en-US | Pexels locale for titles, descriptions, and search results. Search terms are used as typed. 28 choices. |
| minWidth | integer | No | 0 | Only return media at least this wide. 0 disables the filter. Enforced on each returned record. |
| minHeight | integer | No | 0 | Only return media at least this tall. 0 disables the filter. Enforced on each returned record. |
| minFps | integer | No | 0 | Only return videos with at least this many frames per second (for example 60). 0 disables the filter. Photos always pass. |
| minDuration | integer | No | 0 | Only return videos at least this many seconds long. 0 disables the filter. |
| maxDuration | integer | No | 0 | Only return videos at most this many seconds long. 0 disables the filter. |
| publishedAfter | string | No | – | Optional YYYY-MM-DD date. Only return media published on or after this date. Applied to the records returned by the current search/all listing. |
| publishedBefore | string | No | – | Optional YYYY-MM-DD date. Only return media published on or before this date. Applied to the records returned by the current search/all listing. |
| mediaIds | array | No | – | Pexels photo or video IDs, or full photo/video/image-file URLs. Used by Look up media by ID/URL and Similar media modes. |
| username | string | No | – | Pexels photographer handle, ID, or profile URL for mode=byUser. Example: alex-ivanov-773258579 or https://www.pexels.com/@alex-ivanov-773258579/. |
| collectionSlug | string | No | – | Pexels collection slug or full collection URL for mode=byCollection. Example: aquatic-aesthetic-bw7dkse. |
| maxItems | integer | No | 30 | Maximum number of media records to return across all queries, IDs, and URLs. Pexels search serves at most about 480 records per query (20 pages of 24); a single search query… |
| includeDetails | boolean | No | false | Open each media's detail page to add views, downloads, likes, camera/EXIF data, and the photographer's full profile. Adds one request per item and can be slow on large runs. |
| dedupe | boolean | No | true | Keep only the first occurrence of each photo or video across queries, IDs, and URLs. |
| proxyConfiguration | object | No | {"useApifyProxy":false} | Optional Apify proxy override. The actor works directly without a proxy and escalates automatically only if Pexels blocks the run. |
What each row holds
Every field the Actor returns stays in the row (13 in its dataset schema). Normalize + dedupe trims text, drops empty fields, removes repeats with the same videoId and adds _source and _scrapedAt. The main fields:
| Field | What it is |
|---|---|
| photoId | Photo Id |
| videoId | Video Id |
| title | Title |
| photographerName | Photographer Name |
| width | Width |
| height | Height |
| orientation | Orientation |
| durationSeconds | Duration Seconds |
| license | License |
| attribution | Attribution |
| downloadUrl | Download Url |
| pageUrl | Page Url |
What the first run costs
With the starter input (maxItems = 25) a first run costs about $0.12 on the Apify Free plan: $0.10 to start the run at 1 GB of memory and $0.02 for the results, plus platform usage.
The Actor lists $0.99 per 1,000 results; its catalogue page breaks the price down by Apify plan. The Apify Free plan includes $5 of usage a month.
The Actor behind it
Pexels Stock Media Scraper: Scrape free stock photos and videos from Pexels. Search by keyword, browse curated/popular media, a photographer's portfolio, or a curated collection. Get direct image and video file URLs, photographer credit, tags, colors, and more.
The same job from an AI agent
The matching agent skill gives Claude Code, Codex, Cursor and other agents the same Actor, input and fields. Install it in one line:
npx skills add https://scraperfinder.com --skill pexels-stock-media-scraper The pexels stock media scraper skill, with manual install and run steps
Questions people ask
How do I import this workflow into n8n?
Copy https://scraperfinder.com/n8n/pexels-stock-media-scraper.json. In n8n, open a new workflow, click the three-dot menu, choose Import from URL and paste it. Or download the JSON file and use Import from File; both give the same 6 nodes.
Do I need an Apify account?
Yes. The workflow calls the Pexels Stock Media Scraper Actor through the Apify API with your own token, and each run is billed to your Apify account. The Free plan includes $5 of usage a month.
What does a run cost?
With the starter input (maxItems = 25) a first run costs about $0.12 on the Apify Free plan: $0.10 to start the run at 1 GB of memory and $0.02 for the results, plus platform usage. The Actor's Store page shows the current price.
Can I change what it collects?
Yes: edit the input object in the Configure input node. The Actor takes 25 settings; the table on this page lists each one with its default. Raise maxItems once the first rows look right.
Does it work without Google Sheets?
Yes. The rows wait in the Rows ready node, so you can connect any other node there: a database, Airtable, a webhook or an email. The Google Sheets node is only one option.