What problem does it solve?
Pexels search and downloading footage is repetitive and manual, especially when you need consistent media types (images vs. videos) and specific aspect ratios for content production.
Core Features & Use Cases
- Image search & download: Finds Pexels photos by keywords, filters by orientation/aspect, downloads high-quality variants, and outputs local file paths.
- Video search & download: Searches Pexels video clips by keywords, filters by minimum duration, matches exact video dimensions for the chosen aspect, and downloads MP4 files.
- Deterministic batch outputs: Saves results into the requested output directory, de-duplicates by URL, and returns a JSON summary to stdout for downstream automation.
Use Case Example: When preparing a short-form content calendar, you can fetch a batch of 9:16 portrait images and 9:16 vertical clips from Pexels using curated keywords, then feed the downloaded assets into your editor or publishing workflow.
Quick Start
Run python3 {baseDir}/scripts/pexels_search.py with --type image --terms "sunset ocean,mountain landscape,forest path" --aspect 16:9 --output-dir ./assets/images after setting PEXELS_API_KEY.