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

Search Threads by keyword or hashtag and collect posts, reposts, replies and public profiles with likes, replies and views. No login needed. Great for finding creators, tracking conversations, monitoring your brand and spotting trends early.

- **URL**: https://apify.com/data_wiki/threads-scraper-posts-profiles-search.md
- **Developed by:** [Data WiKi](https://apify.com/data_wiki) (community)
- **Features:** Limited permissions
- **Stats:** 5 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.40 / 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

### 🚀 What is Threads Scraper - Posts, Profiles & Search?

Threads Scraper - Posts, Profiles & Search is an Apify Actor that works as a threads search scraper for public Threads data. You enter keywords, hashtags, usernames or post links, and it saves each public post or profile as one row with text, engagement counts and author details that you can export.

- **Six modes in one form:** User Posts, User Reposts, User Replies, Search, Find Profiles and Post by Link, picked with the `mode` field.
- **One flat table:** every row is either a post or a profile, and all rows share the same 107 field names.
- **Rows arrive during the run:** each username, keyword or link is saved as soon as it finishes, so the Output tab fills while the run is going.
- **No Threads account needed:** the Actor reads what any visitor of threads.com can see.
- **Bulk input:** up to 20 usernames, keywords or post links per run.

To start, open the Actor, pick a mode, add your targets and press **Start**.

### 📊 What data can you extract from Threads?

The Actor does social media data extraction for Threads only. It returns post rows (`record_type` is `post`) and profile rows (`record_type` is `profile`). Used as a threads post scraper, it keeps the text, counters and media links of each post. You can export the rows as JSON, CSV, Excel, XML or HTML. The table lists the most used fields; the dataset schema holds all 107.

| Field | Description | Example |
|---|---|---|
| `post_url`, `post_code` | Link and short code of the post | `https://www.threads.com/@northside.roasters/post/Dxample001` |
| `text_content` | Post text | `New roast is in...` |
| `created_at`, `created_at_timestamp` | Publish time in UTC (ISO 8601 and Unix) | `2026-11-05T09:30:00+00:00` |
| `like_count`, `reply_count`, `repost_count`, `quote_count`, `share_count` | Engagement counters | `128` |
| `view_count`, `view_count_status` | Views when Threads shows a number, and why it may be empty | `not_checked` |
| `media_type`, `media_url`, `media_urls` | Photo, video, carousel, GIF or text, with media links | `photo` |
| `hashtags`, `topic_tag`, `mentions`, `urls` | Entities found in or attached to the post | `["coffee"]` |
| `is_reply`, `reply_to_username`, `replied_to_text` | Reply context (Replies mode) | `false` |
| `reposted_by_username`, `reposted_at` | Who boosted a post and when (Reposts mode) | `bean.and.brew` |
| `thread_position`, `is_requested_post` | Position in the author's thread (Post by Link) | `1` |
| `username`, `display_name`, `is_verified`, `followers_count` | The author or profile | `5400` |
| `bio`, `profile_tags`, `external_links`, `bio_links` | Profile details | `["Coffee"]` |
| `emails`, `phones` | Contact details that the bio itself shows | `["hello@example.com"]` |
| `search_keyword`, `keyword_match`, `search_filter` | Which keyword produced the row and whether the text matches it | `true` |
| `is_private`, `post_count` | Profile rows only | `214` |

### 💡 Use cases for Threads data

- **Listen to a topic:** run Search with `search_filter` set to `recent` for threads social listening, and read `text_content`, `like_count` and `created_at`. Schedule the run for threads brand monitoring. Add your company name to track brand mentions in public posts. The counters per row feed your own threads post analytics.
- **Discover creators:** Find Profiles returns accounts with `followers_count`, `bio` and `profile_tags`, which supports influencer discovery in a niche. Add a place name such as a city to find creators on Threads near that place. The same list supports influencer research before you contact anyone.
- **Compare competitors:** run User Posts for several accounts and compare the counters for social media competitor analysis. Put the counts next to `followers_count` for social media engagement analysis. Divide the counters by `followers_count` to work out a threads engagement rate yourself; the Actor returns the counts, not the rate.
- **Follow hashtags:** search `#` terms to track hashtags on Threads over a date window. The `hashtags` and `topic_tag` columns show which tags a post uses. Use the results for hashtag research.
- **Read the replies:** User Replies and the `include_replies` option of Post by Link return reply text for social media sentiment analysis. The Actor delivers the text and counts; scoring is up to you.
- **Build contact lists:** profile rows list `emails`, `phones` and `bio_links` for social media lead generation, but only where a bio publishes them. The `bio_links` and `external_links` columns hold the threads bio links of each profile.
- **Archive a thread:** Post by Link keeps the linked post and the author's own posts in thread order, so you can archive Threads posts you cite.
- **Know an audience:** `bio`, `profile_tags` and `followers_count` support audience research on Threads. Each profile row shows the threads followers count in `followers_count`.

### 🛠️ How to scrape data from Threads

These steps let you scrape Threads posts and profiles without writing code.

1. Create an Apify account and open Threads Scraper - Posts, Profiles & Search in the Apify Store.
2. Choose a **Scrape mode**.
3. Fill the matching field: **Usernames or profile URLs** for the three user modes, **Keywords or hashtags** for Search and Find Profiles, or **Post links** for Post by Link. Use one entry per line, up to 20.
4. Set **Max results per username, keyword or link** (10 or more).
5. Click **Start** and watch the log for one line per finished target.
6. Open the **Output** tab, then download the dataset in the format you need.

#### How to search Threads posts by keyword

Set the mode to **Search posts by keyword** and add your terms. A threads keyword search returns `top` or `recent` public posts, as set in `search_filter`, with optional **Start date** and **End date**. With a `#` term, Search works as a threads hashtag scraper. A threads hashtag search accepts the term with or without the `#` sign. To search Threads posts in one language first, use `search_language`. That field only moves posts in the chosen language to the top; it removes nothing.

#### How to find Threads profiles by keyword

Set the mode to **Find Profiles** and add a topic or a place such as `austin coffee`. As a threads profile finder it returns up to 100 accounts per keyword, with matching accounts and larger follower counts first. Use this threads account search when you do not know the usernames yet.

#### How to collect an account's posts and its thread

Set the mode to **User Posts** and list usernames or profile URLs. This threads user posts scraper mode returns each account's public posts, and **Complete every post** adds the rest of the author's thread.

#### How to read a Threads post and its thread

Set the mode to **Post by Link** and paste post links. Each link returns the post and the author's own posts in the same thread, up to the result limit (at most 100 per link). It works like a threads thread reader that saves the whole author thread as rows.

### 💰 How much does it cost to scrape Threads?

The Actor uses pay per event pricing. You pay one `main_result` event for every post or profile row saved to the dataset, plus one `apify-actor-start` event of $0.00005 per run (the Actor is set to 1024 MB of memory, which is one start event). Apify platform usage (compute) is billed on top of the events above.

| Apify plan tier | Price per result (`main_result`) | Per 1,000 results |
|---|---|---|
| Free | $0.0020 | $2.00 |
| Bronze | $0.0018 | $1.80 |
| Silver | $0.0016 | $1.60 |
| Gold, Platinum, Diamond | $0.0014 | $1.40 |

Worked example: 500 rows at the Free tier cost 500 x $0.0020 = $1.00, and at the Gold tier 500 x $0.0014 = $0.70, plus $0.00005 for the start event. Targets that fail or are skipped save no rows and cost nothing. Set a maximum cost per run in the run options; the Actor stops cleanly at the limit and keeps every row stored so far. See the Pricing tab for current rates.

### ⬇️ Input

Only `mode` is required, and its default is `user`. The matching target field must not be empty: `usernames` for the user modes, `keywords` for Search and Find Profiles, `post_links` for Post by Link. Open the Input tab to see every option.

```json
{
  "mode": "search",
  "keywords": ["coffee subscription"],
  "max_posts": 10,
  "search_filter": "recent",
  "start_date": "7 days"
}
```

| Field | Description |
|---|---|
| `mode` | `user`, `user_reposts`, `user_replies`, `search`, `profiles` or `post_link` |
| `usernames` | Names, `@names` or profile URLs, up to 20 |
| `keywords` | Keywords or hashtags, up to 20; in the user modes they only tag rows (`keyword_match`) and drop nothing |
| `post_links` | Post links, up to 20 |
| `max_posts` | Cap per username, keyword or link, from 10 to 10,000 (Find Profiles and Post by Link stop at 100) |
| `search_filter`, `search_language` | Sort order and preferred language, Search only |
| `start_date`, `end_date` | `YYYY-MM-DD` or relative values such as `7 days`, counted in UTC |
| `min_likes` | Drop posts with fewer likes |
| `hydrate_posts` | On by default; reads each post's own page for more thread and media detail, slower |
| `include_profile_rows` | User modes: one extra profile row per account |
| `include_own_replies`, `include_replies` | Also save the account's own replies (User Posts) or other people's replies (Post by Link) |
| `enrich_authors` | Search and Post by Link: fill author details, one extra page load per author |
| `filter_dates_all_modes` | Apply the dates to the user modes and Post by Link as well |
| `concurrency`, `request_timeout`, `max_retries`, `proxyConfiguration` | Speed, patience and proxy settings |

> 💡 Keep `max_posts` low for a first test run, then raise it.

### ⬆️ Output

The scraped results are shown as a dataset in the **Storage** tab. The table view is for convenience and doesn't show **all the fields**. The Output tab also offers ready-made views: Posts, Engagement, Media, Authors & profiles, Contacts, Replies, Reposts and Post by Link threads. A run summary is saved as `SUMMARY` in the key-value store.

Example post row for the input above (shortened, with illustrative values):

```json
{
  "record_type": "post",
  "post_url": "https://www.threads.com/@northside.roasters/post/Dxample001",
  "post_code": "Dxample001",
  "text_content": "New roast is in and the subscription boxes ship Friday.",
  "created_at": "2026-11-05T09:30:00+00:00",
  "like_count": 128,
  "reply_count": 14,
  "repost_count": 6,
  "quote_count": 2,
  "share_count": 9,
  "view_count": null,
  "view_count_status": "not_checked",
  "has_media": false,
  "media_type": "text",
  "hashtags": ["coffee"],
  "is_reply": false,
  "source_tab": "",
  "username": "northside.roasters",
  "is_verified": false,
  "followers_count": 5400,
  "search_keyword": "coffee subscription",
  "keyword_match": true,
  "search_keywords": ["coffee subscription"],
  "search_filter": "recent"
}
```

#### Find Profiles output

With `{"mode": "profiles", "keywords": ["austin coffee"], "max_posts": 10}` a profile row looks like this (illustrative values):

```json
{
  "record_type": "profile",
  "username": "bean.and.brew",
  "display_name": "Bean and Brew",
  "profile_url": "https://www.threads.com/@bean.and.brew",
  "is_verified": false,
  "followers_count": 12800,
  "bio": "Austin coffee roasters. Orders: hello@example.com",
  "profile_tags": ["Coffee"],
  "emails": ["hello@example.com"],
  "phones": [],
  "bio_links": ["https://example.com/shop"],
  "is_private": false,
  "post_count": 214,
  "search_keyword": "austin coffee",
  "keyword_match": true
}
```

### ⚠️ Limitations and error handling

- Threads shows visitors only part of an account's history. The Actor reads every public page that answers without a login, so a run can return fewer rows than `max_posts`. The run summary then sets `pagination_limited`.
- Search returns whatever public results Threads offers for a term. A smaller result than your limit is normal.
- Private accounts and content hidden from visitors return nothing.
- `view_count` is often empty because Threads does not show view counts to visitors. `view_count_status` says `available`, `not_public_yet` (very recent posts) or `not_checked`.
- `is_repost` is always `false`; repost rows carry `reposted_by_username` instead.
- `emails` and `phones` are filled only when the bio contains them.
- `max_posts` below 10 is raised to 10, and Find Profiles and Post by Link never return more than 100 per keyword or link.
- Find Profiles ignores the date fields.
- If Threads rejects a request, the Actor retries, starts using a proxy and keeps it for the rest of the run.

Each target gets a status in the `SUMMARY` record:

| Status | Meaning | What to do |
|---|---|---|
| `ok` | Target finished | Open the dataset |
| `request_failed` | The page could not be loaded (network or block) | Run again later or choose a proxy |
| `not_found_or_private` | Account missing, private or hidden from visitors | Check the username |
| `no_tab_data` | The page showed no posts to a visitor | Try a different mode or account |
| `login_wall` | The search page asked for a login | Run again later |
| `invalid_link` | Not a Threads post link | Paste a full post link |
| `not_found_or_unavailable` | Post missing or unavailable | Check the link |
| `error` | Unexpected error for that target | Run it again alone |

The run stops with a message if the mode is unknown or the matching target field is empty.

### 🔌 Integrating Threads Scraper - Posts, Profiles & Search with other apps

You can start the Actor through the [Apify API](https://docs.apify.com/api/v2) with the Actor ID `data_wiki/threads-scraper-posts-profiles-search`, run it on a schedule, and send finished datasets onward. See the API tab for ready-made code in JavaScript, Python and the CLI.

- [Apify schedules](https://docs.apify.com/actors/running/schedules) repeat a saved input daily or weekly, for example a Search run with `start_date` set to `7 days`.
- [Webhooks](https://docs.apify.com/integrations/webhooks) call your own service when a run finishes.
- [Make](https://docs.apify.com/integrations/make) and [Zapier](https://docs.apify.com/integrations/zapier) pass the rows to spreadsheets and other apps.
- Other options are listed in the [Apify integrations](https://docs.apify.com/integrations) docs.

AI agents can start the Actor through the [Apify MCP server](https://docs.apify.com/mcp).

### 🔗 Other Threads scrapers by data_wiki

| Actor | What it extracts | When to use it |
|---|---|---|
| [Meta Threads Profile Scraper](https://apify.com/data_wiki/meta-threads-profile-scraper) | One row per profile with followers, bio, topics and optional posts, replies, reposts or media | You already know the accounts and want profile-first results |
| [Threads Scraper](https://apify.com/data_wiki/threads-scraper) | Profile cards, posts, search results and post URLs, with the replies under each post as extra rows | You need the reply thread under every post or the Both sort option |
| [Bluesky Scraper Enterprise Grade](https://apify.com/data_wiki/bluesky-scraper-enterprise-grade) | Public Bluesky posts, comments, profiles and followers by keyword, hashtag, handle or link | Your listening also covers Bluesky, a different network |
| [Contact Details Scraper](https://apify.com/data_wiki/contact-details-scraper) | Emails, phone numbers and social links from any list of websites | You collected website links from Threads bios and want contact details from those sites |

### ⚖️ Is it legal to scrape Threads?

Threads Scraper - Posts, Profiles & Search only collects data that users have made public on Threads and does not extract private data. Results can still contain personal data such as names, bios, emails or phone numbers from bios. Collect it only with a legitimate reason, check the Threads terms and rules such as the GDPR, and consult a lawyer if you are unsure. Apify explains the topic in [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/) and [What is ethical web scraping?](https://blog.apify.com/what-is-ethical-web-scraping-and-how-do-you-do-it/). The public site is [Threads](https://www.threads.com).

### ❓ FAQ

#### What can the threads search scraper collect?

The threads search scraper collects public posts, reposts, replies and profiles, depending on the mode. Each row has text, engagement counters, media links and author details.

#### Do I need to log in to Threads?

No. The Actor reads only what a visitor of threads.com sees, so no login is needed, and private content is not collected.

#### Can I search Threads without an account?

Yes. The Actor reads public results, so no Threads account is needed. You still need an Apify account to run it.

#### Which Threads Actor should I use?

Use Threads Scraper - Posts, Profiles & Search when you start from keywords, hashtags or post links, or want reposts, replies and bio contact details; it has six modes and 107 flat fields. The [reply-thread Threads Actor](https://apify.com/data_wiki/threads-scraper) has four modes, 37 fields, the replies under each post and a Both sort order. The [profile-first Threads Actor](https://apify.com/data_wiki/meta-threads-profile-scraper) returns one row per profile, optionally with a feed that includes media, and charges per saved item.

#### Is there a Threads scraper API?

You can run this Actor through the Apify API and read its dataset the same way. It is not an official Threads API, and it needs no Threads token.

#### How do I get the data out?

Threads data export works from the Storage tab in JSON, CSV, Excel, XML or HTML, or through the API. To export Threads posts on a schedule, save the input as a Task and attach a schedule. Choose CSV when you want to export Threads data to CSV for a spreadsheet.

#### Why did I get fewer posts than my limit?

Threads shows only part of an account's history to visitors, and a search returns what is public. The run summary tells you when this happened.

#### Can it read replies and reposts?

Yes. The User Replies mode works as a threads replies scraper for an account, and the User Reposts mode lists what an account boosted, with the original post. Threads reposts rows carry `reposted_by_username` and `reposted_at`.

#### Can I use it from code?

Yes. Call the Apify API with the input fields shown above. A Threads data scraper run returns the same rows as the Console.

#### Can I use it through an MCP server?

Yes. Add the Apify MCP server to your AI client, search for this Actor and call it with the same input.

### 💬 Your feedback

Found a bug or need a field added? Open an issue from the **Issues** tab of this Actor. Need a custom solution? Contact hello.datawiki@gmail.com.

# Changelog

This Actor's version history is a separate document: https://apify.com/data_wiki/threads-scraper-posts-profiles-search/changelog.md

# Actor input Schema

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

Pick one, then fill the matching field below:
• 👤 User Posts → 👤 Usernames. The account's public posts.
• 🔁 User Reposts → 👤 Usernames. What the account boosted, and when.
• 💬 User Replies → 👤 Usernames. The account's replies, with the post answered when shown.
• 🔎 Search → 🏷️ Keywords. Posts matching keywords or hashtags, optional dates.
• 👥 Find Profiles → 🏷️ Keywords. Matching accounts, up to 100 per keyword.
• 🔗 Post by Link → 🔗 Post links. Each post plus the author's posts in its thread.

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

Required in 👤 User Posts, 🔁 User Reposts and 💬 User Replies (ignored elsewhere). One per line, up to 20: a bare name (zuck), an @-name (@zuck) or a full profile URL (https://www.threads.com/@zuck). Paste a whole list at once for bulk runs.

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

Required in 🔎 Search and 👥 Find Profiles. Optional in the three User modes, where matching rows are tagged (keyword_match) and nothing is dropped. The # is optional: 'AI' and '#AI' both work. In Find Profiles a place name ('austin coffee') helps surface local accounts. Up to 20.

## `post_links` (type: `array`):

Required in 🔗 Post by Link (ignored elsewhere). One Threads post link per line, up to 20: a post address (https://www.threads.com/@zuck/post/DTa3-B1EbTp), a threads.net link, a /t/ short link or a share link. Each link returns its post and the author's own posts in the same thread, up to 🔢 Max results per link (at most 100).

## `max_posts` (type: `integer`):

A cap per username, keyword or post link; all results share one dataset.
• 👤 User Posts / 🔁 Reposts / 💬 Replies: depends on how many public posts the account shows.
• 🔎 Search: public results may be fewer than your limit.
• 👥 Find Profiles: the smaller of your limit and 100 per keyword.
• 🔗 Post by Link: posts per link, from the linked post outward; at most 100.

## `search_filter` (type: `string`):

Only used in 🔎 Search. 'Top' returns what Threads surfaces as most relevant for the term. 'Recent' starts with the newest matching public posts and reaches further back in time as the limit grows.

## `search_language` (type: `string`):

Only used in 🔎 Search. Posts written in this language are listed first; nothing is dropped. Leave on English to keep the natural order.

## `start_date` (type: `string`):

Used in 🔎 Search to keep posts from this date onward. YYYY-MM-DD or a relative value such as '7 days' or '1 month'. Dates are counted in UTC. Other modes ignore it unless 🎯 Apply dates in every mode is on.

## `end_date` (type: `string`):

Used in 🔎 Search to keep posts up to this date (inclusive). YYYY-MM-DD is clearest; a relative value such as '1 day' means that long ago. Dates are counted in UTC.

## `hydrate_posts` (type: `boolean`):

Reads each collected post's own page to add the rest of the author's thread, exact engagement counts and media details. Slower but more complete. Turn off for the fastest run.

## `include_profile_rows` (type: `boolean`):

User modes only: adds a `profile` row (followers, bio, links, post count) for every scraped account next to its posts.

## `include_own_replies` (type: `boolean`):

👤 User Posts only: also saves the account's replies to other people when the limit is not yet reached.

## `include_replies` (type: `boolean`):

🔗 Post by Link only: also saves other people's replies to the linked post (those shown publicly), each with the post it answered.

## `enrich_authors` (type: `boolean`):

🔎 Search and 🔗 Post by Link: opens each author's profile to fill followers, bio, links and verification on every row. Adds one page load per distinct author.

## `min_likes` (type: `integer`):

Drop posts with fewer likes than this. 0 keeps everything.

## `filter_dates_all_modes` (type: `boolean`):

Applies 📅 Start date / End date to the User and Post by Link modes too, not only to Search.

## `concurrency` (type: `integer`):

How many usernames, keywords or links are processed at the same time (1–16).

## `request_timeout` (type: `integer`):

Seconds to wait for one page before giving up on that attempt.

## `max_retries` (type: `integer`):

How many times a failed or rate-limited request is retried with exponential back-off (also the number of retries on the residential proxy).

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

Default: no proxy – requests go to Threads directly. When Threads rejects or blocks a request the run switches to an Apify datacenter proxy, then to a residential proxy (with retries), and keeps the residential proxy for the rest of the run. Pick a proxy here to start with it instead.

## Actor input object example

```json
{
  "mode": "user",
  "usernames": [
    "zuck"
  ],
  "max_posts": 10,
  "search_filter": "top",
  "search_language": "english",
  "hydrate_posts": true,
  "include_profile_rows": false,
  "include_own_replies": false,
  "include_replies": false,
  "enrich_authors": false,
  "min_likes": 0,
  "filter_dates_all_modes": false,
  "concurrency": 4,
  "request_timeout": 30,
  "max_retries": 3,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Every stored row with the most useful post columns.

## `engagement` (type: `string`):

Likes, replies, reposts, quotes, shares and views per post.

## `media` (type: `string`):

Photos, videos, carousels, GIFs and stickers attached to each post.

## `authors` (type: `string`):

Author / profile columns: followers, bio, links, verification.

## `contacts` (type: `string`):

Emails, phones and links found in bios.

## `replies` (type: `string`):

Reply rows with the post they answered.

## `reposts` (type: `string`):

Repost rows: the original post plus who boosted it and when.

## `threads` (type: `string`):

Posts saved from links, in thread order.

## `summary` (type: `string`):

Rows stored and charged, per-target status, request counts and proxy tier.

# 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": "user",
    "usernames": [
        "zuck"
    ],
    "max_posts": 10,
    "search_filter": "top",
    "search_language": "english"
};

// Run the Actor and wait for it to finish
const run = await client.actor("data_wiki/threads-scraper-posts-profiles-search").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": "user",
    "usernames": ["zuck"],
    "max_posts": 10,
    "search_filter": "top",
    "search_language": "english",
}

# Run the Actor and wait for it to finish
run = client.actor("data_wiki/threads-scraper-posts-profiles-search").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": "user",
  "usernames": [
    "zuck"
  ],
  "max_posts": 10,
  "search_filter": "top",
  "search_language": "english"
}' |
apify call data_wiki/threads-scraper-posts-profiles-search --silent --output-dataset

```

## MCP server setup

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

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/x3z5sJvs8sqQMSTCZ/builds/nf9junW4gBJL4HyV4/openapi.json
