Discover/pexels.com API
live

pexels.com APIpexels.com

Access Pexels stock photos and videos via API. Search by keyword, filter by color/orientation, browse trending content, photographer galleries, and challenges.

Endpoints
8
Updated
3mo ago
Try it
Page number for pagination
Filter by size: large, medium, small
Filter by dominant color (e.g. 'red', 'blue', 'green', 'orange', 'yellow', 'black', 'white
Search keyword (e.g. 'nature', 'office', 'sunset')
Number of results per page
Filter by orientation: landscape, portrait, square
api.parse.bot/scraper/f2821378-6172-4989-855b-48dce77e55be/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Use it in your codegrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/f2821378-6172-4989-855b-48dce77e55be/search_photos?page=1&query=nature&per_page=2' \
  -H 'X-API-Key: $PARSE_API_KEY'
All endpoints · 8 totalclick to expand

Search for photos on Pexels by keyword. Returns paginated results with optional filters for color, orientation, and size.

Input
ParamTypeDescription
pageintegerPage number for pagination
sizestringFilter by size: large, medium, small
colorstringFilter by dominant color (e.g. 'red', 'blue', 'green', 'orange', 'yellow', 'black', 'white')
queryrequiredstringSearch keyword (e.g. 'nature', 'office', 'sunset')
per_pageintegerNumber of results per page
orientationstringFilter by orientation: landscape, portrait, square
Response
{
  "type": "object",
  "fields": {
    "data": "array of photo objects with id, type, attributes (title, description, width, height, user, tags, image URLs)",
    "pagination": "object with current_page, total_pages, total_results"
  },
  "sample": {
    "data": {
      "data": [
        {
          "id": "12377231",
          "type": "photo",
          "attributes": {
            "id": 12377231,
            "tags": [
              "botanical",
              "forest",
              "nature"
            ],
            "user": {
              "id": 175964361,
              "last_name": "Lysov",
              "first_name": "Danil"
            },
            "image": {
              "large": "https://images.pexels.com/photos/12377231/pexels-photo-12377231.jpeg?auto=compress&cs=tinysrgb&w=1440",
              "small": "https://images.pexels.com/photos/12377231/pexels-photo-12377231.jpeg?auto=compress&cs=tinysrgb&h=130",
              "medium": "https://images.pexels.com/photos/12377231/pexels-photo-12377231.jpeg?auto=compress&cs=tinysrgb&w=750"
            },
            "title": "A Green Trees in the Forest",
            "width": 1965,
            "height": 3488,
            "description": "Dense greenery in a tranquil forest setting with tall trees and natural light."
          }
        }
      ],
      "pagination": {
        "total_pages": 4000,
        "current_page": 1,
        "total_results": 10000
      }
    },
    "status": "success"
  }
}

About the pexels.com API

This API exposes 8 endpoints covering Pexels stock photos and videos, including keyword search, trending feeds, photographer galleries, and challenge listings. The search_photos endpoint accepts filters for color, orientation, and size and returns paginated photo objects with full image URLs, tags, dimensions, and uploader metadata. Video search follows the same pattern and includes direct MP4 source links.

Search and Filter

The search_photos and search_videos endpoints both accept a required query string and optional filters: orientation (landscape, portrait, square), size (large, medium, small), and — for photos — color (red, blue, green, orange, yellow, black, white). Both return a data array of media objects with id, type, attributes (title, description, width, height, user, tags, and URLs), plus a pagination object carrying current_page, total_pages, and total_results.

Media Details and Photographer Galleries

Use get_media_details with a numeric media_id (sourced from any search result) to retrieve the full attribute set for a single photo or video, including all tags, translation data, and every available image or video URL. The get_photographer_gallery endpoint accepts a user_id (the user.id field in any search result) and returns that photographer's full upload history in recency order, paginated with per_page and page controls.

Trending Feeds and Cursor Pagination

get_trending_photos and get_trending_videos return the content currently featured on Pexels. These endpoints use cursor-based pagination rather than page numbers — the response pagination object includes a cursor string and a more_data boolean. Pass the cursor value as the seed parameter to retrieve the next page. Video results include file source URLs and preview URLs.

Suggestions and Challenges

get_search_suggestions takes a query prefix (e.g. "mount") and returns an attributes object with the original prefix and an array of autocomplete suggestions. get_challenges lists active and past Pexels photo/video challenges with title, short_description, prize_title, end_date, medium_type, and media_count, filtered by state (active or past).

Common use cases
  • Building a stock media search UI with keyword, color, and orientation filtering via search_photos
  • Populating a trending content carousel using cursor-paginated results from get_trending_photos
  • Displaying a photographer's full portfolio by fetching their gallery with get_photographer_gallery
  • Embedding video backgrounds by retrieving MP4 source URLs from search_videos or get_trending_videos
  • Implementing search autocomplete using prefix-based suggestions from get_search_suggestions
  • Listing active creative challenges and their prize details using get_challenges with state=active
  • Fetching full metadata for a known media asset by ID using get_media_details for tags and dimensions
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000250 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does Pexels have an official developer API?+
Yes. Pexels offers an official API at https://www.pexels.com/api/ covering photo and video search, curated collections, and individual media lookup. The Parse API covers additional surfaces such as trending feeds, photographer galleries, search suggestions, and challenges that the official API does not expose.
What does the `search_photos` color filter actually accept?+
The color parameter accepts one of seven named values: red, blue, green, orange, yellow, black, or white. It filters results by the dominant color of the photo. Hex codes and other named colors are not supported by this parameter.
How does pagination differ between search endpoints and trending endpoints?+
Search endpoints (search_photos, search_videos, get_photographer_gallery, get_challenges) use standard page-number pagination with page, per_page, current_page, total_pages, and total_results. Trending endpoints (get_trending_photos, get_trending_videos) use cursor-based pagination: pass the cursor string from the previous response's pagination object as the seed input to retrieve the next batch, and check more_data to know if additional pages exist.
Does the API return individual video file resolutions or quality variants?+
Video results include a src URL and a preview_src URL per video object. Separate resolution variants (e.g. 1080p, 720p) are not enumerated as distinct fields in the current response shape. You can fork this API on Parse and revise it to add an endpoint that returns per-resolution file variants if your use case requires them.
Can I retrieve a specific Pexels collection or curated set through this API?+
No collection or curated-set endpoint is currently included. The API covers keyword search, trending feeds, photographer galleries, challenges, and search suggestions. You can fork this API on Parse and revise it to add a collections endpoint targeting specific curated content.
Page content last updated . Spec covers 8 endpoints from pexels.com.
Related APIs in OtherSee all →
duden.de API
Get German verb conjugations, parts of speech, and usage frequency from Duden's comprehensive database. Quickly look up how to conjugate any German verb across all tenses and moods.
git-scm.com API
Access comprehensive Git documentation, browse command references across different versions, and explore chapters from the Pro Git book. Search Git documentation and glossary terms to quickly find answers about Git commands and concepts.
theresanaiforthat.com API
Search and discover AI tools across different tasks, get detailed information about specific tools, browse available deals, and stay updated on the latest tools. Find the perfect AI solution for your needs by filtering by task category or checking featured and trending tools.
identify.plantnet.org API
Identify and explore plant species by searching through Pl@ntNet's comprehensive botanical database to access detailed information like taxonomic families, genera, species descriptions, photos, and community observations. Track plant distributions, view contribution trends, and discover expert contributors within the platform's collaborative plant identification community.
lotteryusa.com API
Check the latest winning numbers and jackpot amounts across all US lotteries, and view detailed prize breakdowns by state and game. Stay updated on lottery results instantly without visiting multiple lottery websites.
indiankanoon.org API
indiankanoon.org API
shamela.ws API
Search and browse one of the largest collections of Arabic and Islamic books, exploring thousands of titles by category, author, or full-text content. Access detailed book information, read specific pages, and discover newly added works to build your digital Islamic library.
oeis.org API
Search OEIS for integer sequences by keyword, A-number, or known terms, then retrieve full sequence entries and b-file term data.
Pexels API – Stock Photos & Videos Search · Parse