Pexels connects to a Nagent workspace with an API key. Once it is connected, agents can call 9 Pexels actions, such as "Get Collection Media", "Get Curated Photos" and "Get Photo". Nothing is enabled on connect: each action is allowed one at a time, and an action with side effects runs or waits for a person according to the agent's level.
Every operation an agent can call against Pexels, with input parameters and output schema.
PEXELS_COLLECTION_MEDIATool to get all media within a collection by its ID. Use when you need to fetch paginated media from a specific collection.
Input parameters
The unique identifier of the Pexels collection.
Page number for pagination, must be >= 1.
Number of results per page (1-80).
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
PEXELS_CURATED_PHOTOSTool to get real-time curated photos. Use when you need to fetch curated photos with pagination support.
Input parameters
Page number to retrieve (min 1). Defaults to Pexels API default of 1.
Number of results per page (min 1, max 80). Defaults to Pexels API default of 15.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
PEXELS_FEATURED_COLLECTIONSTool to get featured collections. Use when you need curated collections of photos and videos with pagination support.
Input parameters
Page number of results to retrieve, must be >= 1.
Number of results per page (1-80). Defaults to 15.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
PEXELS_GET_PHOTOTool to retrieve detailed information about a specific photo. Use when you have a valid photo ID to fetch metadata including dimensions, photographer details, and image URLs. Use after confirming the photo ID from search or curated endpoints.
Input parameters
The unique identifier of the photo to retrieve
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
PEXELS_GET_VIDEO_BY_IDTool to retrieve detailed information about a specific video from Pexels. Use when you have a valid video ID to fetch metadata including dimensions, duration, videographer details, and available video file versions.
Input parameters
The unique identifier of the video to retrieve
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
PEXELS_MY_COLLECTIONSTool to get all of the user's collections on Pexels. Use when you need to list a user's collections with pagination support.
Input parameters
Page number to retrieve, must be >= 1
Number of collections per page, between 1 and 80
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
PEXELS_POPULAR_VIDEOSTool to retrieve current popular Pexels videos. Use when you want to fetch trending videos from Pexels.
Input parameters
Page number to retrieve. Default is 1.
Number of videos per page (1–80). Default is 15.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
PEXELS_SEARCH_PHOTOSTool to search for photos on Pexels. Use when you need to retrieve photos by a search term and optional filters. Call after confirming you have a valid Pexels API key. Response image URLs are nested under `photo.src.<size>` (e.g., `photo.src.original`, `photo.src.landscape`, `photo.src.medium`); the top-level `url` field is not sufficient for accessing specific image sizes.
Input parameters
Page number of results to retrieve, must be >= 1.
Filter by photo size.
Filter by photo color. Accepts standard color names or hex codes, e.g., 'red' or '#00ff00'.
Search term to find photos. Use specific, descriptive terms (e.g., 'plated chicken overhead shot' instead of 'chicken') to improve result relevance.
Language locale for search results, e.g., 'en-US', 'pt-BR'.
Number of results per page (1-80). Defaults to 15.
Filter by photo orientation.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
PEXELS_SEARCH_VIDEOSTool to search for videos on Pexels by query and optional filters. Use when you need to find relevant video assets. Combining multiple filters with a narrow query may return few or no results; only apply strict filter combinations when explicitly required.
Input parameters
Page number for paginated results (starting at 1)
Filter results by video size
Search query term for finding relevant videos
Number of results per page (min 1, max 80) Keep close to default when only a few results are needed to avoid oversized responses.
Filter results by video orientation
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
Agents can call 9 Pexels actions on Nagent, including "Get Collection Media", "Get Curated Photos" and "Get Photo". Get Collection Media: Get all media within a collection by its ID. Each action is listed on this page with its input parameters and its output.
Pexels connects with an API key, under your workspace's own connection. Nothing is enabled on connect: each action is allowed one at a time and can be scoped to the agents that need it.
Get Collection Media takes 1 required input: id. It also takes 2 optional inputs: page and per_page. It returns data, error and successful.