Pexels API: Search videos
Finds free stock videos on Pexels by search words, with creator, duration, preview image and a direct MP4 link, in Pexels search order starting at the chosen results page.
Unofficial. Not affiliated with or endorsed by Pexels.
Inputs
Values from the run on Oct 31, 2026, shown under Output.
- Page optional
page Pexels search page to start from, for example 2.
2
Whole number 1 or more. Default
1.- Query, required
query What the video should show, for example city traffic at night.
mountain sunrise
- Max Results optional
max_results Maximum number of videos to return, for example 20.
26
Whole number from 1 to 80. Default
20.- Orientation optional
orientation The video frame shape, for example portrait.
portrait
One of
any,landscape,portrait,square. Defaultany.
Input as JSON
{ "page": 2, "query": "mountain sunrise", "max_results": 26, "orientation": "portrait"}Output
{ "videos": [ { "width": 2160, "height": 3840, "length": "0:18", "video_id": 36974946, "description": "Scenic aerial shot of misty mountains at sunrise, showcasing nature's beauty.", "creator_name": "Sherine", "licence_note": "Free to use under the Pexels License", "length_seconds": 18, "video_file_link": "https://videos.pexels.com/video-files/36974946/15664489_2160_3840_60fps.mp4" , "video_page_link": "https://www.pexels.com/video/aerial-view-of-misty-mountain-landscape-at-dawn-36974946/" , "preview_image_link": "https://images.pexels.com/videos/36974946/pexels-photo-36974946.jpeg?auto=compress&cs=tinysrgb&w=1440" , "creator_profile_link": "https://www.pexels.com/@sherine-197682976/" }, { "width": 2160, "height": 3840, "length": "0:20", "video_id": 28956194, "description": "Stunning aerial view of mountains shrouded in clouds at sunrise, showcasing nature's beauty.", "creator_name": "Duy Nguyen", "licence_note": "Free to use under the Pexels License", "length_seconds": 20, "video_file_link": "https://videos.pexels.com/video-files/28956194/12527773_2160_3840_30fps.mp4" , "video_page_link": "https://www.pexels.com/video/aerial-view-of-cloud-covered-mountains-at-sunrise-28956194/" , "preview_image_link": "https://images.pexels.com/videos/28956194/4k-nature-aerial-cloud-mountain-clouds-28956194.jpeg?auto=compress&cs=tinysrgb&w=1440" , "creator_profile_link": "https://www.pexels.com/@duy-nguyen-489946968/" }, { "width": 1080, "height": 1920, "length": "0:09", "video_id": 15860398, "description": "Serene sunrise view over misty mountains and village.", "creator_name": "ORHAN BADUR", "licence_note": "Free to use under the Pexels License", "length_seconds": 9, "video_file_link": "https://videos.pexels.com/video-files/15860398/15860398-hd_1080_1920_30fps.mp4" , "video_page_link": "https://www.pexels.com/video/the-sun-setting-over-a-mountain-15860398/" , "preview_image_link": "https://images.pexels.com/videos/15860398/gun-dogumu-sunset-15860398.jpeg?auto=compress&cs=tinysrgb&w=1440" , "creator_profile_link": "https://www.pexels.com/@orhan-badur-253753151/" } ]}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"pexels.com/search_videos","input":{"page":2,"query":"mountain sunrise","max_results":26,"orientation":"portrait"}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "pexels.com/search_videos" , "input": { "page": 2, "query": "mountain sunrise", "max_results": 26, "orientation": "portrait" }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "pexels.com/search_videos" , "input": { "page": 2, "query": "mountain sunrise", "max_results": 26, "orientation": "portrait" } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run pexels.com/search_videos# with {"page":2,"query":"mountain sunrise","max_results":26,"orientation":"portrait"}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "query" ], "properties": { "page": { "type": "integer", "default": 1, "minimum": 1, "description": "Pexels search page to start from, for example 2." }, "query": { "type": "string", "examples": [ "city traffic at night" ], "minLength": 1, "description": "What the video should show, for example city traffic at night." }, "max_results": { "type": "integer", "default": 20, "maximum": 80, "minimum": 1, "description": "Maximum number of videos to return, for example 20." }, "orientation": { "enum": [ "any", "landscape", "portrait", "square" ], "type": "string", "default": "any", "description": "The video frame shape, for example portrait." } }}Output schema
{ "type": "object", "required": [ "videos" ], "properties": { "videos": { "type": "array", "items": { "type": "object", "required": [ "description", "creator_name", "creator_profile_link", "length", "width", "height", "preview_image_link", "video_file_link", "licence_note", "video_page_link", "video_id", "length_seconds" ], "properties": { "width": { "type": [ "integer", "null" ], "description": "Width in pixels of the selected video file." }, "height": { "type": [ "integer", "null" ], "description": "Height in pixels of the selected video file." }, "length": { "type": [ "string", "null" ], "description": "Duration formatted as minutes and seconds, or hours, minutes and seconds." }, "video_id": { "type": "integer", "description": "Pexels video ID." }, "description": { "type": [ "string", "null" ], "description": "Video description." }, "creator_name": { "type": [ "string", "null" ], "description": "Name of the video creator." }, "licence_note": { "type": "string", "description": "Pexels video licence note." }, "length_seconds": { "type": [ "integer", "null" ], "description": "Video duration in seconds." }, "video_file_link": { "type": [ "string", "null" ], "description": "Direct link to an HD 1920 × 1080 MP4, or the largest available MP4." }, "video_page_link": { "type": "string", "description": "Pexels page for this video." }, "preview_image_link": { "type": [ "string", "null" ], "description": "Video preview image link." }, "creator_profile_link": { "type": [ "string", "null" ], "description": "Link to the creator’s Pexels profile." } }, "additionalProperties": false }, "description": "Matching videos in Pexels search order." } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
pexels.com/search_videos- Returns
- description, creator, length, size, preview image, video file link, page link
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method pexels.com/search_videos with the inputs above.
Ask your agent
- Find me free stock footage of ocean waves crashing on rocks at sunset, landscape orientation, with direct MP4 download links
- I need about 10 vertical clips of people jogging in a park for an Instagram Reel — show duration and who made each one
- Search Pexels for drone shots of snowy mountains, give me 30 results starting from page 3
- Get free videos of coffee being poured in a cafe, square format, including preview thumbnails and creator names
- Look up royalty-free videos on pexels.com showing busy Tokyo streets at night and list their length, resolution and MP4 file URLs
See more
All Pexels methodsSearch free stock photos on Pexels by subject, orientation, and page. Returns up to 80 photos in search order; Pexels may broaden searches with few exact matches.
pexels.com/search_photosFinds Unsplash photos matching a search phrase, in search order, optionally by shape; excludes Unsplash+ photos unless included. Each result has image links, photographer, licence and photo page.
unsplash.com/search_photosFinds Pinterest pins for an idea in search order, with image, creator, board, saves and linked website. Limited to the first public search page.
pinterest.com/search_pinsGets a public Vimeo video's title, creator, play, like and comment counts, length, upload date, description, tags, thumbnail and link from its video link.
vimeo.com/get_videoSearches Dailymotion videos by keywords, ordered by relevance, newest upload, or most views. Returns up to 100 public results.
dailymotion.com/search_videosLists a YouTube channel's public videos, Shorts, or live uploads, newest first or most popular first, along with channel details. Counts and dates taken from displayed text may be approximate.
youtube.com/list_channel_videosFinds free-to-use Wikimedia Commons images for a topic in Commons relevance order. Each image comes with its links, creator and licence details.
commons.wikimedia.org/search_free_imagesSearches The Verge articles by keyword, with optional date filters, sorting and pagination. Only the first 100 matches from The Verge search are used.
theverge.com/search_news