Skip to content
GET /v1/search

Search wallpapers by keyword and category

Try it live

10 free calls per day — no sign-up, no API key. Goes through the oanor gateway.

Custom headers (optional)
api.oanor.com/wallhaven-api

It works. Grab an API key and use it in your project.

Get an API key

Code snippets

curl "https://api.oanor.com/wallhaven-api/v1/search" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/wallhaven-api/v1/search", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/wallhaven-api/v1/search");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/wallhaven-api/v1/search",
    headers={"x-oanor-key": "oanor_test_..."}
)

Example response

A real response from this endpoint, captured by the latest health check.

{
    "data": {
        "page": 1,
        "sort": "favorites",
        "count": 24,
        "query": "mountains",
        "total": 721,
        "category": "anime",
        "wallpapers": [
            {
                "id": "9mjoy1",
                "url": "https://wallhaven.cc/w/9mjoy1",
                "image": "https://w.wallhaven.cc/full/9m/wallhaven-9mjoy1.png",
                "ratio": "1.78",
                "thumb": "https://th.wallhaven.cc/small/9m/9mjoy1.jpg",
                "views": 842422,
                "colors": [
                    "#424153",
                    "#999999",
                    "#cccccc",
                    "#ffffff",
                    "#fdadc7"
                ],
                "purity": "sfw",
                "category": "anime",
                "favorites": 5671,
                "file_size": 15842713,
                "file_type": "image/png",
                "resolution": "3840x2160"
            },
            {
                "id": "72yzje",
                "url": "https://wallhaven.cc/w/72yzje",
                "image": "https://w.wallhaven.cc/full/72/wallhaven-72yzje.jpg",
                "ratio": "1.78",
                "thumb": "https://th.wallhaven.cc/small/72/72yzje.jpg",
                "views": 169559,
                "colors": [
                    "#424153",
                    "#000000",
                    "#333399",
                    "#0066cc",
                    "#66cccc"
                ],
                "purity": "sfw",
                "category": "anime",
                "favorites": 983,
                "file_size": 14696837,
                "file_type": "image/jpeg",
                "resolution": "5120x2880"
            },
            {
                "id": "7p3we9",
                "url": "https://wallhaven.cc/w/7p3we9",
                "image": "https://w.wallhaven.cc/full/7p/wallhaven-7p3we9.png",
                "ratio": "1.78",
                "thumb": "https://th.wallhaven.cc/small/7p/7p3we9.jpg",
                "views": 74811,
                "colors": [
                    "#424153",
                    "#999999",
                    "#abbcda",
                    "#663399",
                    "#ea4c88"
                ],
                "purity": "sfw",
                "category": "anime",
                "favorites": 941,
                "file_size": 10753258,
                "file_type": "image/png",
                "resolution": "7680x4320"
            },
            {
                "id": "y8o7yg",
                "url": "https://wallhaven.cc/w/y8o7yg",
                "image": "https://w.wallhaven.cc/full/y8/wallhaven-y8o7yg.jpg",
                "ratio": "2.25",
                "thumb": "https://th.wallhaven.cc/small/y8/y8o7yg.jpg",
                "views": 61626,
                "colors": [
                    "#999999",
                    "#424153",
                    "#663399",
                    "#333399",
                    "#cccccc"
                ],

…