Pexels Scraper — Free Stock Photos & Videos

Search public Pexels photos and videos, export direct asset URLs, and keep normalized metadata without an API key.

Data fields

FieldTypeDescription
descriptionstring | nullValue exported as description.
colorPalettearrayValue exported as colorPalette.
creatorUsernamestring | nullValue exported as creatorUsername.
creatorLocationstring | nullValue exported as creatorLocation.
creatorAvatarUrlstring | nullValue exported as creatorAvatarUrl.
creatorInstagramstring | nullValue exported as creatorInstagram.
creatorTwitterstring | nullValue exported as creatorTwitter.
createdAtstring | nullValue exported as createdAt.

Input preview

modeMode *
querySearch query
mediaTypeMedia type
photoIdsPhoto IDs or Pexels photo URLs
photographerPhotographer profile
maxItemsMaximum media records

API and agents

This actor can be run through Apify API, datasets, webhooks, schedules, and the official Apify MCP server.

Ready-to-run examples

Open a saved Apify example, adjust the input, and run the actor in your own Apify account.

View all examples

How this actor works

See example inputs, outputs, API usage, and practical limits before running this actor on Apify.

Open Apify page

Use this Pexels photo scraper and Pexels video scraper to search public media and export reusable metadata with direct asset URLs. No Pexels account or API key is required.

Quick start

Open the Input tab, paste this JSON and start the Actor. After completion, open the Dataset tab to export JSON, CSV or Excel.

{"mode":"search","query":"forest","mediaType":"photos","maxItems":20}

The Actor returns metadata and asset links, not downloaded media files. Source availability and filters can produce fewer results, including none.

Prefer a video guide? This short Apify walkthrough shows you how to set up and run an Actor. It uses a different Actor, but the setup steps are the same.

https://youtu.be/1OW8gOqlZbY?t=25

What you get

Field Meaning
recordType, id, pageUrl Media type, Pexels ID, and canonical page.
title, alt, tags, license Public descriptive metadata and license label.
width, height, aspectRatio, orientation Media dimensions and normalized orientation.
avgColor Source-provided average color when available.
photographerId, photographerName, photographerUrl Public creator identity and profile link.
imageOriginalUrl, imageLargeUrl, imageMediumUrl, imageSmallUrl Photo rendition URLs for photo rows.
downloadUrl Best available direct asset URL for the media.
durationSeconds, fps, videoFiles, bestVideoUrl Video metadata and files for video rows.
sourceMode, sourceQuery, sourcePage, sourceApiUrl, scrapedAt Public-source request context.

Photo-only and video-only fields are null or empty arrays when they do not apply. This is intentional: the Actor does not infer missing media attributes.

Who is it for?

  • Content editors shortlisting public stock-media references for articles and campaigns.
  • Design researchers comparing available dimensions, orientation and creator context.
  • Media-data developers importing structured photo or video metadata.
  • Automation builders passing selected asset links into their own approved tools.

How you can use the data

  • Shortlist forest photos for a layout. Use the existing forest photo search with a small cap and landscape orientation. Keep pageUrl, dimensions and creator attribution beside direct rendition links, then check the applicable rights before using an asset.
  • Review ocean video references. Use the existing ocean search with video mode and a five-second minimum duration. Retain duration, available frame rate and videoFiles rather than expecting downloaded files or using missing metadata as zero.
  • Inspect a known photo or curated sample. Use the existing photo ID 12377231 with a one-row cap, or the portrait curated-photo recipe. Exact IDs target known photos; use photographer mode for a creator's portfolio.
  • Prepare your own media comparison. Join recordType and ID with source context, dimensions and available public counts. Keep null statistics unknown and source publication dates separate from capture dates. The Actor does not itself download, edit or license-check media for your project.

Input settings

Search photos

{
  "mode": "search",
  "query": "forest",
  "mediaType": "photos",
  "maxItems": 20,
  "orientation": "landscape"
}

Search videos

{
  "mode": "search",
  "query": "ocean",
  "mediaType": "videos",
  "maxItems": 20,
  "minDuration": 5
}

Fetch exact photo IDs

{
  "mode": "photoId",
  "photoIds": ["12377231"],
  "maxItems": 1
}

Browse curated photos

{
  "mode": "curated",
  "maxItems": 20,
  "orientation": "portrait"
}

Get a photographer's portfolio

{
  "mode": "photographer",
  "photographer": "https://www.pexels.com/@pixabay/",
  "mediaType": "all",
  "maxItems": 20
}

More input settings

