# Unsplash Image Scraper (`shahidirfan/unsplash-image-scraper`) Actor

Scrape high-quality images from Unsplash in bulk. Extract metadata, download entire collections, and automate image research without API limits. Perfect for designers, researchers, and content creators building image libraries at scale.

- **URL**: https://apify.com/shahidirfan/unsplash-image-scraper.md
- **Developed by:** [Shahid Irfan](https://apify.com/shahidirfan) (community)
- **Categories:** Automation, Developer tools, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Unsplash Image Scraper

Extract high-quality image metadata and download URLs from Unsplash with ease. Collect image dimensions, descriptions, primary colors, likes, photographer details, and direct download links at scale. Perfect for stock photography research, AI training dataset generation, design asset collection, and marketing analysis.

---

### Features

- **Multi-URL Support** — Extract images from search result URLs, topic feeds, curated collections, and user profiles.
- **Keyword Search** — Search for photos dynamically using any keywords or search phrases.
- **Photographer Insights** — Collect artist details including name, username, portfolio link, bio, and profile picture.
- **Deep Image Metadata** — Extract hex color codes, likes count, aspect ratio dimensions, and description text.
- **Clean Datasets** — Automatically filters out null, empty, or redundant data values for ready-to-use results.
- **Dynamic Pagination** — Automatically navigates through search results to meet your desired target count.

---

### Use Cases

#### AI Training Datasets

Build high-quality image datasets for machine learning models, computer vision systems, and text-to-image AI generators.

#### Design and Creative Assets

Aggregate and curate lists of free, high-resolution imagery for blogs, mobile applications, web designs, and slide presentations.

#### Social Media and Marketing Research

Monitor trending visual content, color schemes, and engagement metrics (likes) to optimize your brand's visual marketing strategy.

#### Photographer and Artist Portfolio Analysis

Identify popular photographers and analyze their most engaged and liked photos on the platform.

---

### Input Parameters

The actor accepts the following input parameters:

| Parameter            | Type    | Required | Default                     | Description                                                                                                   |
| -------------------- | ------- | -------- | --------------------------- | ------------------------------------------------------------------------------------------------------------- |
| `url`                | String  | No       | —                           | Unsplash URL to scrape (e.g. search, collection, topic, user profile). If provided, it overrides the keyword. |
| `keyword`            | String  | No       | `"spring"`                  | Search keyword (e.g., 'spring', 'nature') to search for photos if no URL is provided.                         |
| `results_wanted`     | Integer | No       | `20`                        | Maximum number of images to extract.                                                                          |
| `max_pages`          | Integer | No       | `5`                         | Maximum number of result pages to paginate.                                                                   |
| `proxyConfiguration` | Object  | No       | `{ "useApifyProxy": true }` | Proxy settings to bypass rate limits and geographic restrictions.                                             |

---

### Output Data

Each item in the dataset contains the following fields:

| Field             | Type    | Description                                 |
| ----------------- | ------- | ------------------------------------------- |
| `id`              | String  | Unique identifier of the photo              |
| `slug`            | String  | Unsplash slug for the photo                 |
| `created_at`      | String  | Date and time when the photo was uploaded   |
| `updated_at`      | String  | Date and time of the last update            |
| `width`           | Integer | Photo width in pixels                       |
| `height`          | Integer | Photo height in pixels                      |
| `color`           | String  | Primary hex color code of the image         |
| `blur_hash`       | String  | Image placeholder blur hash                 |
| `description`     | String  | Description or alt description of the photo |
| `alt_description` | String  | Alternate image description                 |
| `url`             | String  | URL of the photo page on Unsplash           |
| `image_url`       | String  | Direct URL to the regular-sized image       |
| `download_url`    | String  | Direct download link for the photo          |
| `likes`           | Integer | Number of likes the photo has received      |
| `username`        | String  | Photographer's Unsplash username            |
| `user_name`       | String  | Photographer's full name                    |

---

### Usage Examples

#### Basic Search Extraction

Extract the first 20 photos for a keyword query:

```json
{
    "keyword": "nature",
    "results_wanted": 20
}
````

#### Scraping from a Search URL

Extract 50 images directly from an Unsplash search page URL:

```json
{
    "url": "https://unsplash.com/s/photos/spring-flowers",
    "results_wanted": 50,
    "max_pages": 10
}
```

#### Scraping a User Profile

Extract photos uploaded by a specific artist or organization:

```json
{
    "url": "https://unsplash.com/@nasa",
    "results_wanted": 30
}
```

***

### Sample Output

```json
{
    "id": "abc123XYZ",
    "slug": "pink-flowers-in-bloom",
    "created_at": "2026-05-01T12:00:00Z",
    "updated_at": "2026-05-15T08:30:00Z",
    "width": 6000,
    "height": 4000,
    "color": "#f3a5b0",
    "blur_hash": "LhPZ$#~q%MIU?wIUt7WBoffRj[ay",
    "description": "A beautiful close-up of pink cherry blossoms in full bloom during spring.",
    "alt_description": "pink cherry blossoms",
    "url": "https://unsplash.com/photos/pink-flowers-in-bloom",
    "image_url": "https://images.unsplash.com/photo-12345-abcde?w=1080&fit=max",
    "download_url": "https://unsplash.com/photos/abc123XYZ/download",
    "likes": 342,
    "username": "nature_photographer",
    "user_name": "Jane Doe"
}
```

***

### Tips for Best Results

#### Leverage Proxies

- Always enable proxy configuration when running large extractions to prevent IP rate limits.
- Residential proxies are recommended for scraping high quantities of images.

#### Optimize Results Count

- Start with a small `results_wanted` count (20-50) for testing parameters.
- Increase the count for larger production extractions once you verify the URL format is correct.

***

### Integrations

Connect your Unsplash data with major platforms:

- **Google Sheets** — Export data directly to spreadsheets for easy sharing and curation.
- **Airtable** — Build highly customized, visual search databases.
- **Make & Zapier** — Create automated workflows that trigger notifications or save files to Google Drive/Dropbox when new images are scraped.

#### Export Formats

Download your image datasets in multiple formats:

- **JSON** — Ideal for AI training, software integrations, and developer APIs.
- **CSV / Excel** — Best for research spreadsheets and business reporting.

***

### Frequently Asked Questions

#### Can I scrape multiple pages of images?

Yes. The scraper handles pagination automatically. Adjust `results_wanted` and `max_pages` to control the depth of extraction.

#### Does the scraper download the actual files?

No, the scraper does not store the raw image files to conserve storage space. Instead, it extracts the direct high-quality `download_url` and `image_url` fields so you can download or hotlink the images as needed.

#### What happens if a photo is missing a description?

If a photo does not have a primary description, the scraper will fall back to its alternate description. If both are missing, the field is excluded from the output.

***

### Support

For issues, questions, or custom feature requests, contact support through the Apify Console.

#### Resources

- [Apify Documentation](https://docs.apify.com/)
- [API Reference](https://docs.apify.com/api/v2)

***

### Legal Notice

This actor is designed for legitimate data collection purposes. Users are responsible for ensuring compliance with website terms of service and applicable copyrights. Use data responsibly and respect rate limits.

# Actor input Schema

## `url` (type: `string`):

Unsplash URL to scrape (e.g. search, collection, topic, user profile). If provided, it overrides the keyword.

## `keyword` (type: `string`):

Search keyword (e.g., 'spring', 'nature', 'city') to search for photos if no URL is provided.

## `results_wanted` (type: `integer`):

Maximum number of images to extract.

## `max_pages` (type: `integer`):

Maximum number of pages to paginate.

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

Use Apify Proxy for reliable scraping.

## Actor input object example

```json
{
  "keyword": "spring",
  "results_wanted": 20,
  "max_pages": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

No description

# 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 = {
    "keyword": "spring",
    "results_wanted": 20,
    "max_pages": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("shahidirfan/unsplash-image-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 = {
    "keyword": "spring",
    "results_wanted": 20,
    "max_pages": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("shahidirfan/unsplash-image-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "keyword": "spring",
  "results_wanted": 20,
  "max_pages": 5
}' |
apify call shahidirfan/unsplash-image-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=shahidirfan/unsplash-image-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Unsplash Image Scraper",
        "description": "Scrape high-quality images from Unsplash in bulk. Extract metadata, download entire collections, and automate image research without API limits. Perfect for designers, researchers, and content creators building image libraries at scale.",
        "version": "0.0",
        "x-build-id": "Hhbt5ZaXJSTAzPzL7"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/shahidirfan~unsplash-image-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-shahidirfan-unsplash-image-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/shahidirfan~unsplash-image-scraper/runs": {
            "post": {
                "operationId": "runs-sync-shahidirfan-unsplash-image-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/shahidirfan~unsplash-image-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-shahidirfan-unsplash-image-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "url": {
                        "title": "URL",
                        "type": "string",
                        "description": "Unsplash URL to scrape (e.g. search, collection, topic, user profile). If provided, it overrides the keyword."
                    },
                    "keyword": {
                        "title": "Keyword",
                        "type": "string",
                        "description": "Search keyword (e.g., 'spring', 'nature', 'city') to search for photos if no URL is provided."
                    },
                    "results_wanted": {
                        "title": "Results wanted",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of images to extract.",
                        "default": 20
                    },
                    "max_pages": {
                        "title": "Maximum pages",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of pages to paginate.",
                        "default": 5
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Use Apify Proxy for reliable scraping.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
