Photos
Overview
Section titled “Overview”The Photos resource provides fake photo data with URLs, thumbnails, and album relationships.
Endpoints
Section titled “Endpoints”Available Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/photos | List all photos |
| GET | /v1/photos/:id | Get a specific photo |
| GET | /v1/photos/album/:albumId | Get photos by album |
Photo Object
Section titled “Photo Object”{ "id": 1, "albumId": 1, "title": "Beach Sunset", "url": "https://picsum.photos/seed/abc123/800/600", "thumbnailUrl": "https://picsum.photos/seed/abc123/150/150", "createdAt": "2026-01-15T10:30:00.000Z", "updatedAt": "2026-01-15T10:30:00.000Z"}| Field | Type | Description |
|---|---|---|
id |
number |
Unique identifier |
albumId |
number |
ID of the album |
title |
string |
Photo title |
url |
string |
Full-size image URL |
thumbnailUrl |
string |
Thumbnail image URL |
createdAt |
string |
ISO 8601 timestamp |
updatedAt |
string |
ISO 8601 timestamp |
List Photos
Section titled “List Photos”curl https://api.phantomjson.app/v1/photosQuery Parameters
Section titled “Query Parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
page |
number |
1 |
Page number |
limit |
number |
20 |
Items per page (max: 100) |
sort |
string |
— | Sort field and direction |
q |
string |
— | Search query |
fields |
string |
— | Fields to return |
albumId |
number |
— | Filter by album ID |
Response
Section titled “Response”{ "data": [ { "id": 1, "albumId": 1, "title": "Beach Sunset", "url": "https://picsum.photos/seed/abc123/800/600", "thumbnailUrl": "https://picsum.photos/seed/abc123/150/150" } ], "meta": { "total": 750, "page": 1, "limit": 20, "totalPages": 38 }}Get Photo by ID
Section titled “Get Photo by ID”curl https://api.phantomjson.app/v1/photos/1Response
Section titled “Response”{ "data": { "id": 1, "albumId": 1, "title": "Beach Sunset", "url": "https://picsum.photos/seed/abc123/800/600", "thumbnailUrl": "https://picsum.photos/seed/abc123/150/150" }}Get Photos by Album
Section titled “Get Photos by Album”curl https://api.phantomjson.app/v1/photos/album/1Response
Section titled “Response”{ "data": [ { "id": 1, "albumId": 1, "title": "Beach Sunset", "url": "https://picsum.photos/seed/abc123/800/600", "thumbnailUrl": "https://picsum.photos/seed/abc123/150/150" } ], "meta": { "total": 4, "page": 1, "limit": 20, "totalPages": 1 }}Examples
Section titled “Examples”Search Photos
Section titled “Search Photos”curl "https://api.phantomjson.app/v1/photos?q=sunset"Filter by Album
Section titled “Filter by Album”curl "https://api.phantomjson.app/v1/photos?albumId=1"Sort by Title
Section titled “Sort by Title”curl "https://api.phantomjson.app/v1/photos?sort=title:asc"Field Selection
Section titled “Field Selection”curl "https://api.phantomjson.app/v1/photos?fields=id,title,url"Image URLs
Section titled “Image URLs”All photo URLs use Picsum Photos for realistic placeholder images:
- Full size:
https://picsum.photos/seed/{seed}/800/600 - Thumbnail:
https://picsum.photos/seed/{seed}/150/150
Relations
Section titled “Relations”- Album — Each photo belongs to an album (
albumId) - Access photos for a specific album via
/v1/photos/album/:albumId
