# Pexels

Pexels offers a free API that provides access to a vast library of high-quality photos and videos, enabling seamless integration into applications and websites.

- **Category:** images & design
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 9
- **Triggers:** 0
- **Slug:** `PEXELS`
- **Version:** 20260316_00

## Tools

### Get Collection Media

**Slug:** `PEXELS_COLLECTION_MEDIA`

Tool to get all media within a collection by its ID. Use when you need to fetch paginated media from a specific collection.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The unique identifier of the Pexels collection. |
| `page` | integer | No | Page number for pagination, must be >= 1. |
| `per_page` | integer | No | Number of results per page (1-80). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Curated Photos

**Slug:** `PEXELS_CURATED_PHOTOS`

Tool to get real-time curated photos. Use when you need to fetch curated photos with pagination support.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | No | Page number to retrieve (min 1). Defaults to Pexels API default of 1. |
| `per_page` | integer | No | Number of results per page (min 1, max 80). Defaults to Pexels API default of 15. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Featured Collections

**Slug:** `PEXELS_FEATURED_COLLECTIONS`

Tool to get featured collections. Use when you need curated collections of photos and videos with pagination support.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | No | Page number of results to retrieve, must be >= 1. |
| `per_page` | integer | No | Number of results per page (1-80). Defaults to 15. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Photo

**Slug:** `PEXELS_GET_PHOTO`

Tool 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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | integer | Yes | The unique identifier of the photo to retrieve |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Video by ID

**Slug:** `PEXELS_GET_VIDEO_BY_ID`

Tool 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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | integer | Yes | The unique identifier of the video to retrieve |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get My Collections

**Slug:** `PEXELS_MY_COLLECTIONS`

Tool 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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | No | Page number to retrieve, must be >= 1 |
| `per_page` | integer | No | Number of collections per page, between 1 and 80 |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Popular Videos

**Slug:** `PEXELS_POPULAR_VIDEOS`

Tool to retrieve current popular Pexels videos. Use when you want to fetch trending videos from Pexels.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | No | Page number to retrieve. Default is 1. |
| `per_page` | integer | No | Number of videos per page (1–80). Default is 15. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Search Photos

**Slug:** `PEXELS_SEARCH_PHOTOS`

Tool 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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | No | Page number of results to retrieve, must be >= 1. |
| `size` | string ("large" | "medium" | "small") | No | Filter by photo size. |
| `color` | string | No | Filter by photo color. Accepts standard color names or hex codes, e.g., 'red' or '#00ff00'. |
| `query` | string | Yes | Search term to find photos. Use specific, descriptive terms (e.g., 'plated chicken overhead shot' instead of 'chicken') to improve result relevance. |
| `locale` | string | No | Language locale for search results, e.g., 'en-US', 'pt-BR'. |
| `per_page` | integer | No | Number of results per page (1-80). Defaults to 15. |
| `orientation` | string ("landscape" | "portrait" | "square") | No | Filter by photo orientation. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Search Videos

**Slug:** `PEXELS_SEARCH_VIDEOS`

Tool 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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | No | Page number for paginated results (starting at 1) |
| `size` | string ("large" | "medium" | "small") | No | Filter results by video size |
| `query` | string | Yes | Search query term for finding relevant videos |
| `per_page` | integer | No | Number of results per page (min 1, max 80) Keep close to default when only a few results are needed to avoid oversized responses. |
| `orientation` | string ("landscape" | "portrait" | "square") | No | Filter results by video orientation |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
