get_photo | Retrieve one photo (dimensions, photographer, image URLs in several sizes, alt text). Arguments: id (integer, required — the photo id, returned by search_photos, list_curated_photos or list_collection_media). Pexels requires attribution: show a link to Pexels and, whenever possible, credit the photographer (“Photo by <photographer> on Pexels”, linking photographer_url). |
get_video | Retrieve one video (duration, author, video files and preview pictures). Arguments: id (integer, required — the video id, returned by search_videos, list_popular_videos or list_collection_media). Pexels requires attribution: show a link to Pexels and, whenever possible, credit the videographer (“Video by <user.name> on Pexels”, linking user.url). |
list_collection_media | List the photos and videos of a collection. Arguments: id (string, required — the collection id, e.g. “8xntbhr”, returned by list_featured_collections), type (“photos” | “videos”, optional — only this media type; both when omitted), sort (“asc” | “desc”, optional — default “asc”), page (integer ≥ 1, optional — default 1), per_page (integer 1–80, optional — default 15). Each item carries type “Photo” or “Video”. Credit the author as for photos and videos above (link to Pexels, photographer or videographer name). |
list_curated_photos | List photos curated by the Pexels team (refreshed regularly). Arguments: page (integer ≥ 1, optional — default 1), per_page (integer 1–80, optional — default 15). Pexels requires attribution: show a link to Pexels and, whenever possible, credit the photographer (“Photo by <photographer> on Pexels”, linking photographer_url). |
list_featured_collections | List the collections featured by Pexels (id, title, description, media counts). Arguments: page (integer ≥ 1, optional — default 1), per_page (integer 1–80, optional — default 15). Use a returned id with list_collection_media. |
list_popular_videos | List currently popular Pexels videos. All arguments optional: min_width (integer, pixels), min_height (integer, pixels), min_duration (integer, seconds), max_duration (integer, seconds), page (integer ≥ 1 — default 1), per_page (integer 1–80 — default 15). Pexels requires attribution: show a link to Pexels and, whenever possible, credit the videographer (“Video by <user.name> on Pexels”, linking user.url). |
search_photos | Search Pexels photos by keyword. Arguments: query (string, required — the search term), orientation (“landscape” | “portrait” | “square”, optional), size (“large” = 24MP | “medium” = 12MP | “small” = 4MP, optional — minimum photo size), color (optional — one of “red”, “orange”, “yellow”, “green”, “turquoise”, “blue”, “violet”, “pink”, “brown”, “black”, “gray”, “white”, or a hex code such as “#ffffff”), locale (optional — search locale such as “fr-FR”, “en-US”, “de-DE”), page (integer ≥ 1, optional — default 1), per_page (integer 1–80, optional — default 15). Pexels requires attribution: show a link to Pexels and, whenever possible, credit the photographer (“Photo by <photographer> on Pexels”, linking photographer_url). |
search_videos | Search Pexels videos by keyword. Arguments: query (string, required — the search term), orientation (“landscape” | “portrait” | “square”, optional), size (“large” = 4K | “medium” = Full HD | “small” = HD, optional — minimum video size), locale (optional — search locale such as “fr-FR”, “en-US”, “de-DE”), page (integer ≥ 1, optional — default 1), per_page (integer 1–80, optional — default 15). Pexels requires attribution: show a link to Pexels and, whenever possible, credit the videographer (“Video by <user.name> on Pexels”, linking user.url). |