Pexels Photos API

Search, browse, and retrieve photos.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).
Business capability
Photo & Image Libraries AE-170.30

Operations 3

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /search Search the Pexels photo library · Search Photos #
Ask an LLM
“How do I find photos of a given keyword?”
“Can I search photos by color or orientation?”
Tell an agent
Search photos for {query}.
Find {query} photos with orientation {orientation}.
GET /curated Get Pexels curated photos · Curated Photos #
Ask an LLM
“What photos are curated by Pexels right now?”
“Can I page through the curated photo feed?”
Tell an agent
Get the curated photos.
Show page {page} of curated photos.
GET /photos/{id} Get a single photo · Get Photo #
Ask an LLM
“How do I fetch one photo by its ID?”
“What details come back for a single photo?”
Tell an agent
Get photo {id}.
Show me the details of photo {id}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/pexels:pexels-photos-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

pexels-photos-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Pexels Photos API
  description: 'The Pexels API provides programmatic access to Pexels'' free stock photo

    and video library, plus curated collections. Use it to search photos

    and videos, fetch curated and popular media, and integrate Pexels

    content into apps and websites.'
  version: '1.0'
  contact:
    name: Pexels API
    url: https://www.pexels.com/api/
  termsOfService: https://www.pexels.com/terms-of-service/
servers:
- url: https://api.pexels.com/v1
  description: Pexels production API
tags:
- name: Photos
  description: Search, browse, and retrieve photos.
paths:
  /search:
    get:
      operationId: searchPhotos
      summary: Search Photos
      description: Search the Pexels photo library by keyword.
      tags:
      - Photos
      security:
      - apiKeyAuth: []
      parameters:
      - in: query
        name: query
        required: true
        schema:
          type: string
        description: Search keyword such as "Ocean" or "Tigers".
      - in: query
        name: orientation
        schema:
          type: string
          enum:
          - landscape
          - portrait
          - square
      - in: query
        name: size
        schema:
          type: string
          enum:
          - large
          - medium
          - small
      - in: query
        name: color
        schema:
          type: string
      - in: query
        name: locale
        schema:
          type: string
      - in: query
        name: page
        schema:
          type: integer
          default: 1
      - in: query
        name: per_page
        schema:
          type: integer
          default: 15
          maximum: 80
      responses:
        '200':
          description: Photo search results.
  /curated:
    get:
      operationId: getCuratedPhotos
      summary: Curated Photos
      description: Returns real-time curated photos selected by Pexels.
      tags:
      - Photos
      security:
      - apiKeyAuth: []
      parameters:
      - in: query
        name: page
        schema:
          type: integer
      - in: query
        name: per_page
        schema:
          type: integer
          maximum: 80
      responses:
        '200':
          description: Curated photos.
  /photos/{id}:
    get:
      operationId: getPhoto
      summary: Get Photo
      description: Retrieve a specific photo by ID.
      tags:
      - Photos
      security:
      - apiKeyAuth: []
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: A single photo resource.
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'Pexels uses an API-key in the `Authorization` request header.

        Send your key as `Authorization: YOUR_API_KEY` on every request.

        '
externalDocs:
  description: Pexels API Documentation
  url: https://www.pexels.com/api/documentation/