# Imgur Gallery Scraper (`kawsar/imgur-gallery-scraper`) Actor

Collect viral Imgur gallery posts without manual setup. Easily extract titles, view counts, upvotes, downvotes, virality scores, and engagement stats. Customize your section or sort settings, set max item limits, and export your clean dataset in JSON, CSV, or Excel format.

- **URL**: https://apify.com/kawsar/imgur-gallery-scraper.md
- **Developed by:** [Kawsar](https://apify.com/kawsar) (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

## Imgur Gallery Scraper

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

Collect publicly accessible Imgur gallery posts and organize them into a structured dataset. Explore popular posts, compare engagement statistics, and filter results by gallery section and sorting preference. Export your results in JSON, CSV, Excel, and other supported Apify formats.

### What it does

This actor collects Imgur gallery posts and extracts information such as post IDs, account details, titles, descriptions, engagement counts and virality. Results are organized into individual dataset rows, with duplicate posts removed using `postId`.

### Modes

- **Gallery posts (`gallery`):** Collect posts from the selected gallery section, including `hot`, `top`, or `user`.

### Input parameters

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `mode` | string | `gallery` | Collection mode. Only gallery posts are supported. |
| `section` | string | `hot` | Gallery section: `hot`, `top`, or `user`. |
| `sort` | string | `-time` | Sorting preference for gallery posts. |
| `maxItems` | integer | `100` | Maximum number of results to collect. |
| `userAgent` | string | `ActorResearch/1.0` | User-Agent value used for requests. |
| `requestDelayMs` | integer | `1000` | Delay between requests, in milliseconds. |
| `timeoutSecs` | integer | `300` | Overall actor run timeout, in seconds. |
| `requestTimeoutSecs` | integer | `30` | Individual request timeout, in seconds. |
| `proxyConfiguration` | object | No proxy | Optional proxy configuration. |

### Input example

```json
{
  "mode": "gallery",
  "section": "hot",
  "sort": "-time",
  "maxItems": 50,
  "requestDelayMs": 1000
}
```

### What data does this actor extract?

| Field | Description |
| --- | --- |
| `postId` | Imgur post identifier. |
| `accountId` | Account ID associated with the post. |
| `itemTitle` | Post title. |
| `seoTitle` | SEO title slug. |
| `itemDescription` | Post description. |
| `viewCount` | Number of views. |
| `upvoteCount` | Number of upvotes. |
| `downvoteCount` | Number of downvotes. |
| `pointCount` | Total points. |
| `imageCount` | Number of images in the post. |
| `commentCount` | Number of comments. |
| `favoriteCount` | Number of favorites. |
| `virality` | Post virality score. |
| `score` | Post score. |
| `scrapedAt` | Collection timestamp in ISO format. |

### Output example

```json
{
  "postId": "sintdM7",
  "accountId": 24514200,
  "itemTitle": "Wearing it is like a personality test. Who are you when you put it on?",
  "seoTitle": "wearing-is-like-personality-test-who-are-you-when-you-put-on",
  "itemDescription": "",
  "viewCount": 25044,
  "upvoteCount": 63,
  "downvoteCount": 9,
  "pointCount": 54,
  "imageCount": 1,
  "commentCount": 11,
  "favoriteCount": 14,
  "virality": 33196.73239375982,
  "score": 54.621,
  "scrapedAt": "2026-10-26T00:00:00+00:00",
  "error": false
}
```

If a request fails, the actor records an error row with the available error details rather than stopping the entire run.

### Use cases

- **Viral content research:** Explore popular Imgur posts and identify content trends.
- **Engagement analysis:** Compare views, upvotes, downvotes, comments, and virality scores.
- **Research archives:** Maintain historical collections of gallery posts for analysis.
- **Gallery comparisons:** Compare popular posts across the `hot`, `top`, and `user` sections.
- **Data exports:** Save gallery information in CSV or Excel for reporting and further analysis.

### FAQ

**Which Imgur gallery sections are supported?**

The actor supports `hot`, `top`, and `user` sections.

**Can I change the sorting preference?**

Yes. Use the `sort` input to select the sorting preference for collected gallery posts.

**What information is included in each result?**

Each result can include post details, account identifiers, engagement statistics, image counts, virality scores, and collection metadata.

**Are duplicate posts collected?**

No. The actor uses `postId` to identify and remove duplicate posts.

**Can I collect posts from different gallery sections?**

Yes. Change the `section` input to collect posts from `hot`, `top`, or `user`.

### Trademark Notice

Imgur and its associated 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 Imgur.

### Disclaimer

This actor is provided for independent research and data collection. Users are responsible for ensuring that their collection and use of gallery information comply with applicable laws and the source website's policies.

### Is Web Scraping Legal?

This actor collects publicly accessible Imgur gallery information without bypassing login screens, paywalls, or technical security measures. How collected information can be used depends on applicable laws and the source website's policies.

- **Personal Data:** Gallery posts may contain usernames, account identifiers, and other information relating to identifiable individuals. Handle personal data responsibly and follow applicable privacy laws, including GDPR and CCPA where relevant.
- **Copyright and Licensing:** Images, descriptions, and other creative content may be protected by copyright. Obtain appropriate permission or check applicable licences before reproducing or redistributing protected content.
- **Platform Terms and Rate Limits:** Respect Imgur's policies, applicable terms, and reasonable request limits when collecting or using gallery information.
- **Disclaimer:** This information is general guidance, not legal advice. Consult a qualified legal professional if you need 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 scrape. Gallery posts reads Imgur hot/top/user section posts.

## `section` (type: `string`):

Gallery section: hot, top, or user.

## `sort` (type: `string`):

Sort order passed to Imgur (default -time).

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

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

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

User-Agent header sent with each request.

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

Polite pacing in milliseconds (about 1 request per second by default).

## `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. Imgur gallery posts work without a proxy.

## Actor input object example

```json
{
  "mode": "gallery",
  "section": "hot",
  "sort": "-time",
  "maxItems": 100,
  "userAgent": "ActorResearch/1.0",
  "requestDelayMs": 1000,
  "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 = {
    "mode": "gallery",
    "section": "hot",
    "sort": "-time"
};

// Run the Actor and wait for it to finish
const run = await client.actor("kawsar/imgur-gallery-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 = {
    "mode": "gallery",
    "section": "hot",
    "sort": "-time",
}

# Run the Actor and wait for it to finish
run = client.actor("kawsar/imgur-gallery-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 '{
  "mode": "gallery",
  "section": "hot",
  "sort": "-time"
}' |
apify call kawsar/imgur-gallery-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kawsar/imgur-gallery-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/U7Ji99Cptnja1z39P/builds/gpoGx5tNw0pL3UasS/openapi.json
