Querying Metadata
The metadata endpoints return JSON describing wallpapers, including their analysis results and the URLs you can use to fetch the actual image. Examples below are illustrative rather than live API responses.
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", "url": "/wallpapers/a1b2c3d4.jpg", "width": 3840, "height": 2160, "size_bytes": 2451234, "added_at": "2024-05-01T12:34:56Z", "content_type": "image/jpeg", "thumbnail_url": "/wallpapers/thumbnails/a1b2c3d4.jpg", "brightness": "dark", "aspect_ratio": "16:9", "orientation": "landscape", "luminance": 0.24, "dominant_hue": "warm"}Field notes:
urlandthumbnail_urlare relative paths to cached files. API handlers are also available at/api/wallpapers/{id}/imageand/api/wallpapers/{id}/thumbnail.pathis deliberately omitted from JSON in 2.0.0; this no longer exposes the filesystem location of the original source.idis derived from the source path rather than content. Moving a source file changes its ID.added_aton scanned files reflects the source modification time, not a persistent library import timestamp. Uploaded files initially use their upload time; scans use the file modification time.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,warm,cool,neutral. Querying or searching forbluealiasescool.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 searchable, deterministically sorted, paginated
list. It accepts the filter parameters plus search,
sort, page and limit.
curl "http://localhost:8519/api/wallpapers?search=mountain&orientation=landscape&sort=filename:asc&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 }}searchis case-insensitive and requires every space-separated term to match the filename or indexed metadata.sortdefaults toid:ascfor API compatibility and acceptsid,date_added,filename,size,dimensionsorbrightnesswith:ascor:desc. The WebUI independently defaults todate_added:desc.pagedefaults to1.limitdefaults to50and is capped at200.- When search or 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.