# Threads Scraper (`rastriq/threads-scraper`) Actor

Public Threads profiles, posts and replies from the public HTML: counters, text, dates. Author data pseudonymised, emails and phones redacted. No login.

- **URL**: https://apify.com/rastriq/threads-scraper.md
- **Developed by:** [Rastriq — Structured data from the world](https://apify.com/rastriq) (community)
- **Categories:** Social media
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.20 / 1,000 rows

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

## Threads Scraper

**Threads Scraper** extracts public posts, replies and profile stats from [Threads](https://www.threads.com) (Meta) without a login: post text, publication time, likes, replies, reposts, quotes, media type, and the follower count and biography of a profile. Give it usernames or post URLs and get clean JSON, CSV or Excel. It is a lightweight Threads API alternative for brand monitoring, social listening, competitor tracking and content research.

Threads Scraper reads only the public pages exactly as an anonymous visitor sees them. No account, no cookies, no residential proxy. Author names can be hidden with one switch for GDPR (`hideAuthorNames`) and a keyed `author_hash` is always output.

### What is Threads Scraper?

Threads Scraper opens the public profile page or post page on threads.com, reads the data the page already carries and turns it into a flat, consistent dataset. It has two modes, chosen by the input you provide:

- **Profiles** (`usernames`): one `profile` row (followers, biography) plus the posts the public profile page carries.
- **Posts** (`postUrls`): the post itself plus the replies the public post page carries.

> **Honest limits.** The public HTML holds about **4 threads (4 to 8 posts) per profile** and **7 to 8 replies per post**. Measured on real pages: a large profile gave 8 posts, a brand profile gave 4; two post pages gave 7 and 8 replies. Threads Scraper does not log in and does not paginate, so it cannot go past that. `maxPostsPerProfile` and `maxRepliesPerPost` only cap what the page offers, they cannot raise it. Need the full history of a profile? This version is not the tool for that.

### What data does Threads Scraper extract?

| Field | What it is |
|---|---|
| 🔑 `post_id`, `post_code` | Durable post id and the shortcode used in the URL |
| 🧭 `type` | `profile`, `post` or `reply` |
| 🔗 `parent_post_id` | The post a reply answers, when known |
| 📝 `text` | Post text (emails and phones redacted) |
| 🕒 `published_at` | Publication time, ISO 8601, UTC |
| ❤️ `like_count`, `reply_count`, `repost_count`, `quote_count` | Engagement counters |
| 👥 `follower_count`, `biography` | On the `profile` row of the profile you asked for |
| 🖼️ `media_type` | `text`, `image`, `video`, `carousel` or `other` (`other` also when a post has no text and no recognised media) |
| 👤 `author_name` | Public username. `null` if you enable *Hide author names* |
| 🔒 `author_hash` | Keyed HMAC-SHA256 pseudonym of the author id, stable across runs while the salt is unchanged |
| ✅ `ext_author_verified` | Best effort, logged-out view: `true` if the source says verified; `null` means unknown, not unverified |
| 🔗 `source_url`, `scraped_at` | Public URL and extraction time (UTC) |
| 🚩 `_quality_*` | Flags for missing text, counters or date, and for truncated replies or posts. Flagged, never filtered |

Fields the page does not provide are `null`, never invented.

### How to scrape Threads with Threads Scraper

1. Open **Threads Scraper** on Apify and click **Try for free**.
2. In **Profiles**, add usernames such as `zuck` or profile URLs such as `https://www.threads.com/@zuck`.
3. In **Post URLs**, add post links such as `https://www.threads.com/@zuck/post/DfNR0zhEdWv`. You can use one field or both.
4. Optionally set **Max posts per profile** and **Max replies per post**, and switch on **Hide author names**.
5. Click **Start** and download the results as JSON, CSV, Excel or XML, or read them through the API.

#### Input parameters

| Parameter | Type | Description |
|---|---|---|
| `usernames` | array | Usernames or profile URLs. One `profile` row plus the posts in the public page |
| `postUrls` | array | Post URLs. The post plus the replies in the public page |
| `maxPostsPerProfile` | integer | Cap per profile, 0 to 100. If empty, 20. The page carries 4 to 8 |
| `maxRepliesPerPost` | integer | Cap per post, 0 to 100. If empty, 20. The page carries 7 to 8. 0 = the post only |
| `hideAuthorNames` | boolean | If on, `author_name` is `null`, `@mentions` in the text are masked and post URLs use the username-free form `https://www.threads.com/t/<code>`. Default off |

At least one of `usernames` or `postUrls` is required. A run handles up to 50 profiles and posts (50 per list in the form). Invalid entries are skipped and listed in the run summary (first 20).

#### Example input

```json
{
  "usernames": ["zuck"],
  "postUrls": ["https://www.threads.com/@zuck/post/DfNR0zhEdWv"],
  "maxPostsPerProfile": 10,
  "maxRepliesPerPost": 10
}
```

### Output example

```json
{
  "post_id": "4024588638696309702",
  "post_code": "DfaNgswkQPG",
  "type": "post",
  "parent_post_id": null,
  "text": "Example post text",
  "published_at": "2026-11-06T14:06:14Z",
  "like_count": 2210,
  "reply_count": 502,
  "repost_count": 91,
  "quote_count": 30,
  "follower_count": null,
  "biography": null,
  "author_hash": "3f1c0c5a0a6d6b7e9d2b8f4c1a7e5d3b9c0f2a6e8d4b1c7a5e3f9d0b2c4a6e81",
  "author_name": "zuck",
  "media_type": "carousel",
  "source_url": "https://www.threads.com/@zuck/post/DfaNgswkQPG",
  "scraped_at": "2026-11-09T10:00:00Z",
  "ext_author_verified": true,
  "_quality_missing_text": false,
  "_quality_truncated_replies": false
}
```

Every run also writes a `SUMMARY` record with, for each profile and post: items scanned, emitted and dropped, requests made, the level used and the reason it stopped. Statuses are `completed`, `no_results`, `partial` or `failed`.

### How much does it cost to use Threads Scraper?

Threads Scraper uses pay-per-event pricing: you pay per item delivered (a profile row, a post or a reply), plus a negligible amount of compute. One profile page yields about 5 to 9 items and one post page about 8 to 9, so a small test costs very little. Start with one profile and one post to see the exact bill, and set a maximum charge per run in the Apify Console. Duplicates and invalid rows are never delivered or charged.

### Privacy & GDPR

- **Author name.** `author_name` is the public username. To minimise personal data switch on **Hide author names**: every post and reply then has `author_name = null`, `@mentions` in the text are replaced by `@[user]` and `source_url` is `https://www.threads.com/t/<code>` (no username). The `profile` row of a profile you explicitly asked for keeps its username, name and biography, because you named it. Its biography goes through the same email and phone redaction as post text. If the profile is private, only its profile row is output, flagged `_quality_private_profile = true`.
- **Author hash.** `author_hash` is a keyed pseudonym: HMAC-SHA256 of the author id, computed with the Actor secret `AUTHOR_HASH_SALT`. It lets you count repeat authors across runs, but it is pseudonymisation, not anonymisation: whoever holds the salt can recompute it. If no salt is set every row carries `ext_author_hash_weak = true`.
- **Never output.** Avatars, raw author ids, and the display name or biography of any account other than a profile you requested. The single exception is `ext_profile_id`, the id of a profile you asked for, which appears only on that profile row and never on posts or replies. Emails and phone numbers in the text and in the biography are redacted (`[email]`, `[phone]`).
- **No session data.** The anonymous session values that the page includes are not extracted, stored or reused.
- **Your responsibility.** Post text is free text and may contain personal data, including special categories. Threads Scraper does not classify or infer anything about people. You remain responsible for your lawful basis, retention and use under GDPR and the terms of use of Meta.

Threads Scraper only collects data that is publicly visible on threads.com without logging in.

### FAQ

**Does Threads Scraper need a Threads account?**
No. It never logs in and never uses account cookies.

**Why do I only get about 8 posts per profile and 7 replies per post?**
That is all the public page carries (4 to 8 posts, 7 to 8 replies in our checks). Going further needs a logged-in or paginated API, which this version does not use.

**What happens if Threads blocks a request?**
Threads Scraper sends one GET per page with a browser-like TLS fingerprint (a plain HTTP client gets a page without data, so it is not used). If the page does not come back with its data, or shows a login wall, that profile or post is retried once through an Apify datacenter proxy; the next one starts again without the proxy. A page that never returns its data is reported as `unavailable` or `blocked`, never as success, and a mistyped username does not stop the other targets. The run always ends cleanly with a `SUMMARY`, also when the input is invalid (`invalid_input`).

**Is scraping Threads legal?**
Threads Scraper only reads public pages, but the terms of Meta restrict automated access. Check them and your local law before use.

**Can I schedule it?**
Yes, from the Apify Console. Keep runs small and spaced out.

### Related Actors

- [Google Play Reviews Scraper](https://apify.com/rastriq/google-play-reviews-scraper): same author-privacy contract for Android app reviews.
- [App Store Reviews Scraper](https://apify.com/rastriq/app-store-reviews-scraper): the same for iOS app reviews.

# Changelog

This Actor's version history is a separate document: https://apify.com/rastriq/threads-scraper/changelog.md

# Actor input Schema

## `usernames` (type: `array`):

Usernames (<code>zuck</code>, <code>@zuck</code>) or profile URLs (<code>https://www.threads.com/@zuck</code>). Each gives one <code>profile</code> row plus the posts in the public HTML. One per line.

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

Post URLs (<code>https://www.threads.com/@zuck/post/DfNR0zhEdWv</code>). Each gives the post plus the replies in the public HTML. One per line.

## `maxPostsPerProfile` (type: `integer`):

Cap on posts kept per profile. If empty, 20. The public page carries 4 to 8 posts, so higher values do not return more.

## `maxRepliesPerPost` (type: `integer`):

Cap on replies kept per post URL. If empty, 20. The public page carries 7 to 8 replies. 0 = the post only.

## `hideAuthorNames` (type: `boolean`):

Replace author names with null mask @mentions in the text and use username-free post URLs (author_hash is kept) to minimise personal data under GDPR. The profile row of the profile you asked for keeps its username.

## Actor input object example

```json
{
  "usernames": [
    "zuck"
  ],
  "postUrls": [
    "https://www.threads.com/@zuck/post/DfNR0zhEdWv"
  ],
  "maxPostsPerProfile": 10,
  "maxRepliesPerPost": 10
}
```

# Actor output Schema

## `items` (type: `string`):

No description

## `summary` (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 = {
    "usernames": [
        "zuck"
    ],
    "postUrls": [
        "https://www.threads.com/@zuck/post/DfNR0zhEdWv"
    ],
    "maxPostsPerProfile": 10,
    "maxRepliesPerPost": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("rastriq/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 = {
    "usernames": ["zuck"],
    "postUrls": ["https://www.threads.com/@zuck/post/DfNR0zhEdWv"],
    "maxPostsPerProfile": 10,
    "maxRepliesPerPost": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("rastriq/threads-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 '{
  "usernames": [
    "zuck"
  ],
  "postUrls": [
    "https://www.threads.com/@zuck/post/DfNR0zhEdWv"
  ],
  "maxPostsPerProfile": 10,
  "maxRepliesPerPost": 10
}' |
apify call rastriq/threads-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rastriq/threads-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/JrV4dwYBIsEeHMCIf/builds/LTVTZD83y25bSzqeF/openapi.json
