# Threads.net Posts Scraper (`skillmerc/threads-posts-scraper`) Actor

Scrape public Threads posts by keyword search, hashtag, or user profile. Returns post text, engagement metrics, media URLs, and author info. No login required.

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

## Pricing

from $4.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?

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.net Posts Scraper

Scrapes public posts from Threads.net by keyword/hashtag search or user profile. No login required.

### What it scrapes

- **Search**: posts matching a keyword or hashtag (e.g. "AI" or "#startup")
- **Profiles**: all recent posts from one or more public Threads accounts
- Both modes can run in a single actor call

Data returned includes post text, engagement counts (likes, replies, reposts, quotes), media URLs, and author info.

### Inputs

| Field | Type | Description | Default |
|-------|------|-------------|---------|
| `searchQuery` | string | Keyword or hashtag to search (e.g. `AI` or `#startup`) | `AI` |
| `profileUsernames` | array | Threads usernames to scrape (e.g. `["zuck", "mosseri"]`) | `[]` |
| `maxResults` | integer | Max posts to return, up to 1000 | `100` |

At least one of `searchQuery` or `profileUsernames` must be provided.

### Output fields

| Field | Type | Description |
|-------|------|-------------|
| `post_id` | string | Unique post ID |
| `post_url` | string | Direct URL to the post |
| `username` | string | Author's Threads username |
| `display_name` | string | Author's display name |
| `text` | string | Post text content |
| `like_count` | number | Number of likes |
| `reply_count` | number | Number of replies |
| `repost_count` | number | Number of reposts |
| `quote_count` | number | Number of quote-posts |
| `timestamp` | string | ISO 8601 post creation time |
| `media_urls` | array | Image or video URLs attached to the post |
| `is_reply` | boolean | True if this post is a reply to another post |
| `parent_post_id` | string | Post ID of the parent post (if `is_reply` is true) |

### Output example

```json
{
  "post_id": "DdCYWl7GktV",
  "post_url": "https://www.threads.com/@zuck/post/DdCYWl7GktV",
  "username": "zuck",
  "display_name": "Mark Zuckerberg",
  "text": "Your Muse gets its own private computer in the cloud to do work for you. We've built new technology so the Muse Secure VM keeps your content safe.",
  "like_count": 18203,
  "reply_count": 941,
  "repost_count": 2104,
  "quote_count": 388,
  "timestamp": "2026-09-08T18:56:24.000Z",
  "media_urls": [],
  "is_reply": false,
  "parent_post_id": null
}
```

Note: `like_count`, `reply_count`, `repost_count`, and `quote_count` are populated via API interception when running on Apify platform with residential proxies. `display_name` is also populated via the API path. Local runs without a proxy fall back to DOM extraction, which produces accurate `post_id`, `post_url`, `username`, `text`, `timestamp`, and `media_urls`, but zeroes for engagement counts.

### How it works

Threads.net is a client-side React app -- all post data is delivered via Meta's internal GraphQL API after the page loads. This actor uses a headless Chromium browser (Playwright) to load each target page, intercepts the API responses, and extracts structured post data from them.

On the Apify platform, it runs through residential proxies (`RESIDENTIAL` group) to avoid IP-based blocks.

### Pricing

**$1.00 per 1,000 results** (pay-per-result). A typical run scraping 100 posts costs $0.10.

### Limitations

- Requires Playwright (browser-based), so cold starts take 10-20 seconds and memory usage is higher than HTML-only actors.
- Some Threads content (private accounts, age-restricted posts) requires login and cannot be scraped.
- Meta may add stricter bot detection as the platform matures; runs requiring login will log a warning and skip those pages.
- Engagement counts (likes, reposts) are only available via API interception; DOM fallback returns 0 for those fields.
- No historical posts: the actor scrapes what is currently visible on the page/search results.
- Search results on Threads are ranked by relevance, not chronologically.

# Actor input Schema

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

Keyword or hashtag to search (e.g. 'AI' or '#startup'). Leave empty to scrape by username only.

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

List of Threads usernames to scrape posts from (e.g. \['zuck', 'mosseri']). The @ symbol is optional.

## `maxResults` (type: `integer`):

Maximum number of posts to return across all sources. Capped at 1000 per run.

## Actor input object example

```json
{
  "searchQuery": "AI",
  "profileUsernames": [
    "zuck"
  ],
  "maxResults": 100
}
```

# Actor output Schema

## `results` (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 = {
    "searchQuery": "AI",
    "profileUsernames": [
        "zuck"
    ],
    "maxResults": 100
};

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

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

```

## MCP server setup

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