Querying Metadata
The metadata endpoints return JSON describing wallpapers, including their analysis results and the URLs you can use to fetch the actual image.
Endpoints
Section titled “Endpoints”| Method | Path | Returns |
|---|---|---|
GET | /api/wallpapers | A paginated, filterable list |
GET | /api/wallpapers/random | One random matching wallpaper |
GET | /api/wallpapers/{id} | A single wallpaper by ID |
Wallpaper object
Section titled “Wallpaper object”Each wallpaper is represented as:
{ "id": "a1b2c3d4", "filename": "sunset.jpg", "path": "/home/you/Pictures/Wallpapers/sunset.jpg", "url": "/api/wallpapers/a1b2c3d4/image", "width": 3840, "height": 2160, "size_bytes": 2451234, "added_at": "2024-05-01T12:34:56Z", "content_type": "image/jpeg", "thumbnail_url": "/api/wallpapers/a1b2c3d4/thumbnail", "brightness": "dark", "aspect_ratio": "16:9", "orientation": "landscape", "luminance": 0.24, "dominant_hue": "warm"}Field notes:
urlandthumbnail_urlare relative paths to the direct-image endpoints.brightnessis one oflight,dark,medium.aspect_ratiois one of16:9,4:3,ultrawide,square,portrait,custom.orientationis one oflandscape,portrait,square.dominant_hueis one ofred,green,blue,warm,cool,neutral.luminanceis a float from 0 to 1.
See Automatic image analysis for how these values are derived.
Listing wallpapers
Section titled “Listing wallpapers”GET /api/wallpapers returns a paginated list. It accepts all
filter parameters plus page and limit.
curl "http://localhost:8519/api/wallpapers?orientation=landscape&page=1&limit=20"The response wraps the results with pagination metadata:
{ "wallpapers": [ /* … Wallpaper objects … */ ], "pagination": { "total": 128, "page": 1, "limit": 20, "total_pages": 7 }}pagedefaults to1.limitdefaults to50and is capped at200.- When any filter is applied, the response also includes a
filtersobject echoing the parsed filter values.
A random or single wallpaper
Section titled “A random or single wallpaper”curl "http://localhost:8519/api/wallpapers/random?brightness=dark"curl "http://localhost:8519/api/wallpapers/<id>"Both return a single Wallpaper object. random returns 404 when no wallpaper
matches the filters; an unknown {id} also returns 404.
Related
Section titled “Related”- Retrieving images — turn a
urlinto an actual image. - Endpoint reference — the full endpoint list.