Key Use
mode Choose search, curated, photoId or photographer.
query Search phrase used in search mode.
photographer Pexels profile URL or the name after @, for photographer mode.
mediaType Choose photos, videos, or all for search and photographer modes.
photoIds Pexels photo IDs or photo URLs for exact lookup.
maxItems Maximum rows to save, from 1 to 100. Default 20.
orientation Keep landscape, portrait, square, or all.
minWidth, minHeight Exclude smaller media with local dimension filters.
minDuration, maxDuration Keep videos within a duration range in seconds.
dedupe Default true: keep one row per media type and Pexels ID. Set false to retain repeated requested IDs.

Output data

Illustrative partial row showing field types, not an observed media record:

{
  "recordType": "photo",
  "id": 12377231,
  "pageUrl": "https://www.pexels.com/photo/12377231/",
  "width": 4000,
  "height": 2667,
  "orientation": "landscape",
  "photographerName": null,
  "downloadUrl": "https://images.pexels.com/photos/example.jpeg",
  "sourceMode": "search",
  "sourceQuery": "forest"
}

Additional output fields

Photo and video rows also include the available first-party description, colorPalette (hex colors), creatorUsername, creatorLocation, creatorAvatarUrl, creatorInstagram, creatorTwitter, createdAt, updatedAt, and publishedAt. Existing photographerId, photographerName, and photographerUrl remain the creator identity and profile link. Social fields are source-provided handles, not verified external profiles. Dates describe Pexels creation, update and publication, not the date a photo was taken.

views, downloads, and likes are public Pexels counts when available. Counts can change after collection. Missing or unavailable counts are null, never assumed zero. Statistics are optional: unavailable counts do not discard valid core media output. Unavailable text/date/profile fields are null. Unavailable palettes are empty arrays. Coverage varies by media and source. Camera EXIF is not included.

Download your results

Open your run's dataset, choose Export and select JSON, CSV or Excel. JSON keeps nested fields together. CSV and Excel are useful when you want to review the records in a spreadsheet.

See Apify's download and export guide for the available formats and field options.

Tips for best results

  • Use a specific visual phrase. Existing examples include forest photos and ocean videos.
  • Select the media type deliberately. All can combine photo and video rows with different applicable fields.
  • Apply orientation and minimum dimensions when useful. Check returned dimensions before a layout decision.
  • Use exact photo IDs for known targets. They do not request a full creator portfolio.
  • Keep deduplication on for repeated targets. Identity combines media type with the Pexels ID.

Limits and caveats

Only public Pexels metadata and asset references are supported without accounts, credentials, cookies or API keys. Collections, similar-media lookup, account-only data, EXIF, reactions and media-file downloading are unsupported. Supported modes are search, curated photos, exact-photo lookup and photographer portfolios (newest first).

At most one hundred media rows are saved. Public availability, query and filters can produce fewer records. Source order is retained without custom sorting. Photo-only and video-only fields can be null or empty when inapplicable, and missing attributes are not inferred.

Optional counts remain null when unavailable and do not discard valid core media. Counts can change later, creator social fields are source handles rather than verified external profiles, and Pexels creation/update/publication dates are not when the media was captured. Unavailable palettes are empty and optional text, dates and profile fields can be null.

Valid requests with no matching media can succeed empty. Later source failures can leave partial results, while execution or storage failures can still fail the run. Direct URLs may change or become unavailable. Respect Pexels terms and each asset's applicable rights before using media in another project. Keep source pages for your own rights and attribution review.

Automation and integrations

Save your settings for next time

Once you have an input that works for you, save it as an Apify task. This keeps your settings together so you can use them again without filling in the form from scratch.

Run on a schedule

Need fresh results regularly? You can schedule the Actor or a saved task to run at a time that suits you.

Each scheduled run collects the data again. If you want to compare results or highlight changes, add that step in your own workflow.

Send results to your other tools

Use n8n, Make or Zapier to connect this scraper to the rest of your workflow. For example, you could pass its results to an AI assistant or add records to a spreadsheet. Follow the Apify integration guides for your chosen tool.

For a custom connection, an Apify webhook can notify your app when a run finishes or fails. Your app can then fetch the results or handle the failure.

API usage

Want to collect this data from your own app or automation? The examples below send input to the scraper and show how to collect its results.

The Node.js and Python examples wait for the run to finish before reading its results. The cURL example starts the run and returns its details. Wait for that run to finish, then use its defaultDatasetId to fetch the results.

For setup instructions, see Apify's JavaScript client guide, Python client guide and Actor runs API reference.

cURL

curl -X POST 'https://api.apify.com/v2/acts/fetch_cat~pexels-scraper/runs' \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H 'Content-Type: application/json' \
  --data @- <<'JSON'
{
  "mode": "search",
  "query": "forest",
  "mediaType": "photos",
  "maxItems": 20
}
JSON

Node.js

