# Threads Scraper - Posts, Profiles & Replies (`themineworks/threads-scraper`) Actor

Scrape Meta Threads posts, profiles and replies by username or keyword. Returns text, author, likes, replies and timestamps. No API key. Works in Claude, ChatGPT & any MCP-compatible AI agent.

- **URL**: https://apify.com/themineworks/threads-scraper.md
- **Developed by:** [The Mine Works](https://apify.com/themineworks) (community)
- **Categories:** Social media, Developer tools, MCP servers
- **Stats:** 4 total users, 2 monthly users, 90.0% runs succeeded, 0 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

## Threads Scraper — Reliable Meta Threads Data, Pay Per Post Delivered

A production-grade **Threads scraper** for **threads.net** (Meta's Threads app) that actually returns data. Built for analysts, marketers, and engineers who tried existing Threads scrapers and got nothing back. Designed around one promise: **you only pay for posts we actually deliver**.

If you've spent credits on a Threads API alternative and watched the run finish with an empty dataset, this actor is for you.

### Why this beats existing Threads scrapers

The current top **Threads scraper** on the Apify store has a **33.4% success rate** and a **2.96-star rating** — meaning **2 out of every 3 runs fail**, and users are paying for those failures. Reviews repeat the same story: empty results, timeouts, broken pagination, and silent failures on common profiles.

This actor was built to fix exactly that:

- **Zero charge on failure.** Pay-per-event is wired to push, not start. If we don't deliver posts, you don't pay.
- **Resilient HTML extraction.** Instead of relying on undocumented GraphQL `doc_id` values that Meta rotates weekly, we extract Threads' embedded JSON state from the page itself — the same source the threads.net web app uses to render.
- **Realistic browser fingerprint.** Full `Sec-Fetch-*` and `Sec-Ch-Ua` header set, modern Safari User-Agent, generous 429 backoff (10s / 30s / 60s).
- **>90% target success rate** across profile, post, search, and hashtag modes.

### Features

- **Four modes** in one actor: **profile**, **post**, **search**, and **hashtag**
- **No login, no cookies, no session tokens** required
- **Complete post schema** — text, media, counts, timestamps, user metadata
- **Hashtags, @mentions, and external URLs** parsed out of every post
- **Reposts and replies** detected and optionally included
- **Cursor pagination** for deep profile and feed crawls (up to 500 posts per run)
- **Zero charge on failure** — Pay-Per-Event fires only on a successful push
- **>90% delivery rate** across modes with automatic retries on 429 / 5xx

### Output schema

Every delivered post follows the same shape:

```json
{
  "post_id": "3141592653589793",
  "code": "C8xYz1aBcDe",
  "url": "https://www.threads.net/@zuck/post/C8xYz1aBcDe",
  "username": "zuck",
  "user_full_name": "Mark Zuckerberg",
  "user_pic_url": "https://scontent.cdninstagram.com/...",
  "user_verified": true,
  "text": "Threads just crossed 200M MAU. #threads",
  "posted_at": "2026-05-12T14:22:09.000Z",
  "posted_at_human": "Tue, 12 May 2026 14:22:09 GMT",
  "like_count": 48213,
  "reply_count": 1204,
  "repost_count": 311,
  "quote_count": 87,
  "has_media": true,
  "media_urls": ["https://scontent.cdninstagram.com/..."],
  "media_type": "image",
  "is_reply": false,
  "parent_post_id": null,
  "is_repost": false,
  "original_post_id": null,
  "hashtags": ["threads"],
  "mentions": [],
  "urls": [],
  "scraped_at": "2026-06-06T09:00:00.000Z"
}
````

A final `{ "_type": "summary" }` item is always appended so you can verify exactly how many posts were delivered and charged.

### Pricing

**Your first 25 posts are free — every Apify account, no card, no trial clock.** After that it is a flat **$0.002 per delivered post** ($2 per 1,000).

Flat **Pay-Per-Event**: one event per delivered post (`post-scraped`). Empty runs, blocked targets, and 404s **do not** trigger the event — you are not charged.

- First 25 posts free per account (lifetime), then $0.002/post
- No monthly minimum
- No per-second compute charge
- No fee on partial failures — only the posts that landed in your dataset

This is the opposite of the typical Apify pricing model where you pay for compute regardless of whether the actor returned anything useful.

### Use cases

- **Social listening** — track conversation volume on a brand, product, or competitor by hashtag or search query
- **Brand monitoring** — pull every post from your own and competitor accounts, daily
- **Competitor analysis** — benchmark engagement (likes, replies, reposts, quotes) across rival profiles
- **Influencer research** — qualify Threads creators by post cadence, media mix, and engagement
- **Content strategy** — find top-performing posts on a topic before you write your own
- **News and trend detection** — sweep a hashtag in `recent` mode every 15 minutes

### Mode reference

Pick the mode that matches your job. All modes share the same output schema.

#### `profile`

Use when you want everything (or the latest N) from one or more **Threads profiles**. Provide `profileUsernames` like `["zuck", "mosseri"]`. Paginates by cursor up to `maxPosts`.

#### `post`

Use when you have specific **Threads post URLs** and need their full metadata — likes, replies, media, parent post if it's a reply. Provide `postUrls`. One fetch per URL, no pagination.

#### `search`

Use to scrape posts matching a **keyword query**. Provide `searchQuery`. Choose `resultType: "top"` for popular results or `"recent"` for the live feed.

#### `hashtag`

Use to scrape the **hashtag feed** for a tag — without the `#`. Provide `hashtag: "threads"`. Same `resultType` options as search.

### Input example

```json
{
  "mode": "hashtag",
  "hashtag": "threads",
  "maxPosts": 100,
  "resultType": "recent",
  "includeReplies": false,
  "includeReposts": false
}
```

### Reliability notes

- **429 backoff:** 10s → 30s → 60s, then the request is skipped (not failed) so the rest of the run continues
- **404 handling:** logged as an `_type: "error"` item in your dataset, run continues with the next target
- **Empty extractions:** retried once with a delay before giving up on a target
- **Duplicate suppression:** posts are deduped by `code` across the whole run

### Keywords

threads scraper, threads api, meta threads data, threads.net scraper, instagram threads scraper, threads posts, threads hashtag, threads search, social media scraper, threads data export, threads analytics, meta threads scraping, threads profile scraper

***

Built because the existing Threads scrapers were charging users for runs that returned nothing. **Threads data that actually returns data.**

# Actor input Schema

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

Which type of scrape to run: profile, post, search, or hashtag.

## `profileUsernames` (type: `array`):

List of Threads usernames (without @) to scrape. Used when mode=profile. Example: \["zuck", "mosseri"]

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

List of full Threads post URLs to scrape. Used when mode=post. Example: \["https://www.threads.net/@zuck/post/Cuc1234"]

## `searchQuery` (type: `string`):

Search keyword. Used when mode=search.

## `hashtag` (type: `string`):

Hashtag to scrape, without the leading #. Used when mode=hashtag.

## `maxPosts` (type: `integer`):

Maximum number of posts to return across the whole run.

## `includeReplies` (type: `boolean`):

If true, include reply posts in the output.

## `includeReposts` (type: `boolean`):

If true, include reposts in the output.

## `resultType` (type: `string`):

For search and hashtag modes: 'recent' or 'top'.

## Actor input object example

```json
{
  "mode": "profile",
  "profileUsernames": [
    "zuck"
  ],
  "postUrls": [],
  "searchQuery": "",
  "hashtag": "",
  "maxPosts": 3,
  "includeReplies": false,
  "includeReposts": false,
  "resultType": "recent"
}
```

# 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 = {
    "profileUsernames": [
        "zuck"
    ],
    "maxPosts": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("themineworks/threads-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 = {
    "profileUsernames": ["zuck"],
    "maxPosts": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("themineworks/threads-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 '{
  "profileUsernames": [
    "zuck"
  ],
  "maxPosts": 3
}' |
apify call themineworks/threads-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Threads Scraper - Posts, Profiles & Replies",
        "description": "Scrape Meta Threads posts, profiles and replies by username or keyword. Returns text, author, likes, replies and timestamps. No API key. Works in Claude, ChatGPT & any MCP-compatible AI agent.",
        "version": "0.1",
        "x-build-id": "zqRU7gYm6yZJhNy0a"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/themineworks~threads-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-themineworks-threads-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/themineworks~threads-scraper/runs": {
            "post": {
                "operationId": "runs-sync-themineworks-threads-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/themineworks~threads-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-themineworks-threads-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",
                "required": [
                    "mode"
                ],
                "properties": {
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "profile",
                            "post",
                            "search",
                            "hashtag"
                        ],
                        "type": "string",
                        "description": "Which type of scrape to run: profile, post, search, or hashtag.",
                        "default": "profile"
                    },
                    "profileUsernames": {
                        "title": "Profile usernames",
                        "type": "array",
                        "description": "List of Threads usernames (without @) to scrape. Used when mode=profile. Example: [\"zuck\", \"mosseri\"]",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "postUrls": {
                        "title": "Post URLs",
                        "type": "array",
                        "description": "List of full Threads post URLs to scrape. Used when mode=post. Example: [\"https://www.threads.net/@zuck/post/Cuc1234\"]",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "searchQuery": {
                        "title": "Search query",
                        "type": "string",
                        "description": "Search keyword. Used when mode=search.",
                        "default": ""
                    },
                    "hashtag": {
                        "title": "Hashtag",
                        "type": "string",
                        "description": "Hashtag to scrape, without the leading #. Used when mode=hashtag.",
                        "default": ""
                    },
                    "maxPosts": {
                        "title": "Max posts",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum number of posts to return across the whole run.",
                        "default": 25
                    },
                    "includeReplies": {
                        "title": "Include replies",
                        "type": "boolean",
                        "description": "If true, include reply posts in the output.",
                        "default": false
                    },
                    "includeReposts": {
                        "title": "Include reposts",
                        "type": "boolean",
                        "description": "If true, include reposts in the output.",
                        "default": false
                    },
                    "resultType": {
                        "title": "Result type",
                        "enum": [
                            "recent",
                            "top"
                        ],
                        "type": "string",
                        "description": "For search and hashtag modes: 'recent' or 'top'.",
                        "default": "recent"
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
