# Threads: Public Profiles, Posts & Replies (`deepmine/threads`) Actor

Threads Scraper for public profiles, posts and replies. Enter a username to export its profile and recent posts with text, links and engagement counts.

- **URL**: https://apify.com/deepmine/threads.md
- **Developed by:** [DeepMine](https://apify.com/deepmine) (community)
- **Categories:** Social media, Lead generation
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.89 / 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.
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 Profiles, Posts & Replies

Threads Scraper for public profiles, posts and replies. Enter a username to export its profile and recent posts with text, links and engagement counts.

### Try it: Public profile, recent posts and replies

```json
{
  "usernames": [
    "mosseri"
  ],
  "profileContent": [
    "profile",
    "posts"
  ],
  "maxItemsPerInput": 30,
  "includeReplies": true
}
```

### Output

The result fields and dataset views match [threads-scraper](https://apify.com/deepmine/threads-scraper). Open the Output tab to see the result rows, or download the dataset as JSON or CSV.

- [dataset_posts_schema.json](.actor/dataset_posts_schema.json)
- [dataset_profiles_schema.json](.actor/dataset_profiles_schema.json)
- [dataset_schema.json](.actor/dataset_schema.json)

### Pricing

The primary result price per 1,000 rows is `USD 1.59/1.29/1.09/0.89` (Free / Starter / Scale / Business).

If this Actor helps, please leave a review on its Apify Store page.

# Actor input Schema

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

Accounts, one per line: mosseri, @mosseri or threads.com/@mosseri. You get the profile and its posts; pick replies or reposts under 👤 Profile options. Empty = none.

## `maxItemsPerInput` (type: `integer`):

Most results per search term, per profile tab and per post's replies. A search term gives up to a few hundred posts (see Search depth in the README).

## `profileContent` (type: `array`):

Any mix of the profile, its posts, its replies to others (each with the post it answers) and its reposts (Threads shows the latest 25).

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

Add each linked post's replies after the post, up to 📊 Max results per input.

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

Words or hashtags, one per line, e.g. coffee or #booktok. A Threads search or tag URL works too. Empty = no search.

## `searchType` (type: `string`):

Posts that mention the term, or accounts (up to 100 per term, each with followers, bio and links).

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

Post links, one per line (threads.com/@user/post/... or threads.com/t/...). You get the post with its view count, then its replies. Empty = none.

## `sort` (type: `string`):

For search results and replies. Recent sends each batch newest first as it arrives (first rows in seconds); Recent, strict gathers more first and sorts everything.

## `onlyMatchingPosts` (type: `boolean`):

Threads also shows loosely related posts. On: keep only posts whose text, topic, hashtags or author name contain your words. Posts left out are not charged.

## `deepSearch` (type: `boolean`):

When Threads' search pages run out before your max, also read the newest posts of the authors found and of accounts matching the term, keeping posts that mention it. Off: Threads' search pages only.

## `searchFromUsernames` (type: `array`):

Optional. Usernames, one per line: the search then reads these accounts' own posts (newest first, up to 500 each) and keeps the ones that mention your term, instead of Threads' search pages. Empty = posts by anyone.

## `searchTab` (type: `string`):

All reads every Threads search page for the term (Top, Recent, #tag, related tags) and, with Search deeper, the authors' and matching accounts' posts. Top, Recent or Tags reads only that part (fewer posts, ~20 per page).

## `searchLanguage` (type: `string`):

Ask Threads for search results in this language first (the language a visitor's browser would ask for). A preference, not a filter: posts in other languages can still come. Threads' default favours English.

## `includeSearchReplies` (type: `boolean`):

Threads' search also shows replies to other posts (isReply = true). Off: posts only; replies left out are not charged.

## `includeNestedReplies` (type: `boolean`):

Under each reply, add the replies to it, up to 3 levels deep. Each row has replyDepth and parentPostId to rebuild the tree.

## `postedAfter` (type: `string`):

A date (2026-09-01) or a period (7 days, 12 hours). Empty = any time. Posts outside the window are not charged.

## `postedBefore` (type: `string`):

A date (2026-09-30) or a period. Empty = up to now.

## `resumeFromDatasetId` (type: `string`):

Optional. The dataset ID of an earlier run (its Storage tab): posts and profiles already there are skipped and not charged. Use it to continue where a run stopped, or on a schedule to get only new posts.

## `includeViewCounts` (type: `boolean`):

Read view counts for search and profile posts when Threads shows them. Long author histories save posts even if their view counts aren't ready near the time limit. Post URLs always request view counts. Same price.

## `includeAuthorDetails` (type: `boolean`):

Add the author's followers, bio, HD photo, topics, Instagram followers and bio links to every post row (looked up once per author). Same price.

## `includeReplyViewCounts` (type: `boolean`):

Read each reply's view count (viewCount): one more page per reply, read alongside the rows so the first row doesn't wait. Turn off for the fastest big reply runs. Same price.

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

Leave as is. The Actor starts on Apify datacenter IPs, which Threads serves, and moves a request to residential only if Threads refuses. Same price either way.

## Actor input object example

```json
{
  "usernames": [
    "mosseri"
  ],
  "maxItemsPerInput": 30,
  "profileContent": [
    "profile",
    "posts"
  ],
  "includeReplies": true,
  "searchType": "posts",
  "sort": "top",
  "onlyMatchingPosts": true,
  "deepSearch": true,
  "searchTab": "all",
  "searchLanguage": "any",
  "includeSearchReplies": true,
  "includeNestedReplies": true,
  "includeViewCounts": true,
  "includeAuthorDetails": true,
  "includeReplyViewCounts": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `posts` (type: `string`):

No description

## `profiles` (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": [
        "mosseri"
    ],
    "maxItemsPerInput": 30,
    "profileContent": [
        "profile",
        "posts"
    ],
    "includeReplies": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("deepmine/threads").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": ["mosseri"],
    "maxItemsPerInput": 30,
    "profileContent": [
        "profile",
        "posts",
    ],
    "includeReplies": True,
}

# Run the Actor and wait for it to finish
run = client.actor("deepmine/threads").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": [
    "mosseri"
  ],
  "maxItemsPerInput": 30,
  "profileContent": [
    "profile",
    "posts"
  ],
  "includeReplies": true
}' |
apify call deepmine/threads --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,deepmine/threads"
        }
    }
}
```

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/flf845neGYtRF2ZKV/builds/ukx36jPyNIjd5nMed/openapi.json