import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('fetch_cat/pexels-scraper').call({
  "mode": "search",
  "query": "forest",
  "mediaType": "photos",
  "maxItems": 20
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Python

import os
from apify_client import ApifyClient

client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('fetch_cat/pexels-scraper').call(run_input={'mode': 'search', 'query': 'forest', 'mediaType': 'photos', 'maxItems': 20})
print(client.dataset(run['defaultDatasetId']).list_items().items)

MCP and AI agents

You can ask your AI assistant to collect data with Pexels Scraper — Free Stock Photos & Videos and help you work with the results. The scraper returns the data, and your assistant can then summarize it, compare records or prepare notes.

Connect your assistant through the Apify MCP server. MCP gives your assistant a way to find this scraper, run it and read the results. Follow the official setup and sign-in guide for your app.

Easier setup with an Apify plugin

If you use a supported coding assistant, the official Apify plugin can set up the connection for you. It connects your assistant to Apify and includes instructions for common tasks. Follow the guide for your particular app.

Use Apify AI in Console

Prefer to keep everything in Apify? Open Apify AI in Console and ask it to find Fetch Cat's Pexels Scraper — Free Stock Photos & Videos. You can describe the data you want and ask questions about the results.

Apify AI is currently in beta. It asks for confirmation before starting an Actor, and normal run charges apply.

Choose your assistant

Connect just this scraper

To keep your setup focused on this scraper, add this server configuration to a compatible MCP client:

{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=fetch_cat/pexels-scraper"
    }
  }
}

Sign in to Apify when your client asks. If your client uses a Bearer token instead, follow its setup guide and keep the token in its secure configuration. Configuration formats vary by app, so use the linked guide if your client needs a different format.

Use Apify's general server

Already connected to the general Apify MCP server at https://mcp.apify.com? You can use it to find this scraper without adding another server. Ask your assistant to use Pexels Scraper — Free Stock Photos & Videos by Fetch Cat, or give it the identifier fetch_cat/pexels-scraper.

Your assistant can check the available settings and retrieve the results from the returned run. If the run is still working, it should follow that run rather than start it again. Both connection options use Apify's hosted service.

Example requests

  • “Use Fetch Cat’s Pexels Scraper to collect up to 5 forest photo records in landscape orientation. Keep canonical pages, creator links and available dimensions, returning metadata and asset URLs without downloading files.”
  • “Collect up to 5 ocean video records with a minimum duration of 5 seconds. Keep available duration, frame rate and video-file references, leaving missing attributes unknown rather than inventing them.”
  • “Retrieve photo 12377231 with a one-row cap and deduplication enabled. Keep its source page, creator context and available public metadata for my own review, without claiming a rights check or capture date.”

Normal Apify charges apply. Check the live Pricing tab before asking your assistant to run a larger batch.

Pay with x402

If your AI agent has a funded wallet, it can pay for Apify usage through x402. This experimental option lets an agent use Apify without a conventional account.

Apify AGI provides a prepaid API token with a spending cap after payment. Your agent can use that token to run this scraper through the Apify API or an authenticated MCP connection.

Some MCP setups also support paying for each request directly. That is a different payment option, so check the official guide for its availability.

Follow the official guide for wallet setup, supported payment options and current terms. Apify handles the payments. Keep wallet keys and payment tokens in your agent's secure configuration.

Other ways for agents to pay

Apify also supports MPP for prepaid access through AGI and Skyfire for eligible Actors. If your agent already uses one of these, see the agentic payment guide to choose the right setup.

Support and feedback

For custom additions or integrations, email [email protected].

Found an error or have a feature request? Open an issue with the run URL, a non-sensitive input example and what you expected.

Need help sharing it? See Apify’s guide to sharing a run when reporting an issue. Sharing a run can give the developer access to its input, logs and results, so use a run that contains no sensitive data. Please leave out API tokens, passwords, cookies, private documents and personal data. Use a public sample URL or a redacted example instead.

Tried this scraper? We'd love to hear how it worked for you. Leave a review to help others choose the right tool and help us improve it. Your feedback means a lot to us.

Made with care for curious people, AI agents and the possibilities in data. ♥

Common questions

Questions and answers reused from the canonical actor README.

Does it download media files?

No. It exports public metadata and direct asset URLs.

Can I use a Pexels API key or cookies?

No. This Actor does not require or accept keys, accounts, or cookies.

Why are some fields empty?

Photo and video records have different applicable fields. The Actor returns null or an empty array rather than guessing.

Can I collect collections or creator portfolios?

Creator portfolios, yes: use photographer mode with the profile URL. Collections are not supported in this release.

Can I use this with an AI agent?

Yes. Connect the Actor through the Apify MCP tool or call it with the API examples above, then pass only the exported dataset fields your workflow needs.