utility

pexels

Search and retrieve stock photos from the Pexels API — structured photo data with multiple resolution URLs, ready to drop into a project.

Stock PhotosPexelsAPI
pexels
Bundle
1.74MB
Files
5

Install

claude plugin install pexels --from https://fadaly.net/downloads/skills/pexels.zip

The skill

Pexels — Stock Photo Search & Retrieval

What It Does

Searches and retrieves stock photos from the Pexels API. Returns structured photo data with multiple resolution URLs.

Engine API (programmatic)

const pexels = require('./engine');

// Search
const res = await pexels.searchPhotos({ query: 'mountain landscape', perPage: 10, orientation: 'landscape' });
// Returns: { ok, data: { photos: [...], total_results, page }, meta: { skill, command, duration_ms } }

// Get single photo
const photo = await pexels.getPhoto({ id: 12345 });

Photo Object Shape

{ id, url, photographer, photographer_url, avg_color, width, height, alt, src: { original, large2x, large, medium, small, tiny } }

Critical Rules

  1. Every function returns { ok, data, error, meta } — universal result contract.
  2. Always credit photographer when using images.

Env Vars

  • PEXELS_API_KEY — Pexels API key (required)