# Threads Search Scraper (`khadinakbar/threads-search-scraper`) Actor

Search Meta Threads by keyword for posts or by username for user profiles. Cookieless, provider-backed, MCP-ready.

- **URL**: https://apify.com/khadinakbar/threads-search-scraper.md
- **Developed by:** [Khadin Akbar](https://apify.com/khadinakbar) (community)
- **Categories:** Social media, AI, MCP servers
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 post scrapeds

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 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.

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

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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 Search Scraper

Search **Meta Threads** (threads.com / threads.net) by keyword and get back structured JSON — no login, no cookies, no browser. Two modes in one actor: **search posts by keyword** or **search users by username**. Built for marketers, social researchers, and AI agents who need Threads data as a clean tool call.

### What you get

| Mode | Input | Output (one record per result) |
|------|-------|--------------------------------|
| **Posts** | keyword(s) like `ai agents` | post text, author, like / reply / repost / quote counts, media URLs, post URL, timestamp |
| **Users** | username fragment like `openai` | username, full name, verified flag, active-on-Threads flag, profile pic, profile URL |

Each query returns roughly 20–25 results. Pass multiple queries to widen coverage — results are merged and de-duplicated automatically.

### When to use it

- Monitor brand, topic, or hashtag conversations on Threads.
- Discover creators and accounts by name or niche.
- Feed Threads chatter into trend dashboards, sentiment pipelines, or an LLM agent.
- **Do not** use it to scrape a single known post URL or a full account's post history — those are different jobs (a post-detail or profile actor).

### Output example (posts mode)

```json
{
  "postId": "3919746476025379173",
  "code": "DZlvKb5FPll",
  "url": "https://www.threads.com/@kevbuildsai/post/DZlvKb5FPll",
  "text": "I literally have a business that is 100% automated by my AI Agents",
  "authorUsername": "kevbuildsai",
  "authorFullName": "Kev | AI Agent Automation",
  "authorIsVerified": false,
  "likeCount": 30,
  "replyCount": 11,
  "repostCount": 0,
  "quoteCount": 0,
  "mediaType": 1,
  "imageUrl": "https://...cdninstagram.com/...jpg",
  "takenAt": "2026-06-15T10:23:34.000Z",
  "query": "ai agents",
  "provider": "scrapecreators"
}
````

### Input

| Field | Type | Default | Notes |
|-------|------|---------|-------|
| `searchType` | enum | `posts` | `posts` or `users` |
| `queries` | string list | `["ai agents"]` | One or more search terms (required) |
| `maxResults` | integer | `100` | Total cap across all queries (cost control) |
| `maxResultsPerQuery` | integer | `25` | Per-query cap |
| `startDate` / `endDate` | string | — | `YYYY-MM-DD` date filter, posts only |
| `provider` | enum | `auto` | `auto` (ScrapeCreators → SociaVault fallback), or force one |

### Pricing — pay per result

| Event | Price |
|-------|-------|
| Actor start | $0.00005 |
| Post scraped | **$0.004** / post |
| User found | **$0.004** / user |

A 100-result run costs about **$0.40**. You are billed only for results actually returned. Pay-per-event and pay-per-usage are both available — pick at run time.

### Reliability

Data is sourced through resilient third-party provider APIs (ScrapeCreators primary, SociaVault fallback) so the actor keeps working without you supplying Threads cookies. If the primary provider fails on a query, the actor automatically retries the secondary one. Runs that are fully blocked fail honestly rather than returning a silent empty dataset.

### Use with AI agents (MCP)

This actor is MCP-ready and exposed as `apify--threads-search-scraper`. A single keyword in, structured JSON out — designed for Claude / GPT tool calls. Input descriptions and output keys are written for an LLM reader.

### FAQ

**Does it need my Threads/Instagram login?** No. It is cookieless and uses public data only.

**How many results per keyword?** About 20–25. Use multiple `queries` for broader coverage.

**Can I filter posts by date?** Yes, `startDate` / `endDate` (`YYYY-MM-DD`) in posts mode.

**Why might a run return fewer than `maxResults`?** Threads search simply returned fewer matches, or you hit `maxResultsPerQuery`. Broaden or add keywords.

### Legal

This actor collects only publicly available data from Meta Threads search results. You are responsible for using the data in compliance with Meta's Terms of Service, the GDPR/CCPA, and any other applicable laws and regulations. Do not use it to collect or process personal data unlawfully.

# Actor input Schema

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

What to search Meta Threads for. 'posts' searches the text of public Threads posts by keyword (e.g. 'ai agents'). 'users' searches for public Threads accounts by username keyword (e.g. 'openai'). Defaults to 'posts'. This is NOT a single-post URL scraper — it returns search-result lists.

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

One or more search terms. For 'posts' these are content keywords or hashtags (e.g. 'ai agents', 'climate tech'); for 'users' these are username fragments (e.g. 'openai'). Each query is searched independently and results are merged + de-duplicated. Provide at least one. NOT post URLs or profile URLs.

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

Hard cap on total results pushed across all queries, used for cost control. Each result is billed (see pricing). Defaults to 100. The actor stops once this many records are collected. Bounds: 1 and up.

## `maxResultsPerQuery` (type: `integer`):

Cap on results taken from each individual query before moving to the next. The provider search endpoint returns roughly 20-25 items per query, so values above ~25 rarely add more. Defaults to 25. Bounds: 1-100.

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

Optional earliest date filter for 'posts' search, format YYYY-MM-DD (e.g. '2026-01-01'). Ignored for 'users' search. Leave empty for no lower bound. Only honored by the ScrapeCreators provider.

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

Optional latest date filter for 'posts' search, format YYYY-MM-DD (e.g. '2026-06-30'). Ignored for 'users' search. Leave empty for no upper bound. Only honored by the ScrapeCreators provider.

## `provider` (type: `string`):

Which backend data provider to use. 'auto' tries ScrapeCreators first and falls back to SociaVault on failure (recommended). 'scrapecreators' or 'sociavault' force a single provider. Defaults to 'auto'. Both return the same fields.

## Actor input object example

```json
{
  "searchType": "posts",
  "queries": [
    "ai agents",
    "vibe coding"
  ],
  "maxResults": 100,
  "maxResultsPerQuery": 25,
  "startDate": "2026-01-01",
  "endDate": "2026-06-30",
  "provider": "auto"
}
```

# Actor output Schema

## `results` (type: `string`):

All scraped Threads posts or users for this run.

# 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 = {
    "queries": [
        "ai agents"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/threads-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 = { "queries": ["ai agents"] }

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

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Threads Search Scraper",
        "description": "Search Meta Threads by keyword for posts or by username for user profiles. Cookieless, provider-backed, MCP-ready.",
        "version": "0.2",
        "x-build-id": "Kaac0S36sB1CMEHXX"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/khadinakbar~threads-search-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-khadinakbar-threads-search-scraper",
                "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/khadinakbar~threads-search-scraper/runs": {
            "post": {
                "operationId": "runs-sync-khadinakbar-threads-search-scraper",
                "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/khadinakbar~threads-search-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-khadinakbar-threads-search-scraper",
                "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": [
                    "queries"
                ],
                "properties": {
                    "searchType": {
                        "title": "Search type",
                        "enum": [
                            "posts",
                            "users"
                        ],
                        "type": "string",
                        "description": "What to search Meta Threads for. 'posts' searches the text of public Threads posts by keyword (e.g. 'ai agents'). 'users' searches for public Threads accounts by username keyword (e.g. 'openai'). Defaults to 'posts'. This is NOT a single-post URL scraper — it returns search-result lists.",
                        "default": "posts"
                    },
                    "queries": {
                        "title": "Search queries",
                        "type": "array",
                        "description": "One or more search terms. For 'posts' these are content keywords or hashtags (e.g. 'ai agents', 'climate tech'); for 'users' these are username fragments (e.g. 'openai'). Each query is searched independently and results are merged + de-duplicated. Provide at least one. NOT post URLs or profile URLs.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResults": {
                        "title": "Max results (total)",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Hard cap on total results pushed across all queries, used for cost control. Each result is billed (see pricing). Defaults to 100. The actor stops once this many records are collected. Bounds: 1 and up.",
                        "default": 100
                    },
                    "maxResultsPerQuery": {
                        "title": "Max results per query",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Cap on results taken from each individual query before moving to the next. The provider search endpoint returns roughly 20-25 items per query, so values above ~25 rarely add more. Defaults to 25. Bounds: 1-100.",
                        "default": 25
                    },
                    "startDate": {
                        "title": "Start date (posts only)",
                        "type": "string",
                        "description": "Optional earliest date filter for 'posts' search, format YYYY-MM-DD (e.g. '2026-01-01'). Ignored for 'users' search. Leave empty for no lower bound. Only honored by the ScrapeCreators provider."
                    },
                    "endDate": {
                        "title": "End date (posts only)",
                        "type": "string",
                        "description": "Optional latest date filter for 'posts' search, format YYYY-MM-DD (e.g. '2026-06-30'). Ignored for 'users' search. Leave empty for no upper bound. Only honored by the ScrapeCreators provider."
                    },
                    "provider": {
                        "title": "Data provider",
                        "enum": [
                            "auto",
                            "scrapecreators",
                            "sociavault"
                        ],
                        "type": "string",
                        "description": "Which backend data provider to use. 'auto' tries ScrapeCreators first and falls back to SociaVault on failure (recommended). 'scrapecreators' or 'sociavault' force a single provider. Defaults to 'auto'. Both return the same fields.",
                        "default": "auto"
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
