Unsplash API

⭐ Beginner's Pick Photography / OAuth Advanced HTTPS
Varies by plan (check documentation)

Overview

Unsplash is a free high-resolution photography platform, and its API gives you programmatic access to over 3 million professional photos you can use in your projects. You can search photos by keyword, fetch curated collections, or get a random photo with a single request. It is one of the most beginner-friendly image APIs with generous free tier limits.

💡

Beginner Tip

Use the /photos/random endpoint with a query parameter to get a relevant photo instantly without needing to paginate through results — great for placeholder images in prototypes.

Available Data

image URLs in multiple sizes
photographer credit
image dimensions
download link
color data
Use case: Integrate photography data into web and mobile applications

Example Response

JSON Response
{
  "id": "Dwu85P9SOIk",
  "urls": {
    "full": "https://images.unsplash.com/photo-...",
    "regular": "https://images.unsplash.com/photo-...?w=1080",
    "thumb": "https://images.unsplash.com/photo-...?w=200"
  },
  "width": 4000,
  "height": 3000,
  "user": {
    "name": "John Doe",
    "username": "johndoe"
  }
}

Field Reference

id Unique identifier for the photo on Unsplash.
description Human-readable description of the photo, if provided by the photographer (may be null).
urls.regular URL to a 1080px-wide version of the photo suitable for most web uses.
urls.thumb URL to a small 200px thumbnail version of the photo.
user.name Display name of the photographer who took the photo.
likes Number of likes the photo has received from Unsplash users.

Implementation Example

const url = "https://unsplash.com/developers";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "Authorization": "Bearer YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

HTTP 401 Unauthorized The Authorization header is missing or the access key is incorrect.
Register your app on unsplash.com/developers and pass your Access Key as Authorization: Client-ID YOUR_ACCESS_KEY.
HTTP 403: Rate Limit Exceeded The free demo tier allows only 50 requests per hour.
Apply for production access on the Unsplash developer portal to increase your rate limit to 5,000 requests per hour.
HTTP 404 Not Found on /photos/:id The photo ID used in the URL does not exist or has been removed by the photographer.
Use a search endpoint first to retrieve valid photo IDs, then reference them in detail requests.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 5/20
🔒 Security 15/15
🛠 Developer XP 3/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth OAuth
HTTPS REQUIRED
CORS UNKNOWN
Category Photography
Difficulty Advanced
Verified: 2026-04-04

Alternatives to Unsplash

Technical alternatives for different use cases.

Massive photo library with Creative Commons filtering

Better For

Finding niche and historical photography

Trade-off

Commercial-ready stock photography

Curated high-quality stock photography

Better For

User-generated content and image hosting

Trade-off

Professional stock photos for commercial use

Free stock photos and videos with generous API limits

Better For

Combined photo and video search in one API

Trade-off

Photo quality curation and artistic style

CC0 licensed images, illustrations, and vectors

Better For

Truly free images with no attribution required (CC0)

Trade-off

Professional photography quality and curation

Recipes Using Unsplash

Build something with this API. Each recipe includes step-by-step instructions and code outlines.

Similar APIs

View All →