Skip to content

Albums

The Albums resource provides fake photo album data with titles and user relationships.

Available Endpoints

MethodEndpointDescription
GET/v1/albumsList all albums
GET/v1/albums/:idGet a specific album
GET/v1/photos/album/:albumIdGet album's photos
{
"id": 1,
"userId": 1,
"title": "Vacation Photos",
"createdAt": "2026-01-15T10:30:00.000Z",
"updatedAt": "2026-01-15T10:30:00.000Z"
}
Field Type Description
id number Unique identifier
userId number ID of the user
title string Album title
createdAt string ISO 8601 timestamp
updatedAt string ISO 8601 timestamp
Terminal window
curl https://api.phantomjson.app/v1/albums
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
userId number Filter by user ID
{
"data": [
{
"id": 1,
"userId": 1,
"title": "Vacation Photos"
}
],
"meta": {
"total": 150,
"page": 1,
"limit": 20,
"totalPages": 8
}
}
Terminal window
curl https://api.phantomjson.app/v1/albums/1
{
"data": {
"id": 1,
"userId": 1,
"title": "Vacation Photos"
}
}
Terminal window
curl https://api.phantomjson.app/v1/photos/album/1
{
"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
}
}
Terminal window
curl "https://api.phantomjson.app/v1/albums?q=vacation"
Terminal window
curl "https://api.phantomjson.app/v1/albums?userId=1"
Terminal window
curl "https://api.phantomjson.app/v1/albums?sort=title:asc"
Terminal window
curl "https://api.phantomjson.app/v1/albums?fields=id,title"
  • User — Each album belongs to a user (userId)
  • Photos — Each album has many photos (access via /v1/photos/album/:albumId)
  • Access albums for a specific user via /v1/users/:id/albums