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

Scrape Threads (Meta) posts, full reply trees, profiles and keyword search results. No login and no cookies required.

- **URL**: https://apify.com/headply/threads-scraper.md
- **Developed by:** [Mayowa Ogedengbe](https://apify.com/headply) (community)
- **Categories:** Social media, AI, Agents
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 — Posts, Replies, Profiles & Keyword Search

Scrape [Threads](https://www.threads.com) (Meta) at scale. Returns posts, **complete reply trees**, profiles and **keyword search results** as clean, structured JSON.

**No login. No cookies. No account pool. No session tokens to supply.**

***

### Why this scraper exists

Meta's official Threads API allows roughly **500 keyword searches per rolling seven days**. That is unusable for social listening, brand monitoring or lead generation, and it is why teams end up looking for a scraper at all.

This Actor reads the same public pages a logged-out visitor sees. There is no weekly search quota, nothing to authenticate, and nothing to keep alive.

It also handles the two things other Threads scrapers get wrong:

| | Typical Threads scraper | This Actor |
|---|---|---|
| Reply trees | Flat list, or fails outright | Full tree with conversation depth |
| Quote posts with no added text | Row with empty text, looks broken | Quoted post resolved inline |
| Login required | Often | Never |
| Breaks when Meta rotates its query ids | Yes | No — this path does not use them |

***

### What you can scrape

**Keyword search** — every public post matching a term, by relevance or recency, each result tagged with the keyword that found it.

**Profiles** — handle, display name, bio, bio links, follower count, verification and privacy status, profile pictures, plus recent posts.

**Posts and reply trees** — the post plus its replies, each carrying its depth in the conversation, so you can reconstruct who answered whom.

***

### Input

Provide at least one of `searchQueries`, `profiles` or `postUrls`. They can be combined in one run.

```json
{
  "searchQueries": ["openai", "claude ai"],
  "profiles": ["@zuck", "https://www.threads.com/@mosseri"],
  "postUrls": ["https://www.threads.com/@zuck/post/DdCYWl7GktV"],
  "searchSort": "both",
  "includeReplies": true,
  "maxPostsPerQuery": 200,
  "maxRepliesPerPost": 300,
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}
```

**Running with no input.** If you start a run without setting anything, the Actor returns a small live sample so you can see the output shape immediately. Set your own keywords, profiles or post URLs for a real run.

Handles are accepted as `zuck`, `@zuck` or a full URL. Posts are accepted as a full URL or a bare shortcode.

`searchSort` accepts `default` (relevance), `recent` (reverse chronological) or `both`. The two orderings return overlapping but different sets, so `both` gives the widest coverage at twice the request cost.

***

### Output

One record per post, reply or profile. Post records look like this:

```json
{
  "type": "post",
  "id": "3981852126213720917_63055343223",
  "pk": "3981852126213720917",
  "code": "DdCYWl7GktV",
  "url": "https://www.threads.com/@zuck/post/DdCYWl7GktV",
  "text": "Mostly superintelligence and MMA takes",
  "language": "en",
  "createdAt": "2026-09-08T14:56:24.000Z",
  "takenAtTimestamp": 1788893784,
  "likeCount": 2715,
  "replyCount": 1602,
  "repostCount": 231,
  "quoteCount": 142,
  "reshareCount": 293,
  "isReply": false,
  "replyToAuthor": null,
  "rootPostCode": null,
  "replyDepth": 0,
  "isQuotePost": false,
  "quotedPost": null,
  "mediaType": "text",
  "media": [],
  "linkPreview": null,
  "author": {
    "id": "63055343223",
    "username": "zuck",
    "fullName": "Mark Zuckerberg",
    "isVerified": true,
    "profilePicUrl": "https://.../",
    "profileUrl": "https://www.threads.com/@zuck"
  },
  "authorUsername": "zuck",
  "source": "profile",
  "scrapedAt": "2026-09-10T04:31:00.000Z"
}
```

Three details that matter if you are moving this into a database:

- **`pk` is a string.** Threads primary keys exceed 2^53, so any pipeline that reads them as JSON numbers silently corrupts the last digits. This Actor derives them from the string id and never emits them as numbers.
- **Missing counters stay `null`, never `0`.** You can tell "no likes" apart from "not published by Threads".
- **`replyDepth`** is `0` for the conversation root, `1` for a direct reply, and deeper for nested ones.
- **`authorUsername` is the flat copy of `author.username`.** Spreadsheet and table views cannot read nested paths, so use the flat field for CSV exports and the nested `author` object in code.
- **Filter on `type`, not `source`.** A run can mix posts and profiles in one dataset. `type` is `"post"` or `"profile"`; `source` tells you which surface a post came from (`search`, `profile`, `post` or `replies`), and a profile's own posts are tagged `source: "profile"` too.

***

### Pricing

Pay per result, not per minute. A run that returns nothing costs nothing.

| Event | What it covers |
|---|---|
| Post scraped | One post from search or a profile, with engagement, media and any quoted post |
| Reply scraped | One reply, with its depth in the conversation |
| Profile scraped | One profile with follower count, bio, links and verification |

Replies are billed separately because deep reply traversal is the expensive path. If you only want search results, you never pay for it.

***

### Limits, stated plainly

**Depth per request.** Threads embeds roughly the first page of each surface in the page it serves: about 25 search results per keyword and ordering, and about 25 to 30 replies per post. Running both search orderings widens keyword coverage. Deeper pagination is on the roadmap and is the one thing this version does not do.

**Proxies.** Threads rate-limits single IP addresses quickly. Residential proxies are strongly recommended for anything beyond a handful of requests. The Actor warns you if it is running without one.

**Public data only.** Private accounts, direct messages and anything behind a login are out of scope by design.

***

### Legal and compliance

This Actor reads only public Threads pages, the same ones any logged-out visitor can open. It does not log in, does not bypass an access control, and does not touch private accounts.

Threads posts and profiles contain personal data. If you are in the EU or UK, GDPR applies to what you collect and what you do with it, and having a lawful basis is your responsibility as the data controller. Do not resell profile-level personal data as a lead list without the regional carve-outs that apply to you.

***

### FAQ

**Do I need a Threads or Instagram account?**
No. Nothing in this Actor authenticates, and there is nowhere to enter credentials.

**Does it break when Meta ships an update?**
Less often than most. Scrapers that call Threads' internal GraphQL API depend on persisted query ids that Meta rotates without notice, and they break each time. This Actor reads the data Threads server-renders into the page and recognises records by their shape rather than by a fixed path, so re-nesting does not break it.

**Can I get more than ~25 replies on a post?**
Not in this version. What you get is the first page of replies with accurate tree depth. Deeper traversal is the next feature.

**How do I monitor a keyword continuously?**
Schedule the Actor and give it your keywords. Each result carries `searchQuery` and `scrapedAt`, so appending runs to one dataset and de-duplicating on `id` gives you a time series.

**Why is `text` empty on some records?**
Those are quote posts where the author added no words of their own. The post they quoted is in `quotedPost`, with its text and author. The record is complete, not broken.

**Does this work with threads.net links?**
Yes. Threads moved from threads.net to threads.com, and both forms are accepted, as are bare handles and bare post shortcodes. You do not need to rewrite old links.

**How is this different from the official Threads API?**
Meta's Threads API needs an app, an access token, and it caps keyword search at roughly 500 queries per rolling seven days. This Actor needs none of that and has no weekly quota, because it reads the same public pages a logged-out visitor sees.

**Can I use it from Make, Zapier, n8n or a script?**
Yes. Every Apify Actor is callable over the REST API and through Apify's integrations, and results come back as JSON, CSV or Excel.

**Is Threads the same as Instagram?**
Threads runs on Instagram's infrastructure and shares its account system, but the content is separate. This Actor scrapes Threads only.

# Actor input Schema

## `searchQueries` (type: `array`):

Keywords or phrases to search on Threads. Each term is scraped separately and every result is tagged with the term that found it. Threads' own API allows roughly 500 keyword searches per week; this has no such cap.

## `profiles` (type: `array`):

Threads handles or profile URLs, for example zuck, @zuck or https://www.threads.com/@zuck. Returns the profile plus its most recent posts.

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

Threads post URLs or bare shortcodes. Returns the post and its reply tree, with each reply's depth in the conversation.

## `searchSort` (type: `string`):

Threads ranks search results either by relevance or by recency. The two orderings return overlapping but different sets, so 'Both' gives the widest coverage at twice the request cost.

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

For each post URL, also scrape its replies with conversation depth. Turn off to fetch the posts alone.

## `includeProfilePosts` (type: `boolean`):

Return each profile's recent posts alongside the profile record. Turn off for profile details only.

## `maxPostsPerQuery` (type: `integer`):

Upper bound on results returned for each keyword.

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

Upper bound on posts returned for each profile.

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

Upper bound on replies returned for each post. Set to 0 to skip replies entirely.

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

Threads rate-limits single IP addresses quickly. Residential proxies are strongly recommended for anything beyond a handful of requests.

## `maxConcurrency` (type: `integer`):

Parallel requests. Raise for speed, lower if you see blocks.

## `maxRequestRetries` (type: `integer`):

How many times a failed request is retried, with a fresh proxy address each time, before it is given up on.

## Actor input object example

```json
{
  "searchQueries": [
    "openai"
  ],
  "searchSort": "default",
  "includeReplies": true,
  "includeProfilePosts": true,
  "maxPostsPerQuery": 100,
  "maxPostsPerProfile": 100,
  "maxRepliesPerPost": 200,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "maxConcurrency": 10,
  "maxRequestRetries": 4
}
```

# Actor output Schema

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

Dataset containing all scraped data

# 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 = {
    "searchQueries": [
        "openai"
    ]
};

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

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

```

## MCP server setup

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