Web research5 min readBy Purrkey teamUpdated

How to search Pexels for free stock photos

Find Pexels photos by keyword, compare image sizes, dimensions, colors, photographer credit and tags, and pick three files for a landing page header

On this page

You need 12 coffee photos for a landing page header and must choose three with the right orientation and width. The search returns candidates; the worksheet below is the deliverable

The task and the worksheet

The worksheet has one row per photo and the fields you need to compare before a download. Values here are placeholders showing the shape

idtitlealtimageMediumimageOriginalwidthheightorientationcolorphotographerphotographerUrltags
(photo id)(title)(alt text)(750 px URL)(full-resolution URL)(pixels)(pixels)(enum value)#918c79(name)(profile URL)(tag list)

A row starts with id and title, then the two image URLs. Use imageMedium for a quick visual review and imageOriginal for the file you would download. The width and height columns hold the original pixel dimensions. The orientation column records the orientation value from the contract. color gives a hex code for the dominant color, and tags gives the photo tags when the serving source returns them. No search has been run for this guide; the table is a design

The tool id is anyapi.pexels.search_photos and the Agents call it through POST /v1/runs with toolId anyapi.pexels.search_photos. The input contract has one required field, query, which is the keyword or phrase to search Pexels photos for. The other listed properties are optional: limit, minWidth, minHeight, orientation, peopleCount and requireFields. Example input, invented for this guide

FieldExample value
querycoffee
limit2
minWidth1200
orientationomitted in this example

limit accepts 1 to 20 photos and defaults to 20. Billing is per photo returned, so a lower limit costs less. That makes a two-photo pilot a cheap way to inspect the shape of the response before you ask for a larger set. minWidth and minHeight filter by pixel size. orientation filters by the orientation enum in the contract. peopleCount accepts the string values in the contract for zero, one or two people. requireFields can name tags; if the cheapest source cannot return a named field, a dearer source serves the request, and you are quoted and charged its price. A named field can still be absent on a photo that genuinely lacks it. Confirm the current input schema and price before running, because the contract is the source for this call

For a related mood-board pass, the companion article uses a different image search workflow that you can compare with this one

Reading the output fields

found is the first decision field. When it is false, reason is not_found, and the contract treats that as a successful call, not an error. When it is true, data.photos holds the candidates in Pexels relevance order

Each photo object carries the fields that fill the worksheet. id, url, image, imageMedium and imageOriginal identify the photo and its files. width and height are original dimensions, so compare them against the header slot before choosing. orientation tells you which layout the photo suits. color and colors give the dominant hex code and a palette for matching a page background. photographer and photographerUrl supply the credit line. alt and title give the photo description and title. tags are Pexels' tags for the photo, and one source returns at most 25 tags; name tags in requireFields to be served the full list. license records the license the photo is published under

For the three-photo choice, sort by the orientation and width that fit the header, then compare the color values with the page palette. Keep photographer and photographerUrl with each chosen row so the credit is ready when the files go into the page. Skip rows with missing dimensions or a missing imageOriginal; the contract requires id, url and image, but the other fields can be absent when the provider lacks data

The agent prompt

Agent prompt
Set up https://purrkey.app/SKILL.md, then use Purrkey to search Pexels for
coffee photos for a landing page header. Check the current inputs and price
of anyapi.pexels.search_photos before running anything. Start with one call
using query "coffee" and limit 2. Then run three calls with limit 4 if the
current input and price still fit the plan. Return a table with id, title,
alt, imageMedium, imageOriginal, width, height, orientation, color,
photographer, photographerUrl and tags. Mark missing values as empty. Do not
download files and do not invent photo ids.

The prompt asks for a table, not a recommendation. That keeps the choice with the designer, who can compare the columns against the header slot

Estimated tool cost

The Purrkey catalog lists anyapi.pexels.search_photos at up to $0.0932 per call, price revision anyapi-catalog-2026-11-05, read on November 13, 2026. The unit is max_call: Maximum per call. Successful runs settle at the actual AnyAPI charge. The totals below are ceilings

StepFormulaUnit pricePlanned quantityTotal
Pilot: 2 photoscalls x max price$0.0932 per call1$0.0932
Planned run: 12 photoscalls x max price$0.0932 per call3$0.2796
Pilot plus planned run$0.3728

The one-call pilot covers 2 photos. The three-call plan covers 12 photos. Agent model fees are not counted. If one call with a higher limit can return the needed set, the three-call line can shrink to one call and the ceiling becomes $0.0932 for that run

Next action

Open the Pexels photo search tool and run the two-photo call with query set to coffee before you commit to the larger set

Get started by giving this to your agent

  • Claude Code
  • Codex
  • Gemini CLI
  • Cursor
  • GitHub Copilot
Set up https://purrkey.app/SKILL.md, then use Purrkey to show me what I can do with Pexels.
Explore Pexels tools and pricing

FAQ

How do I search Pexels for coffee photos with one API call?

Call anyapi.pexels.search_photos with query set to coffee and an optional limit from 1 to 20. The response puts candidates in data.photos in Pexels relevance order.

What fields does anyapi.pexels.search_photos return for each photo?

Each photo object can include id, title, alt, imageMedium, imageOriginal, width, height, orientation, color, photographer, photographerUrl and tags, plus other fields such as url, image, colors and license.

How many photos can one Pexels search return?

limit accepts 1 to 20 photos and defaults to 20. Billing is per photo returned, so a lower limit costs less.

How much does a Pexels photo search cost?

The catalog lists anyapi.pexels.search_photos at up to $0.0932 per call. Successful runs settle at the actual AnyAPI charge.

What happens when found is false in the Pexels search output?

reason is not_found, and the contract treats the answer as a successful call, not an error.

How do I choose three coffee photos for a landing page header?

Compare orientation, width and height against the header slot, then compare color with the page palette. Keep photographer and photographerUrl with each chosen row for credit.

Next step

Try this with Pexels

The tool directory lists every endpoint with its current price. Inspect the inputs there, then let your agent run a small batch before scaling up.

See Pexels tools

Share this article