Unsplash Photo Search

https://api.sandbase.ai/v1/api/unsplash/search-photos

Search Unsplash for free stock photos by keyword. Returns image URLs in several sizes, dimensions, alt text, the photographer's name and profile, and the photo's Unsplash page.

Price
From $0.0033USD / call
Method
POST
Response
JSON
Parameters
1 required · 4 optional

Playground

Input
Keyword or phrase to search Unsplash photos for, e.g. "coffee" or "minimal workspace".
Only return photos with this dominant color tone. Omit for any color.
120
Maximum number of photos to return (1-20, default 20). You are billed per photo returned, so a lower limit costs less. Range: 1 to 20.
Order results by best match (relevant, the default) or newest first (recent).
Only return photos with this orientation. Omit for any orientation.
OutputReady

Your output will appear here

Complete the inputs, then click Run.

API README

Unsplash Photo Search API

Search Unsplash for free stock photos by keyword. Returns image URLs in several sizes, dimensions, alt text, the photographer's name and profile, and the photo's Unsplash page.

Request

curl -X POST "https://api.sandbase.ai/v1/run" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "unsplash/search-photos", "limit": 2, "query": "coffee"}'

The result is returned in outputs[0].data. Lookups that find nothing fail with a not-found error.

Parameters

NameTypeRequiredDescription
querystringYesKeyword or phrase to search Unsplash photos for, e.g. "coffee" or "minimal workspace".
colorstringNoOnly return photos with this dominant color tone. Omit for any color. One of: black_and_white, black, white, yellow, orange, red, purple, magenta, green, teal, blue.
limitintegerNoMaximum number of photos to return (1-20, default 20). You are billed per photo returned, so a lower limit costs less.
orientationstringNoOnly return photos with this orientation. Omit for any orientation. One of: landscape, portrait, square.
sortBystringNoOrder results by best match (relevant, the default) or newest first (recent). One of: relevant, recent.

Pricing

Billed at the actual cost of each call: about $0.00165 per result returned, up to $0.0336 per request (about $0.0033 for the request above). A call can cost more when the first data source fails and another one answers. Failed calls and lookups that find nothing are not charged.

Explore more

Related APIs

All APIs
APIPriceResponse
UnsplashFrom $0.0033 per callJSON

Questions

FAQ

How do I use the Unsplash Photo Search API?

Send a POST request to https://api.sandbase.ai/v1/api/unsplash/search-photos with your SandBase API key in the Authorization header (Bearer) and the parameters as a JSON body. You can also try it in the Playground on this page without writing code.

How much does the Unsplash Photo Search API cost?

From $0.0033 per call, billed from your SandBase balance. You are only charged for calls you make; there is no subscription.

What parameters does the Unsplash Photo Search API accept?

Required: query (string). Optional: color (one of black_and_white, black, white, yellow, orange, red, purple, magenta, green, teal, blue), limit (integer), sortBy (one of relevant, recent) and orientation (one of landscape, portrait, square). The Parameters table and the Playground on this page list every field.

What does the Unsplash Photo Search API return?

A JSON response returned in the same HTTP request (synchronous).

Do I need a Unsplash developer account or API key?

No. Unsplash Photo Search runs through SandBase, so one SandBase API key covers this endpoint and every other API and model in the catalog. You do not need to apply for Unsplash API access separately.