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

Fetch high-quality images from Unsplash based on your search query. Get detailed image information including URLs, descriptions, photographer details, and tags. Perfect for content creators and developers needing professional stock photos.

- **URL**: https://apify.com/easyapi/unsplash-image-scraper.md
- **Developed by:** [EasyApi](https://apify.com/easyapi) (community)
- **Categories:** Integrations, Social media
- **Stats:** 146 total users, 7 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## Unsplash Image Scraper 🖼️

Powerful and efficient Actor for fetching high-quality images and their metadata from Unsplash, the internet's source of freely-usable images.

### Features ✨

- 🔍 Search images by keyword or topic
- 📊 Customizable number of results
- 🖼️ Multiple image resolution options (raw, full, regular, small, thumb)
- 👤 Photographer attribution data
- 🏷️ Image tags and descriptions
- ⚡ Rate-limit friendly
- 💾 Structured JSON output

### Use Cases 🎯

- Content creation and blogging
- Web development and design
- Social media marketing
- Market research and trend analysis
- Digital asset management
- App development

### Output Data Structure 📋

For each image, you'll receive:

- Unique image ID
- Description
- Last update timestamp
- Multiple resolution URLs
- Photographer information
- Associated tags

### Input Parameters ⚙️

| Parameter | Type | Description |
|-----------|------|-------------|
| query | String | Search term for images |
| maxResults | Integer | Maximum number of images to fetch |

### Limitations ⚠️

- Respects Unsplash API rate limits
- Maximum 10 images per page
- Results depend on Unsplash's content availability

### Cost & Usage 💰

This Actor is optimized for performance and cost-effectiveness. The actual running costs depend on:

- Number of images requested
- Frequency of runs
- Platform computation units used

### Support 🤝

For issues, feature requests, or questions, please contact support.

#### Input Example

A full explanation of an input example in JSON.

```
{
    "query": "nature",
    "maxResults": 20
}
```

#### Output sample

The results will be wrapped into a dataset which you can always find in the **Storage** tab. Here's an excerpt from the data you'd get if you apply the input parameters above:

And here is the same data but in JSON. You can choose in which format to download your data: JSON, JSONL, Excel spreadsheet, HTML table, CSV, or XML.

```json
[
	{
		"id": "U-DgtDG6MRo",
		"description": "Tesla Model 3",
		"updatedAt": "2024-12-05T18:30:33Z",
		"urls": {
			"raw": "https://images.unsplash.com/photo-1585011664466-b7bbe92f34ef?ixid=M3wzNjc2NDl8MHwxfHNlYXJjaHwxfHxUZXNsYXxlbnwwfHx8fDE3MzM0NjcxMjd8MA&ixlib=rb-4.0.3",
			"full": "https://images.unsplash.com/photo-1585011664466-b7bbe92f34ef?crop=entropy&cs=srgb&fm=jpg&ixid=M3wzNjc2NDl8MHwxfHNlYXJjaHwxfHxUZXNsYXxlbnwwfHx8fDE3MzM0NjcxMjd8MA&ixlib=rb-4.0.3&q=85",
			"regular": "https://images.unsplash.com/photo-1585011664466-b7bbe92f34ef?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wzNjc2NDl8MHwxfHNlYXJjaHwxfHxUZXNsYXxlbnwwfHx8fDE3MzM0NjcxMjd8MA&ixlib=rb-4.0.3&q=80&w=1080",
			"small": "https://images.unsplash.com/photo-1585011664466-b7bbe92f34ef?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wzNjc2NDl8MHwxfHNlYXJjaHwxfHxUZXNsYXxlbnwwfHx8fDE3MzM0NjcxMjd8MA&ixlib=rb-4.0.3&q=80&w=400",
			"thumb": "https://images.unsplash.com/photo-1585011664466-b7bbe92f34ef?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wzNjc2NDl8MHwxfHNlYXJjaHwxfHxUZXNsYXxlbnwwfHx8fDE3MzM0NjcxMjd8MA&ixlib=rb-4.0.3&q=80&w=200"
		},
		"user": {
			"username": "austin__ramsey",
			"name": "Austin Ramsey"
		},
		"tags": []
	},
    ...
]
```

# Actor input Schema

## `query` (type: `string`):

What kind of images are you looking for?

## `maxResults` (type: `integer`):

Maximum number of images to fetch (1-10000)

## Actor input object example

```json
{
  "query": "nature",
  "maxResults": 10
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("easyapi/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 = {}

# Run the Actor and wait for it to finish
run = client.actor("easyapi/unsplash-image-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 '{}' |
apify call easyapi/unsplash-image-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,easyapi/unsplash-image-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/sEribZzMPih1OCYkP/builds/g0ZP0edxTs3hOlymo/openapi.json
