# Wallhaven Wallpapers Scraper (`b2b_lead_generation/wallhaven-wallpapers-scraper`) Actor

Extract Wallhaven wallpapers into clean JSON, CSV, or Excel. Search by keyword and sorting to easily export wallpaper IDs, metadata, views, favorites, and image paths.

- **URL**: https://apify.com/b2b_lead_generation/wallhaven-wallpapers-scraper.md
- **Developed by:** [B2B Lead Generation](https://apify.com/b2b_lead_generation) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Wallhaven Wallpapers Scraper

![Wallhaven Wallpapers Scraper cover](https://images.bigibyte.com/cdn-cgi/image/width=1260,height=540,fit=cover,format=webp/apify-actors-covers/wallhaven-wallpapers-scraper-cover.png)

Collect wallpaper metadata from Wallhaven search results. Search using keywords and sorting preferences, then export structured wallpaper information in JSON, CSV, Excel, or other supported Apify dataset formats.

Retrieve wallpaper IDs, image URLs, tags-related metadata, popularity statistics, resolutions, dimensions, file details, and thumbnail URLs.

### What This Actor Extracts

- **Wallpaper Details:** Wallpaper IDs, titles-related metadata, and image URLs.
- **Popularity Statistics:** View counts and favorites.
- **Classification:** Content purity and wallpaper categories.
- **Image Dimensions:** Width, height, resolution, and aspect ratio.
- **File Information:** File size, file type, and creation date.
- **Image References:** Original image paths, thumbnail URLs, and color palettes.
- **Source Information:** Original source references when available.

Each successful wallpaper record is saved as a separate dataset item.

### Use Cases

- **Wallpaper Research:** Collect wallpaper metadata for catalogs and mood boards.
- **Trend Tracking:** Compare public wallpaper view counts and favorites.
- **Design Research:** Explore image resolutions, categories, and color palettes.
- **Export Pipelines:** Store wallpaper metadata in CSV, Excel, or JSON.
- **Dashboard Integration:** Maintain datasets of wallpaper URLs and image dimensions.

### Input Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `search` | Operation mode. Currently supports `search`. |
| `q` | string | `nature` | Search keyword. |
| `sorting` | string | `toplist` | Sorting preference for search results. |
| `maxItems` | integer | `100` | Maximum number of successful output records. |
| `requestDelayMs` | integer | `1500` | Delay between requests in milliseconds. |
| `userAgent` | string | `ActorResearch/1.0` | User-Agent value used for requests. |
| `timeoutSecs` | integer | `300` | Maximum run duration in seconds. |
| `requestTimeoutSecs` | integer | `30` | Maximum duration for an individual request. |
| `proxyConfiguration` | object | Proxy off | Optional proxy configuration. |

### Example Input

```json
{
  "mode": "search",
  "q": "nature",
  "sorting": "toplist",
  "maxItems": 50,
  "requestDelayMs": 1500
}
```

### Output Example

```json
{
  "wallpaperId": "yqkl97",
  "url": "https://wallhaven.cc/w/yqkl97",
  "short_url": "https://whvn.cc/yqkl97",
  "views": 24965,
  "favorites": 237,
  "purity": "sfw",
  "category": "anime",
  "dimension_x": 2074,
  "dimension_y": 1166,
  "resolution": "2074x1166",
  "ratio": "1.78",
  "file_size": 976307,
  "file_type": "image/jpeg",
  "created_at": "2026-10-10 04:08:04",
  "colors": [
    "#424153",
    "#663399",
    "#999999",
    "#333399",
    "#fdadc7"
  ],
  "path": "https://w.wallhaven.cc/full/yq/wallhaven-yqkl97.jpg",
  "thumbs": {
    "large": "https://th.wallhaven.cc/lg/yq/yqkl97.jpg",
    "original": "https://th.wallhaven.cc/orig/yq/yqkl97.jpg",
    "small": "https://th.wallhaven.cc/small/yq/yqkl97.jpg"
  },
  "scrapedAt": "2026-10-12T05:30:00+00:00"
}
```

### Output Fields

| Field | Type | Description |
|---|---|---|
| `wallpaperId` | string | Unique wallpaper identifier. |
| `url` | string | Full URL of the wallpaper page. |
| `short_url` | string | Short URL for the wallpaper. |
| `views` | integer | Number of wallpaper views. |
| `favorites` | integer | Number of users who favorited the wallpaper. |
| `purity` | string | Content classification, such as `sfw`. |
| `category` | string | Wallpaper category. |
| `dimension_x` | integer | Image width in pixels. |
| `dimension_y` | integer | Image height in pixels. |
| `resolution` | string | Image resolution, such as `2074x1166`. |
| `ratio` | string | Image aspect ratio. |
| `file_size` | integer | Image file size in bytes. |
| `file_type` | string | Image MIME type. |
| `created_at` | string | Wallpaper creation date. |
| `colors` | array | Array of image color values. |
| `path` | string | Original wallpaper image URL. |
| `thumbs` | object | Thumbnail URLs in large, original, and small formats. |
| `scrapedAt` | string | Timestamp indicating when the record was collected. |

### FAQ

#### What information does this actor collect?

It collects wallpaper identifiers, image URLs, popularity statistics, categories, resolutions, file details, color values, and available source references.

#### Can I search for wallpapers by keyword?

Yes. Provide your search term through the `q` parameter. For example, use `nature`, `anime`, or `landscape`.

#### Can I sort wallpaper results?

Yes. Use the `sorting` parameter to specify your preferred sorting option.

#### Which export formats are supported?

You can export collected records as JSON, CSV, Excel, and other supported Apify dataset formats.

#### Can I schedule automatic collections?

Yes. Use Apify schedules to run the actor periodically and refresh your wallpaper metadata dataset.

### Trademark Notice

Wallhaven and its related names, logos, and trademarks belong to their respective owners. This actor is an independent tool and does not imply affiliation, sponsorship, endorsement, or partnership with Wallhaven.

### Disclaimer

This actor is an independent data collection tool. Wallpaper images and associated content may belong to their respective creators or copyright holders. Users are responsible for verifying applicable usage rights and complying with relevant laws and website policies.

### Is Web Scraping Legal?

This actor collects publicly accessible wallpaper metadata without bypassing login screens, paywalls, or technical security measures. How collected information can be used depends on applicable laws and Wallhaven's policies.

- **Personal Data:** Public wallpaper records may contain creator names or other identifying information. Handle personal data in accordance with applicable privacy laws, including GDPR and CCPA where relevant.
- **Copyright and Licensing:** Wallpaper images, artwork, and source content may be copyrighted. Collecting image URLs does not grant permission to download, reproduce, or redistribute the images.
- **Platform Terms and Rate Limits:** Respect Wallhaven's policies, content licences, and request limits.
- **Disclaimer:** This information is general guidance, not legal advice. Consult a qualified legal professional for advice about a specific use case.

[Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

# Actor input Schema

## `mode` (type: `string`):

What to fetch. search pulls Wallhaven search results.

## `q` (type: `string`):

Passed to the source as q (tested value: nature).

## `sorting` (type: `string`):

Passed to the source as sorting (tested value: toplist).

## `maxItems` (type: `integer`):

Stop after this many successful rows. Hard max is 1000.

## `requestDelayMs` (type: `integer`):

Milliseconds to wait between requests. Default keeps pace under 40 req/min. Raise if you see 429.

## `userAgent` (type: `string`):

User-Agent header sent with each request.

## `timeoutSecs` (type: `integer`):

Overall run budget in seconds.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout in seconds.

## `proxyConfiguration` (type: `object`):

Optional proxy. Leave off unless you need it.

## Actor input object example

```json
{
  "mode": "search",
  "q": "nature",
  "sorting": "toplist",
  "maxItems": 100,
  "requestDelayMs": 1500,
  "userAgent": "ActorResearch/1.0",
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Dataset rows in the overview table.

## `dataset` (type: `string`):

Full dataset for this run.

## `items` (type: `string`):

Dataset items as JSON.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "q": "nature",
    "sorting": "toplist"
};

// Run the Actor and wait for it to finish
const run = await client.actor("b2b_lead_generation/wallhaven-wallpapers-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "q": "nature",
    "sorting": "toplist",
}

# Run the Actor and wait for it to finish
run = client.actor("b2b_lead_generation/wallhaven-wallpapers-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "q": "nature",
  "sorting": "toplist"
}' |
apify call b2b_lead_generation/wallhaven-wallpapers-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,b2b_lead_generation/wallhaven-wallpapers-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/9MBVqVwxq8lqSwHoC/builds/TDwUXWhXkud0HbMSj/openapi.json
