---
name: Pexels CLI
slug: pexels-cli
category: Automation
description: Pexels CLI searches and downloads free stock photos and videos from Pexels. Use it when you need keyword search, media details, photographer profiles, collections, or file downloads without using the website.
github: "https://github.com/ItamarZand88/CLI-Anything-WEB/tree/main/.claude/skills/pexels-cli"
language: Python
stars: 215
forks: 45
install: "npx degit https://github.com/ItamarZand88/CLI-Anything-WEB/tree/main/.claude/skills/pexels-cli ~/.claude/skills/pexels-cli"
installs_to: ~/.claude/skills/pexels-cli
source_path: .claude/skills/pexels-cli/SKILL.md
collection_size: 25
category_size: 1860
collection_url: "https://dirskills.com/collections/ItamarZand88/CLI-Anything-WEB"
added: 2026-09-04T05:25:49.126Z
last_synced: 2026-09-04T05:25:49.126Z
canonical_url: "https://dirskills.com/skills/pexels-cli"
---

# Pexels CLI

Pexels CLI searches and downloads free stock photos and videos from Pexels. Use it when you need keyword search, media details, photographer profiles, collections, or file downloads without using the website.

**Install:**

```bash
npx degit https://github.com/ItamarZand88/CLI-Anything-WEB/tree/main/.claude/skills/pexels-cli ~/.claude/skills/pexels-cli
```

## README

# cli-web-pexels

Search and download Pexels stock photos and videos (no auth, Cloudflare bypass built in).
Install: `pip install cli-web-pexels`

## Commands

| Command | Purpose | Key options |
|---------|---------|-------------|
| `photos search QUERY` | Search photos | `--orientation landscape\|portrait\|square`, `--size large\|medium\|small`, `--color HEX_OR_NAME`, `--page N` |
| `photos get SLUG` | Photo details (image URLs, EXIF, location) | slug or numeric ID |
| `photos download SLUG` | Download a photo (JPEG) | `--size small\|medium\|large\|original`, `-o/--output PATH` |
| `videos search QUERY` | Search videos | `--orientation`, `--page N` |
| `videos get SLUG` | Video details (`video_files[]` with quality/fps/link) | slug or numeric ID |
| `videos download SLUG` | Download a video (MP4) | `--quality sd\|hd\|uhd` (default hd), `-o/--output PATH` |
| `users get USERNAME` | Photographer profile | |
| `users media USERNAME` | A user's uploaded photos/videos | `--page N` |
| `collections get SLUG` | Collection detail + media | `--page N` |
| `collections discover` | Popular and curated collections | |

## Examples

```bash
# Landscape nature photos; grab the first download URL
cli-web-pexels photos search "mountain lake" --orientation landscape --json | jq '.data[0].download_url'

# Photo details by slug (slug comes from search results)
cli-web-pexels photos get green-leaves-1072179 --json

# Download original size to a path
cli-web-pexels photos download green-leaves-1072179 --size original -o leaves.jpg

# Search videos and inspect HD renditions
cli-web-pexels videos get long-narrow-road-856479 --json | jq '.video_files[] | select(.quality=="hd")'

# Photographer profile
cli-web-pexels users get catiamatos --json
```

## JSON output

Read commands accept `--json` and return the data directly — search returns `{"data": [{id, title, slug, photographer, image_url, download_url, ...}]}`, get returns the photo/video object. Errors return `{"error": true, "code": "...", "message": "..."}`. Download commands write the file and print the path (no `--json` flag).

## Utilities

`cli-web-pexels doctor [--json]` self-diagnoses the local setup (install, auth, dependencies). `cli-web-pexels mcp-serve` serves the commands as MCP tools over stdio.

## Agent tips

- Pagination is `--page N` (24 results per page) on search/list commands.
- Slugs from search results (e.g. `green-leaves-1072179`) work everywhere a SLUG argument is expected; bare numeric IDs also work.
