Pexafy

Pexafy API

Semantic image search across free stock-photo libraries, among them Unsplash, Pexels and Pixabay, behind a single endpoint and a single response schema. The…

Media & content#photography

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

Semantic image search across free stock-photo libraries, among them Unsplash, Pexels and Pixabay, behind a single endpoint and a single response schema. The live list of sources is served by GET /api/v1/facets/sources.

One Pexafy request replaces the 3 to 5 provider calls, the response normalisation and the de-duplication you would otherwise write and maintain yourself.

What it does

  • Natural-language search — a tired developer at a desk, warm lamp light is ranked by meaning, not keyword overlap. Queries work in 100+ languages.
  • Image-to-image search — post an image, get visually similar ones.
  • Filters — colour (hex or name), orientation, licence, source, photographer, date.
  • One schema — every photo carries the same fields whatever the source: id, urls, dimensions, dominant colours, photographer, licence and the attribution string to display.

Access

  • API key issued immediately at pexafy.com/dashboard/api-keys/create — no application review, no mandatory download-tracking callback.
  • A free plan is available, no credit card required. Plans and quotas: pexafy.com/pricing.
  • Also exposed as an MCP server at https://mcp.pexafy.com/mcp for LLM clients (details).

Endpoints 20

Search

  • GETSearch photos by text/api/v1/search/photosSearch the photo library with natural language, not keywords. Pexafy understands the *meaning, mood and story* of a scene, so full descriptive sentences…
  • POSTSearch photos by image/api/v1/search/photosGive the search a picture and get visually similar photos in return — same subject, composition, colors or style. Ideal for finding alternatives to a photo…

Photos

  • GETGet a photo/api/v1/photos/:photo_idRetrieve the full details of a single photo by its Pexafy photo_id (the identifier returned by every search result). You get everything search returns, plus…
  • GETFind similar photos/api/v1/photos/:photo_id/similarReturn photos that look similar to a given one — a quick way to offer alternatives or build a visually consistent set. The reference photo itself is never…

Facets

  • GETList colors/api/v1/facets/colorsList the dominant colors you can filter photos by. Each entry has a name (pass it as color_name when searching) and its hex code — handy for building a color…
  • GETList sources/api/v1/facets/sourcesList the photo providers available in the library (for example Unsplash, Pexels, Pixabay). Use a name as the source filter when searching. Each entry also…
  • GETList orientations/api/v1/facets/orientationsList the available photo shapes — landscape, portrait and square. Use a name as the orientation filter when searching.
  • GETList license types/api/v1/facets/licensesList the license types available in the library. Use a name as the license_type filter when searching to keep only photos you are allowed to use in a given way.
  • GETSearch photographers/api/v1/facets/photographers/suggest?q=adrien oliAutocomplete photographer names as the user types. Pass a partial name or username in q and get back the best-matching photographers, the most prolific first.…
  • GETGet a photographer's profiles/api/v1/facets/photographers/:usernameReturn every profile for a photographer across providers. The same username can exist on several sources (Unsplash, Pexels, Pixabay) and may even be different…

Collections

  • GETList collections/api/v1/collectionsList all the collections (saved photo albums) that belong to your account, newest first. Each entry includes its name, description, photos_count and…
  • POSTCreate a collection/api/v1/collectionsCreate a new collection (a saved album of photos). Your plan may limit how many collections you can have; if you reach the limit you'll get a 403 asking you…
  • GETGet a collection/api/v1/collections/:collection_idRetrieve a single collection together with the photos it contains, the most recently added first.
  • DELETEDelete a collection/api/v1/collections/:collection_idPermanently delete a collection and remove every photo saved in it. This cannot be undone (the original photos in the library are not affected).
  • POSTAdd a photo to a collection/api/v1/collections/:collection_id/photosSave a photo into a collection. The photo automatically becomes the collection's cover if it is the first one added. Adding the same photo twice returns a 409.
  • DELETERemove a photo from a collection/api/v1/collections/:collection_id/photos/:photo_idRemove a photo from a collection. If it was the cover, the most recently added remaining photo becomes the new cover.

Usage

  • GETCurrent month usage/api/v1/usageSee how many API requests you have made during the current billing month and how many you have left under your plan. Counters update in real time. The…
  • GETDaily usage history/api/v1/usage/dailyGet your request count for each day over a recent window (up to the last 90 days), oldest day first. Useful for drawing a usage chart. Days older than 90 days…
  • GETMonthly usage history/api/v1/usage/monthlyGet your total request count for each month (up to the last 24), the most recent month first. Useful for tracking long-term usage and billing history.
  • GETUsage by API key/api/v1/usage/by-keyBreak your usage down by individual API key — see this month's and today's request count for each active key. Handy for spotting which key (or which app)…

API details

Base URL
https://api.pexafy.com
Authentication
An API key in the x-api-key header
Operations
20 operations on 17 pathsGET 15POST 3DELETE 2
Main resources
Collections 6Facets 6Usage 4Photos 2Search 2
Response formats
application/json
Description format
OpenAPI 3.1.0, API version v1.0.0

How to test the Pexafy API in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the Pexafy API collection, without the publisher's secrets.
  3. Add your credentialsThis API uses an API key in the x-api-key header. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “Search photos by text” (GET /api/v1/search/photos), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the Pexafy API?

Semantic image search across free stock-photo libraries, among them Unsplash, Pexels and Pixabay, behind a single endpoint and a single response schema. The… It is listed under Media & content and has 20 endpoints.

Who publishes the Pexafy API?

It is listed from Pexafy's public API description (an OpenAPI document), not published by Pexafy on Swastik Codes. Anyone who controls pexafy.com can claim the profile by adding a DNS TXT record.

What is the base URL of the Pexafy API?

Requests go to https://api.pexafy.com. Endpoint paths are added to this base URL.

How do I authenticate with the Pexafy API?

With an API key in the x-api-key header.

How many endpoints does the Pexafy API have?

20 operations on 17 paths (15 GET, 3 POST, 2 DELETE). The largest groups are Collections, Facets, Usage, Photos.

Is forking the Pexafy API free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.