# Instagram Comment Picker – Giveaway Winner Generator (`datablow/instagram-comment-picker`) Actor

Pick random giveaway winners fairly from Instagram comments on posts and reels. Filter by tagged friends (@), required hashtag/text, deduplicate users, pick backup winners, and export to Excel, CSV, or JSON. No login required. Powered by stealth Camoufox Playwright.

- **URL**: https://apify.com/datablow/instagram-comment-picker.md
- **Developed by:** [datablow](https://apify.com/datablow) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 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.

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

## Instagram Comment Picker – Giveaway Winner Generator & Raffle Contest Tool 🎁

> **The most powerful, free, fair, and transparent Instagram Giveaway Winner Picker & Comment Scraper for Instagram Posts, Reels, and Contests.**

Pick random giveaway winners from Instagram comments in seconds. Run 100% fair, verifiable giveaways and promotions for creators, brands, e-commerce shops, and marketing agencies without manual scrolling, spreadsheets, or third-party login risks.

***

### 🌟 Key Features

- **No Instagram Login Required**: Simply paste any public Instagram Post or Reel URL.
- **🖼️ Commenter Profile Picture Included**: View and export winner avatars & profile pictures alongside their usernames.
- **🏷️ Tag-a-Friend Verification**: Automatically filter entries requiring at least 1, 2, or 3 tagged friends (`@mention`). Self-tags are automatically ignored.
- **#️⃣ Mandatory Hashtag / Keyword Filter**: Enforce specific contest answers, hashtags (`#giveaway`, `#contest`), or keywords.
- **🛡️ 1 Entry Per User (Duplicate Filter)**: Automatically deduplicate entries so everyone has an equal chance, or allow multiple entries to reward top commenters.
- **🥈 Backup / Substitute Winners**: Automatically pick alternate winners in order in case a primary winner doesn't respond.
- **📜 Provably Fair Audit Certificate**: Generates a shareable cryptographic proof certificate (`GIVEAWAY_CERTIFICATE.md`) with a verifiable seed.
- **📊 1-Click Export to Excel, CSV & JSON**: Download the full list of winners and eligible entries instantly.
- **🤖 AI Agent & MCP Ready**: Directly connectable to ChatGPT and Claude via the Apify Model Context Protocol (MCP).

***

### 🎯 Comparison: Why Choose This Actor?

| Feature | This Actor (Camoufox Stealth) | Official Meta API | Traditional Comment Pickers |
| :--- | :--- | :--- | :--- |
| **No Login Required** | ✅ **Yes (Zero Password / Login Risk)** | ❌ Requires Facebook/Meta Login | ❌ Often asks for account access |
| **Works on Any Public Post/Reel** | ✅ **Yes (Any creator or brand)** | ❌ Only accounts you manage | ⚠️ Often restricted |
| **Commenter Profile Pictures** | ✅ **Yes (`profilePicUrl` column)** | ⚠️ Limited | ❌ Rarely included |
| **Tagged Friends Validation** | ✅ **Automatic (@mention parsing)** | ❌ Manual code required | ⚠️ Limited |
| **Duplicate Filtering** | ✅ **1-Click User Deduplication** | ❌ Manual code required | ⚠️ Paid add-on |
| **Backup Winner Selection** | ✅ **Instant Alternates Ranked** | ❌ None | ❌ Manual redrawing |
| **Verifiable Fairness Proof** | ✅ **Cryptographic Audit Seed** | ❌ None | ❌ "Trust me" black box |
| **Export to Excel / CSV / JSON** | ✅ **Instant 1-Click Export** | ❌ Complex technical setup | ⚠️ Paywalled export |

***

### 🚀 How to Pick a Giveaway Winner in 3 Simple Steps

1. **Enter Your Instagram Link**:
   Paste the URL of any public Instagram Post or Reel (e.g., `https://www.instagram.com/p/DFsample/` or `https://www.instagram.com/reel/DFsample/`).
2. **Set Your Giveaway Rules**:
   - Number of Primary Winners (e.g. 1, 3, 5).
   - Number of Backup Winners (e.g. 1 or 2).
   - Filter Duplicates: Choose **True** for 1 entry per user, or **False** for multiple entries.
   - Minimum Tagged Friends: Require comments to tag $\ge 1, 2, 3$ friends.
   - Required Keyword / Hashtag: E.g., `#giveaway` or your contest answer.
3. **Click Start**:
   The stealth Camoufox engine gathers the comments, applies your rules, runs a provably fair Fisher-Yates draw, and outputs the winners with their profile pictures, comment text, and audit certificate.

***

### 📥 Input Parameters & Configuration

| Parameter | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `postUrl` | `String` | *Required* | Direct link to the Instagram Post or Reel |
| `postUrls` | `Array` | `[]` | Optional multiple links to aggregate comments across multiple giveaway posts |
| `winnerCount` | `Integer` | `1` | Number of primary winners to randomly draw |
| `backupWinnerCount` | `Integer` | `1` | Number of backup / substitute winners to select |
| `filterDuplicates` | `Boolean` | `true` | When true, limits each user to 1 chance regardless of comment count |
| `minTaggedFriends` | `Integer` | `0` | Disqualifies comments tagging fewer than N friends with `@` |
| `requiredKeyword` | `String` | `""` | Case-insensitive required word or hashtag (e.g. `#contest`, `WINNER`) |
| `excludeWords` | `Array` | `[]` | Exclude comments containing scam or spam keywords |
| `excludeUsers` | `Array` | `[]` | Exclude specific usernames (e.g. host account, team members, bots) |
| `maxComments` | `Integer` | `1000` | Maximum comments to scrape from the post |
| `sessionCookie` | `String` | `""` | Optional Instagram `sessionid` cookie to bypass unauthenticated browser limits |
| `reproducibleSeed` | `String` | `""` | Optional custom seed for reproducible, verifiable giveaway draws |
| `outputMode` | `Select` | `"WINNERS_AND_ALL_COMMENTS"` | Choose between `WINNERS_ONLY` or `WINNERS_AND_ALL_COMMENTS` |

***

### 📤 Output Dataset & Columns

Every entry pushed to the default dataset includes complete metadata:

| Column Name | Type | Description |
| :--- | :--- | :--- |
| `rank` | `Integer` | Winner ranking (`1`, `2`, `3`...) or `null` for general entries |
| `type` | `String` | `PRIMARY_WINNER`, `BACKUP_WINNER`, or `ELIGIBLE_ENTRY` |
| `username` | `String` | Instagram handle of the commenter |
| `profilePicUrl` | `String` | Direct image link to the commenter's avatar/profile picture |
| `commentText` | `String` | The complete text of the winning comment |
| `taggedCount` | `Integer` | Number of unique friends tagged with `@` |
| `taggedFriends` | `Array` | List of tagged usernames |
| `profileUrl` | `String` | Direct link to the commenter's Instagram profile |
| `postUrl` | `String` | The original post URL |
| `timestamp` | `String` | ISO timestamp of when the comment was published |
| `drawSeed` | `String` | Cryptographic fairness seed |

#### Sample Winner Output (JSON)

```json
{
  "rank": 1,
  "type": "PRIMARY_WINNER",
  "username": "sarah_travels",
  "profilePicUrl": "https://scontent-atl3-1.cdninstagram.com/v/t51.2885-19/avatar.jpg?...",
  "commentText": "I'd love to win this giveaway! Tagging my friends @alex_wander and @emily_photos #giveaway",
  "taggedCount": 2,
  "taggedFriends": ["alex_wander", "emily_photos"],
  "profileUrl": "https://www.instagram.com/sarah_travels/",
  "postUrl": "https://www.instagram.com/p/DFsample/",
  "timestamp": "2026-09-24T18:30:00.000Z",
  "drawTimestamp": "2026-09-26T15:45:00.000Z",
  "drawSeed": "seed_1790400000_abc123"
}
```

***

### 🔍 SEO & Use Cases

- **Instagram Giveaway Picker**: Randomly pick transparent winners for social media promotions.
- **Instagram Reel Comment Picker**: Works on both standard feed posts and viral reels.
- **Raffle & Contest Winner Generator**: Multi-tier winner and backup winner draws.
- **Tag-a-Friend Contest Validator**: Filter comments that tag 1, 2, or 3 real friends.
- **Export Instagram Comments**: Download all comment data with user avatars to Excel/CSV for audience research.

# Actor input Schema

## `postUrl` (type: `string`):

Direct link to the Instagram post or reel (e.g., https://www.instagram.com/p/DFxyz.../ or https://www.instagram.com/reel/DFxyz.../).

## `postUrls` (type: `array`):

Provide multiple post URLs if your giveaway is running across multiple posts or reels. Comments will be aggregated into one pool.

## `winnerCount` (type: `integer`):

How many primary winners you want to select.

## `backupWinnerCount` (type: `integer`):

Backup winners picked in advance in case primary winners do not reply or claim their prize.

## `filterDuplicates` (type: `boolean`):

When enabled, each user only gets 1 entry regardless of how many times they commented. When disabled, each qualifying comment counts as a separate entry (more comments = higher chances).

## `minTaggedFriends` (type: `integer`):

Disqualify comments that do not tag at least N friends with @ (e.g. 1, 2, or 3). Set to 0 to disable.

## `requiredKeyword` (type: `string`):

Only include comments containing this exact phrase, answer, or hashtag (e.g. '#giveaway', 'YES', or contest answer). Case-insensitive. Leave blank to accept any comment.

## `excludeWords` (type: `array`):

List of words or phrases to exclude/disqualify (e.g. 'scam', 'fake', spam words).

## `excludeUsers` (type: `array`):

Usernames to exclude from winning (e.g., your own business handle, organizers, bots, or previous winners).

## `maxComments` (type: `integer`):

Maximum number of comments to extract per post. High-volume posts can set higher limits.

## `sessionCookie` (type: `string`):

Optional `sessionid` cookie from Instagram web. If provided, Camoufox runs fully authenticated with unlimited scrolling.

## `reproducibleSeed` (type: `string`):

Optional string used as the cryptographic random seed. If provided, the exact same winners can be reproduced identically for fairness proof to your audience.

## `outputMode` (type: `string`):

Choose whether to output only the winners, or both winners and all eligible qualifying comments.

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

Residential proxies are strongly recommended for seamless Instagram access without blocking.

## Actor input object example

```json
{
  "postUrl": "https://www.instagram.com/p/DFsample/",
  "winnerCount": 1,
  "backupWinnerCount": 1,
  "filterDuplicates": true,
  "minTaggedFriends": 0,
  "requiredKeyword": "",
  "maxComments": 1000,
  "outputMode": "WINNERS_AND_ALL_COMMENTS",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Direct link to the dataset containing selected giveaway winners, backup winners, and all eligible comments with profile pictures.

## `certificate` (type: `string`):

Cryptographically verifiable markdown certificate proving draw fairness, winners list, and random seed.

## `summary` (type: `string`):

Detailed JSON record with statistics, disqualification metrics, rules applied, and winners.

# 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 = {
    "postUrl": "https://www.instagram.com/p/DFsample/"
};

// Run the Actor and wait for it to finish
const run = await client.actor("datablow/instagram-comment-picker").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 = { "postUrl": "https://www.instagram.com/p/DFsample/" }

# Run the Actor and wait for it to finish
run = client.actor("datablow/instagram-comment-picker").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 '{
  "postUrl": "https://www.instagram.com/p/DFsample/"
}' |
apify call datablow/instagram-comment-picker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,datablow/instagram-comment-picker"
        }
    }
}
```

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/VstPFW631bhFta3QN/builds/vbliM4clMkarxveQw/openapi.json
