# Threads Post Analyzer (`ahaham_bytiz/threads-post-analyzer`) Actor

Scrape Threads (threads.net) posts by keyword and enrich them with AI analysis: topic, sentiment, hook type, pain points, and a suggested hook for your own post.

- **URL**: https://apify.com/ahaham\_bytiz/threads-post-analyzer.md
- **Developed by:** [Max Consta](https://apify.com/ahaham_bytiz) (community)
- **Categories:** AI, Lead generation, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 threads posts

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Post Analyzer

Scrape posts from **Threads** (threads.net) by keyword and optionally enrich each post with **Claude AI analysis** — topic, sentiment, hook type, pain points, and a ready-to-use suggested hook for your own content.

Built for creators, marketers, and founders doing content research, audience discovery, or competitor analysis on Meta's Threads.

### Features

- Search Threads by one or multiple **keywords** in a single run
- Extract posts directly from Threads' server-side data — stable, no fragile DOM selectors
- Collect per-post metrics: **likes, replies, reposts, quotes**
- Filter by **time window** (last N days)
- Optional **AI enrichment** via Claude (bring your own Anthropic key)
- **Residential proxy** out of the box (Apify RESIDENTIAL group)
- **Pay-per-result** pricing — you only pay for posts actually returned

### Use Cases

- **Content research** — find what's resonating in your niche before you post
- **Pain-point mining** — discover what users complain about in your target audience
- **Competitor analysis** — see which hooks and topics your competitors' audience reacts to
- **Trend tracking** — monitor how a topic evolves on Threads week over week
- **SDR / lead gen** — spot founders and buyers publicly describing problems you solve

### How to Use

1. Enter one or more **keywords** (e.g. `indie hackers`, `solopreneur`).
2. Set **max posts per keyword** (default 50).
3. Set the **period in days** (default 30 — older posts are skipped).
4. (Optional) Toggle **AI analysis** on and paste your **Anthropic API key**.
5. Run the Actor.
6. Download the results as **JSON, CSV, Excel, or via API**.

### Output

Each item in the dataset contains:

| Field | Description |
|---|---|
| `postUrl` | Direct link to the Threads post |
| `author` / `authorHandle` | Author display name and `@username` |
| `text` | Full post text |
| `timestamp` | ISO-8601 publish time |
| `likes`, `replies`, `reposts`, `quotes` | Engagement numbers |
| `keyword` | Which input keyword produced this post |
| `ai.topic` | 2–4 word topic label (only if AI enabled) |
| `ai.sentiment` | `positive` / `neutral` / `negative` |
| `ai.hookType` | `question` / `bold-claim` / `story` / `list` / `contrarian` / `other` |
| `ai.painPoints` | Array of 1–5 pain points mentioned |
| `ai.suggestedHook` | One-line hook you can reuse for your own post |

### Example Input

```json
{
    "keywords": ["indie hackers", "solopreneur"],
    "maxPosts": 100,
    "periodDays": 30,
    "enableAIAnalysis": true,
    "anthropicApiKey": "sk-ant-..."
}
````

### Example Output Item

```json
{
    "postUrl": "https://www.threads.net/@someuser/post/Abc123",
    "author": "Some User",
    "authorHandle": "someuser",
    "text": "Just hit $1K MRR after 6 months of building in public...",
    "timestamp": "2026-04-15T10:22:00Z",
    "likes": 412,
    "replies": 38,
    "reposts": 22,
    "quotes": 4,
    "keyword": "indie hackers",
    "ai": {
        "topic": "MRR milestone",
        "sentiment": "positive",
        "hookType": "story",
        "painPoints": ["slow growth in first months", "doubt before first revenue"],
        "suggestedHook": "What nobody tells you about the first 6 months of bootstrapping"
    }
}
```

### Pricing

This Actor uses **pay-per-result**: **$0.005 per post returned**. You only pay for posts actually delivered. Failed requests and skipped items are free.

Platform infrastructure (proxy, compute) is included in the per-result price on the Apify side. If you enable AI analysis, you also pay Anthropic directly for Claude Haiku usage (roughly $0.0005 per post). The Apify side of the bill stays the same either way.

### FAQ

**Do I need my own Anthropic API key?**
Only if you enable AI analysis. You can get a key at [console.anthropic.com](https://console.anthropic.com). The Actor itself works fine without it — you just get posts without AI enrichment.

**Does it work with private or age-restricted Threads?**
No. Only publicly visible posts are returned.

**Why residential proxy?**
Threads aggressively rate-limits datacenter IPs. Residential proxy rotates per-request and drastically reduces blocks.

**How fresh are the posts?**
Results reflect whatever the Threads search returns at run time — usually within minutes of publication.

**Why are `views` not in the output?**
Threads only exposes view counts to the post author, not publicly. Other Actors that claim to return views are either guessing or scraping the author's own dashboard.

### Support

Open an issue on the Actor's Apify Store page or reach the maintainer via the contact shown in the listing.

# Actor input Schema

## `keywords` (type: `array`):

List of keywords or phrases to search on Threads. Each keyword is searched separately.

## `maxPosts` (type: `integer`):

Maximum number of posts to collect per keyword.

## `periodDays` (type: `integer`):

Only collect posts from the last N days. Older posts are skipped.

## `enableAIAnalysis` (type: `boolean`):

Run Claude Haiku on each post to extract topic, sentiment, hook type, pain points, and a suggested hook. Requires your Anthropic API key below. Without a key the Actor still scrapes posts but skips AI analysis.

## `anthropicApiKey` (type: `string`):

Required only if you enable AI analysis. Get one at console.anthropic.com. Haiku costs roughly $0.0005 per post analyzed — billed directly by Anthropic, not Apify.

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

Proxy settings. Apify residential proxy is recommended for Threads to avoid rate limits.

## Actor input object example

```json
{
  "keywords": [
    "indie hackers",
    "solopreneur"
  ],
  "maxPosts": 50,
  "periodDays": 30,
  "enableAIAnalysis": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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 = {
    "keywords": [
        "indie hackers",
        "solopreneur"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("ahaham_bytiz/threads-post-analyzer").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 = {
    "keywords": [
        "indie hackers",
        "solopreneur",
    ],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("ahaham_bytiz/threads-post-analyzer").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "keywords": [
    "indie hackers",
    "solopreneur"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call ahaham_bytiz/threads-post-analyzer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=ahaham_bytiz/threads-post-analyzer",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Threads Post Analyzer",
        "description": "Scrape Threads (threads.net) posts by keyword and enrich them with AI analysis: topic, sentiment, hook type, pain points, and a suggested hook for your own post.",
        "version": "0.1",
        "x-build-id": "RbtjN0lrLSjwqxBaO"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/ahaham_bytiz~threads-post-analyzer/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-ahaham_bytiz-threads-post-analyzer",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/ahaham_bytiz~threads-post-analyzer/runs": {
            "post": {
                "operationId": "runs-sync-ahaham_bytiz-threads-post-analyzer",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/ahaham_bytiz~threads-post-analyzer/run-sync": {
            "post": {
                "operationId": "run-sync-ahaham_bytiz-threads-post-analyzer",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "keywords"
                ],
                "properties": {
                    "keywords": {
                        "title": "Keywords",
                        "minItems": 1,
                        "maxItems": 20,
                        "type": "array",
                        "description": "List of keywords or phrases to search on Threads. Each keyword is searched separately.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxPosts": {
                        "title": "Max posts per keyword",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of posts to collect per keyword.",
                        "default": 50
                    },
                    "periodDays": {
                        "title": "Period (days)",
                        "minimum": 1,
                        "maximum": 365,
                        "type": "integer",
                        "description": "Only collect posts from the last N days. Older posts are skipped.",
                        "default": 30
                    },
                    "enableAIAnalysis": {
                        "title": "Enable AI analysis",
                        "type": "boolean",
                        "description": "Run Claude Haiku on each post to extract topic, sentiment, hook type, pain points, and a suggested hook. Requires your Anthropic API key below. Without a key the Actor still scrapes posts but skips AI analysis.",
                        "default": false
                    },
                    "anthropicApiKey": {
                        "title": "Anthropic API key",
                        "type": "string",
                        "description": "Required only if you enable AI analysis. Get one at console.anthropic.com. Haiku costs roughly $0.0005 per post analyzed — billed directly by Anthropic, not Apify."
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Proxy settings. Apify residential proxy is recommended for Threads to avoid rate limits.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
