Media

Pexels MCP Server

Connect your account, then chat with AI to run tools.

Pexels API is a developer tool providing access to a large library of free stock photos and videos, enabling integration into web and mobile applications. It is primarily used to enhance applications with high-quality media content.

3 tools
Agent guide included
Start Chatting

Opens MCPBundles Studio with this server selected. After sign-in, chat and run tools from the same thread.

Browse all tools

AI Skill
SKILL.md

Domain knowledge for Pexels — workflow patterns, data models, and gotchas for your AI agent.

Pexels API

Pexels provides a large library of high-quality stock photos and videos licensed under the Pexels License (personal and commercial use, no attribution required but appreciated).

Data Model

Photo Resource
FieldTypeDescription
idintegerUnique numeric photo identifier
widthintegerOriginal width in pixels
heightintegerOriginal height in pixels
urlstringPexels web page URL for this photo
photographerstringPhotographer display name
photographer_urlstringPhotographer's Pexels profile URL
photographer_idintegerPhotographer's numeric ID
avg_colorstringHex color (e.g. #978E82), useful as image placeholder
altstringAlt text describing the photo
likedbooleanWhether the current user liked this photo
srcobjectPre-sized image URLs (see below)

src object sizes:

KeyDimensionsNotes
originalFull resolutionMatches width×height
large2xW 940 × H 650 @2xRetina-ready
largeW 940 × H 650Standard large
mediumH 350 (proportional)Proportionally scaled
smallH 130 (proportional)Thumbnail
portraitW 800 × H 1200Cropped portrait
landscapeW 1200 × H 627Cropped landscape
tinyW 280 × H 200Smallest preview
Video Resource
FieldTypeDescription
idintegerUnique numeric video identifier
widthintegerOriginal width in pixels
heightintegerOriginal height in pixels
urlstringPexels web page URL for this video
imagestringVideo screenshot/poster URL
durationintegerDuration in seconds
userobjectVideographer: id (int), name (str), url (str)
video_filesarrayAvailable quality versions (see below)
video_picturesarrayPreview thumbnails: id, picture (URL), nr (index)

video_files element:

FieldTypeDescription
idintegerFile variant ID
qualitystring/null"hd", "sd", "hls", or null
file_typestringMIME type (e.g. video/mp4)
widthinteger/nullWidth (null for HLS)
heightinteger/nullHeight (null for HLS)
fpsnumberFrames per second
linkstringDirect download URL
sizeintegerFile size in bytes
Collection Resource
FieldTypeDescription
idstringAlphanumeric collection identifier (e.g. "8xntbhr")
titlestringCollection name
descriptionstring/nullOptional description
privatebooleanWhether the collection is private
media_countintegerTotal photos + videos
photos_countintegerNumber of photos
videos_countintegerNumber of videos

Entity Relationships

  • A Photo belongs to a Photographer (via photographer_id).
  • A Video belongs to a User/Videographer (via user.id).
  • A Collection contains mixed Photo and Video objects. Collection media items include an extra type field ("Photo" or "Video") to discriminate.
  • Collections are read-only via API — create/edit on pexels.com, iOS, or Android app.

API Endpoints

Photos (base: /v1/)
EndpointMethodDescription
/v1/search?query=...GETFull-text search with orientation, size, color, locale filters
/v1/curatedGETTrending editor-curated photos, updated hourly
/v1/photos/:idGETSingle Photo by numeric ID
Videos (base: /v1/videos/)
EndpointMethodDescription
/v1/videos/search?query=...GETFull-text search with orientation, size, locale filters
/v1/videos/popularGETTrending videos with min_width, min_height, min_duration, max_duration filters
/v1/videos/videos/:idGETSingle Video by numeric ID
Collections (base: /v1/collections/)
EndpointMethodDescription
/v1/collections/featuredGETEditor-curated themed collections
/v1/collectionsGETYour saved collections
/v1/collections/:idGETAll media in a collection, filterable by type (photos/videos) and sort (asc/desc)

Pagination

All list endpoints accept page (default 1) and per_page (default 15, max 80). Responses include page, per_page, total_results, and optional next_page/prev_page URL strings. The total_results for search endpoints is capped at a high number (e.g. 8000) even when more results exist.

Rate Limits

  • Default: 200 requests/hour, 20,000 requests/month.
  • Response headers: X-Ratelimit-Limit (monthly quota), X-Ratelimit-Remaining, X-Ratelimit-Reset (UNIX timestamp for monthly rollover).
  • Rate limit headers are only returned on successful (2xx) responses, not on 429 errors.
  • Higher limits available with proper attribution — contact api@pexels.com.

Search Tips & Gotchas

  • Queries can be broad ("nature", "people") or specific ("group of people working").
  • Color filter (photos only): Named colors (red, orange, yellow, green, turquoise, blue, violet, pink, brown, black, gray, white) or hex codes (e.g. #ffffff).
  • Locale affects search relevance for non-English queries. Supported: en-US, pt-BR, es-ES, ca-ES, de-DE, it-IT, fr-FR, sv-SE, id-ID, pl-PL, ja-JP, zh-TW, zh-CN, ko-KR, th-TH, nl-NL, hu-HU, vi-VN, cs-CZ, da-DK, fi-FI, uk-UA, el-GR, ro-RO, nb-NO, sk-SK, tr-TR, ru-RU.
  • Size filter means different things: for photos, large = 24MP+, medium = 12MP+, small = 4MP+; for videos, large = 4K, medium = Full HD, small = HD.
  • Video quality field may be null for newer video files — use width/height to determine actual resolution.
  • Collection IDs are alphanumeric strings (not integers like photo/video IDs).
  • The deprecated video base URL https://api.pexels.com/videos/ still works but should not be used — use /v1/videos/ instead.

Attribution

Best practice: link to the photo/video page on Pexels and credit the photographer/videographer (e.g. "Photo by John Doe on Pexels"). Use the url field from the response for attribution links.

Tools in this Server (3)

Pexels Api Get Collections

Browse and retrieve Pexels photo/video collections. Pass collection_id to get all media (photos and videos) within that collection, with optional type...

Pexels Api Get Photos

Retrieve free stock photos from Pexels. Pass photo_id to get a single photo with full metadata and download URLs. Pass query to search by keyword with...

Pexels Api Get Videos

Retrieve free stock videos from Pexels. Pass video_id to get a single video with full metadata, download links, and preview images. Pass query to sear...

Frequently Asked Questions

What is the Pexels MCP server?

Pexels API is a developer tool providing access to a large library of free stock photos and videos, enabling integration into web and mobile applications. It is primarily used to enhance applications with high-quality media content. It provides 3 tools that AI agents can use through the Model Context Protocol (MCP).

How do I connect Pexels to my AI agent?

Add the MCPBundles server URL to your MCP client configuration (Claude Desktop, Cursor, VS Code, etc.). The URL format is: https://mcp.mcpbundles.com/bundle/pexels-api. Authentication is handled automatically.

How many tools does Pexels provide?

Pexels provides 3 tools that can be called by AI agents, along with a SKILL.md that gives your AI agent domain knowledge about when and how to use them.

What authentication does Pexels require?

Pexels uses API Key. Pexels requires credentials. Connect via MCPBundles and authentication is handled automatically.

Setup Instructions

Connect Pexels to any MCP client in minutes

https://mcp.mcpbundles.com/bundle/pexels-api

What is MCP?

Model Context Protocol lets AI tools call external capabilities securely through a single URL. This bundle groups tools behind an MCP endpoint that many clients can use.

Use this bundle in 3 steps

  1. Copy the MCP URL above
  2. Open your AI tool and add a new MCP/connector
  3. Paste the URL and follow any auth prompts

Claude Desktop Users

Skip the manual setup! Use the .mcpb file format for one-click installation. Check the Claude Desktop tab for setup instructions.

Pick your tool tab for exact steps

Select ChatGPT, Cursor, Claude Code, or another tab for copy-paste config.

Ready to use Pexels?

Sign in to connect your credentials and start running tools from the chat.

Pexels MCP Server & Skill — 3 Tools