# Threads Scraper - Posts, Profiles & Search (`muhammadafzal/threads-posts-profiles-search-scraper`) Actor

Extract public Threads posts, profiles, keyword search and user discovery. Get text, timestamps, media URLs and engagement counts. ScrapeCreators powered; no cookies required. Recent public windows only.

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

## Pricing

from $8.00 / 1,000 threads 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 Scraper - Posts, Profiles & Search

Collect public Threads posts, profile details, keyword results, and user discovery results through ScrapeCreators. No Threads login or cookies required. The owner configures `SCRAPECREATORS_API_KEY` privately; buyers never provide a provider key.

### Inputs

- `posts`: `handles` with usernames or Threads profile URLs; recent public posts.
- `profiles`: `handles`; profile name, biography, followers, verification and bio links.
- `post`: `postUrls`; single posts, optionally `includeReplies` for visible public replies.
- `search`: `queries`; keyword discovery with optional `startDate` and `endDate` in YYYY-MM-DD.
- `users`: `queries`; discover public users by username. Discovery results have fewer profile fields; missing fields remain null.

```json
{"mode":"posts","handles":["zuck"],"maxResults":5,"maxResultsPerTarget":5,"maxRequests":2}
```

```json
{"mode":"search","queries":["technology"],"maxResults":10,"maxRequests":2}
```

```json
{"mode":"profiles","handles":["zuck"],"maxResults":1,"maxRequests":2}
```

Results are deduplicated by stable profile/post identity. Each row has `type`, `id`, `url`, `username`, `source` and `scrapedAt`. Post rows include text, UTC publish time, nullable engagement counts, hashtags, mentions, and available image/video URLs. Profile rows include nullable biography, follower count, verification, picture URL and bio links. Diagnostics are in the `OUTPUT` key-value record.

### Limits and reliability

The provider exposes recent public windows, not complete account history. Its documentation describes approximately 20–30 recent user posts and about 10 keyword results, but observed counts vary. No documented cursor pagination is advertised. Related posts and author continuation posts from the detail endpoint are excluded. Replies are limited to the visible window returned by that endpoint. Media URLs may expire. Private or unavailable content is not collected.

`maxResults` caps the whole dataset; `maxResultsPerTarget` caps each input target. Verified free-plan runs are capped at five delivered business records, before provider calls and before writes. An unknown local plan does not trigger this cap. At most 20 input targets and 20 provider attempts are allowed. Defaults: 20 total records, 20 per target, 10 provider attempts. The Actor runs sequentially, uses a 45-second request timeout, at most one retry, and a 170-second internal deadline. It stops after two consecutive provider failures and preserves partial results. Input is validated before API calls. API failures are explicit; no fabricated records or silent success.

### Pay per event

All-in proposed tier prices (live verification required):

| Event | FREE | BRONZE (2.5%) | SILVER (5%) | GOLD (20%) |
|---|---:|---:|---:|---:|
| Actor start | $0.020 | $0.0195 | $0.019 | $0.016 |
| Unique dataset result | $0.010 | $0.00975 | $0.0095 | $0.008 |

FREE examples: one result $0.03, five results $0.07, twenty results $0.22. Start fee applies even when no public result is available. No result event is charged for empty, rejected, or failed targets. One synthetic dataset event per delivered record; no manual or duplicate charge. Platform-usage pass-through is disabled. Charge limits can reduce delivery; `maxRequests` separately bounds provider work. Provider invoices are distinct from Apify compute usage. Final prices depend on measured canaries and verified live settings.

Use public data for a legitimate purpose and comply with applicable law and platform/provider terms. This Actor is independent of Meta and Threads.

### Development

Node.js 22 and Apify SDK 3. Run `npm ci`, `npm test`, then `apify run` with the owner's provider key in the environment. Cloud secrets use `@SCRAPECREATORS_API_KEY`. New Actor and Tasks remain private until owner publication.

# Actor input Schema

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

Recent public posts, profile details, a single post, keyword search, or user discovery.

## `handles` (type: `array`):

Required for posts and profiles. Usernames or public Threads profile URLs; at most 20.

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

Required for single post mode. Public threads.com or threads.net post URLs.

## `queries` (type: `array`):

Required for keyword or user search. At most 20 terms; one available public window per term.

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

Maximum unique records per run. Verified free-plan runs are capped at five.

## `maxResultsPerTarget` (type: `integer`):

Upper bound per username, URL, or query; available public results may be fewer.

## `maxRequests` (type: `integer`):

Hard bound on API attempts, including retries. Each live provider request normally costs one credit.

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

Single post mode only. Include the public comments returned with the post. No exhaustive reply pagination.

## `startDate` (type: `string`):

Keyword search only, inclusive YYYY-MM-DD date filter. Provider availability applies.

## `endDate` (type: `string`):

Keyword search only, YYYY-MM-DD; on or after startDate.

## Actor input object example

```json
{
  "mode": "posts",
  "handles": [
    "zuck"
  ],
  "maxResults": 20,
  "maxResultsPerTarget": 20,
  "maxRequests": 10,
  "includeReplies": false
}
```

# Actor output Schema

## `results` (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 = {
    "handles": [
        "zuck"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("muhammadafzal/threads-posts-profiles-search-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 = { "handles": ["zuck"] }

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

```

## MCP server setup

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