# Threads Public Post, Reply & Profile Data Extractor (`vexaloom-labs/threads-public-post-reply-and-profile-data`) Actor

Pull posts, replies, media, reposts, keyword search, hashtag search, or a post's reply thread from Threads, with real engagement counts, captions, media, and profile bios.

- **URL**: https://apify.com/vexaloom-labs/threads-public-post-reply-and-profile-data.md
- **Developed by:** [vexaloom-labs](https://apify.com/vexaloom-labs) (community)
- **Categories:** Automation, Lead generation, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 Public Post, Reply & Profile Data Extractor

Pick a mode and this actor reads whatever that surface shows a logged-out visitor on Threads — a profile's posts, replies or media, a keyword or hashtag search, or a single post with its visible replies — and returns it as structured records.

### What this actor does

- Scrapes seven surfaces via one `mode` switch: profile posts, profile replies, profile media, profile reposts, keyword search, hashtag/topic search, and a single post plus its replies.
- Reads engagement counts (likes, comments, reposts, shares) directly off each post's action buttons, including true zero counts that Threads otherwise hides.
- Detects and pulls the first image and any attached external link card (URL, domain, link title) on posts that have one.
- Can emit a separate profile-metadata record (display name, bio, follower count, verification, linked Instagram) alongside a profile mode's posts.
- Omits any field a given post or profile doesn't actually have — you never see a placeholder like `"N/A"` or an empty string.

### Output per post

| Field | Description |
|---|---|
| `recordType` | Always `"post"` for this record type. |
| `mode` | The mode that produced this record. |
| `postUrl` | Full URL of the post on Threads. |
| `shortcode` | Threads' short ID for the post. |
| `authorUsername` | Username of the post's author. |
| `postText` | Caption text, when the post has one. |
| `publishedAt` | ISO 8601 timestamp of when the post was published. |
| `likeCount`, `commentCount`, `repostCount`, `shareCount` | Engagement counts read from the post's action buttons (true zero is reported, not omitted); a count is left out only if that button isn't rendered on the card. |
| `hasImage`, `hasVideo` | Whether the post includes an image or video (always present, `true` or `false`). |
| `imageUrl` | URL of the post's first image, when present. |
| `externalLinkUrl` | Resolved destination URL of an attached link card, when present. |
| `externalLinkDomain` | Domain shown on the link card. |
| `externalLinkTitle` | Title text shown on the link card. |
| `isMainPost` | In `postReplies` mode only: `true` for the post itself, `false` for each reply under it. |
| `scrapedAt` | ISO 8601 UTC timestamp of when the record was scraped. |

### Output per profile (when `includeProfileInfo` is on)

Only the four profile modes produce this record, at most one per run, and it does not count toward `maxItems`. It is skipped if the profile header can't be read.

| Field | Description |
|---|---|
| `recordType` | Always `"profile"` for this record type. |
| `mode` | The profile mode that produced this record. |
| `username` | The profile's username. |
| `profileUrl` | Full URL of the profile on Threads. |
| `displayName` | The account's display name. |
| `bio` | Bio text, when set. |
| `followersCount` | Follower count. |
| `threadsCount` | Total number of Threads posted by the account. |
| `isVerified` | Present and `true` only when a verification badge is found on the rendered profile page. |
| `instagramUrl` | The first Instagram link found on the rendered profile page, normally the account's connected Instagram profile. |
| `scrapedAt` | ISO 8601 UTC timestamp of when the record was scraped. |

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | String (select) | `profile` | `profile`, `profileReplies`, `profileMedia`, `profileReposts`, `search`, `tag`, or `postReplies`. Required. |
| `username` | String | – | Threads username without `@`. Required for the four profile modes. |
| `searchQuery` | String | – | Keyword or phrase to search. Required for `search` mode. |
| `tag` | String | – | Hashtag/topic without `#`. Required for `tag` mode. |
| `postUrl` | String | – | Full Threads post URL. Required for `postReplies` mode. |
| `sortBy` | String (select) | `default` | `default` (top/relevance) or `recent`, for `search` mode. |
| `includeProfileInfo` | Boolean | `true` | Also emit a profile-metadata record for profile modes. Ignored in `search`, `tag` and `postReplies`. |
| `maxItems` | Integer | `25` | Maximum post/reply records to return (1–100). The optional profile record is not counted. |
| `proxyConfiguration` | Object | `{"useApifyProxy": true}` | Apify proxy configuration. |

#### Example: a profile's recent posts

```json
{ "mode": "profile", "username": "zuck", "maxItems": 25 }
```

#### Example: keyword search, most recent first

```json
{ "mode": "search", "searchQuery": "openai", "sortBy": "recent", "maxItems": 25 }
```

#### Example: hashtag search

```json
{ "mode": "tag", "tag": "ai", "maxItems": 25 }
```

#### Example: a post and its visible replies

```json
{ "mode": "postReplies", "postUrl": "https://www.threads.com/@zuck/post/DZpPDXbCeTt", "maxItems": 25 }
```

### Use cases

- **Social listening** — track mentions of a brand, product, or topic via keyword or hashtag search.
- **Competitor monitoring** — watch a competitor's Threads profile for new posts and engagement trends.
- **Partnership vetting** — check an account's follower count, bio, and recent post performance before reaching out.
- **Content curation** — pull recent posts on a topic to feature in a newsletter or roundup.
- **Thread analysis** — measure reply and repost activity on a specific post.

### FAQ

**Do I need a Threads or Instagram account?** No. Everything returned here is visible to anyone browsing Threads while logged out.

**Do I need to configure a proxy?** No. `proxyConfiguration` defaults to Apify Proxy with its automatic (datacenter) selection, and you can also turn it off to send requests directly.

**Why do I only get a handful of results per run?** Threads caps how much content it shows a logged-out visitor — after a bounded window of recent posts it shows a "Log in to see more" wall. This actor returns exactly that visible window (typically 4-25 items depending on the page) and can't go further without a login, which it doesn't use.

**Why is `postText` missing on some posts?** Image- or video-only posts can have no caption at all; the field is simply left out rather than filled with a placeholder.

**Is `likeCount: 0` a real value or a missing field?** It's real. Threads hides a button's numeric badge entirely when the count is zero; this actor reads each engagement button individually and reports the true count, including zero.

**Are the engagement counts exact?** They reflect what Threads itself displays (e.g. `"1.2K"` parsed to `1200`), which is Threads' own abbreviated public count for larger numbers, not a guaranteed exact figure.

**Can I scrape private accounts?** No. Only public profiles and posts are reachable without logging in.

**What happens if nothing is visible?** If the page doesn't exist (404), shows only a login wall, or has no posts in the logged-out window, the run finishes with an explanatory status message and an empty dataset. No placeholder records are written.

**Is this affiliated with Threads or Meta?** No. This is an independent tool and is not affiliated with, endorsed by, or sponsored by Meta Platforms, Inc.

# Actor input Schema

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

What to fetch from Threads.

## `username` (type: `string`):

Threads username without the @ sign, e.g. 'zuck'. Required for mode=profile / profileReplies / profileMedia / profileReposts.

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

Keyword or phrase to search for on Threads.

## `tag` (type: `string`):

Hashtag or topic name to search, without the # sign, e.g. 'ai' or 'mma'.

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

Full URL of a Threads post to fetch along with its visible replies, e.g. 'https://www.threads.com/@zuck/post/DZpPDXbCeTt'.

## `sortBy` (type: `string`):

Sort order for keyword search results.

## `includeProfileInfo` (type: `boolean`):

For profile modes, also push one extra record with the profile's display name, bio, follower count, verification status, and Instagram link.

## `maxItems` (type: `integer`):

Maximum number of post/reply records to return. Note: Threads caps anonymous (logged-out) viewing to a small window of recent content per page (typically 4-25 items depending on the page), so raising this above what a given page actually contains has no further effect.

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

Route requests through Apify proxy. The free AUTO (datacenter) group is enabled by default — no residential proxy or paid add-on is needed for this actor. You can disable it if you prefer direct requests.

## Actor input object example

```json
{
  "mode": "profile",
  "username": "zuck",
  "searchQuery": "openai",
  "tag": "ai",
  "postUrl": "https://www.threads.com/@zuck/post/DZpPDXbCeTt",
  "sortBy": "default",
  "includeProfileInfo": true,
  "maxItems": 25,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Dataset containing all scraped Threads posts/replies and (optionally) profile metadata.

# 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 = {
    "mode": "profile",
    "username": "zuck",
    "searchQuery": "openai",
    "tag": "ai",
    "postUrl": "https://www.threads.com/@zuck/post/DZpPDXbCeTt",
    "sortBy": "default",
    "includeProfileInfo": true,
    "maxItems": 25,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("vexaloom-labs/threads-public-post-reply-and-profile-data").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 = {
    "mode": "profile",
    "username": "zuck",
    "searchQuery": "openai",
    "tag": "ai",
    "postUrl": "https://www.threads.com/@zuck/post/DZpPDXbCeTt",
    "sortBy": "default",
    "includeProfileInfo": True,
    "maxItems": 25,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("vexaloom-labs/threads-public-post-reply-and-profile-data").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 '{
  "mode": "profile",
  "username": "zuck",
  "searchQuery": "openai",
  "tag": "ai",
  "postUrl": "https://www.threads.com/@zuck/post/DZpPDXbCeTt",
  "sortBy": "default",
  "includeProfileInfo": true,
  "maxItems": 25,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call vexaloom-labs/threads-public-post-reply-and-profile-data --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,vexaloom-labs/threads-public-post-reply-and-profile-data"
        }
    }
}
```

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/NDX2IJDj7DrmBJF2J/builds/hOOZWrjbZhHJwTuV5/openapi.json
