# Search Threads By Keywords (`insights_data/search-threads-by-keywords`) Actor

Search Threads by keyword, #hashtag, phrase or @username. Get post text, author, likes, replies, reposts, quotes, hashtags, links, images and videos, plus author followers and bio as clean JSON. Live results, no account, cookies or API key needed.

- **URL**: https://apify.com/insights_data/search-threads-by-keywords.md
- **Developed by:** [Insights Data](https://apify.com/insights_data) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.50 / 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 Search Threads By Keywords?

**Search Threads By Keywords** helps marketers, PR teams and researchers with Threads social listening: see what people post about a brand, product, topic or #hashtag, and how much engagement those posts get. This Threads scraper takes keywords, #hashtags, phrases or @usernames and saves the matching public posts, with likes, replies, reposts, quotes, hashtags, mentions, links, media and author details.

To try it on the Apify Free plan with its $5 monthly credit, enter a keyword such as `#AI` and click **Start**. You don't need to write code, log in to Threads or get an API key. Posts are saved while the run is going, so you can watch the results fill up.

- 👂 **Brand and market listening:** collect what people say about your brand, product or campaign, with the text and engagement of each post.
- 🥊 **Competitor analysis:** search competitor names and #hashtags to see what people say about them, or add their `@accounts` to compare the engagement of their own posts.
- 🌟 **Influencer discovery:** find the authors who post about a topic, with followers, bio, bio links and profile topics, and shortlist them for Threads influencer marketing.
- 📈 **Trend research and hashtag research:** see which posts on a topic or #hashtag get the most likes, replies and reposts.
- 🧠 **Content research:** gather top posts and the links people share on a topic to get ideas for your own posts.
- 💭 **Market research and Threads sentiment analysis:** export the post text and numbers to your own analysis tool, dashboard or LLM. The Actor collects the posts; scoring sentiment is up to your tool.

#### What can Search Threads By Keywords do?

- 🔍 **Keyword, phrase and #hashtag search:** one search per line. Threads search links also work.
- 👤 **Posts of one account:** `@username` returns that account's own posts. `@username word` returns only their posts that contain the word.
- 📊 **Engagement per post:** likes, replies, reposts, quotes and one total `engagement` number.
- 🗂️ **Extra tables:** besides the posts table, you get separate tables for authors, media, links, related posts and searches.
- 📅 **Date and sort filters:** Newest first or Top posts first, and an **Only newer than** filter such as `7d`.
- 🔌 **Apify platform built in:** run it through the API, schedule it, get notified with webhooks, and connect it to Make, Zapier, n8n, Google Sheets or AI agents. It uses Apify Proxy automatically when needed.

***

### 📋 Threads scraper data fields

Each saved post is one row in the posts table. A post appears once for each search (input line) that found it. These are the fields:

| Field | What you get |
|---|---|
| 📝 `text` | Post text |
| 👤 `author`, `author_name`, `author_id`, `verified` | Username, display name, Threads user ID and verified badge |
| 📅 `created_at`, `age_hours` | Post time (UTC) and the post's age in hours when it was collected |
| ❤️ `like_count`, `reply_count`, `repost_count`, `quote_count` | Likes, direct replies, reposts and quote posts |
| 📊 `engagement` | Likes + replies + reposts + quotes |
| 🏷️ `hashtags` | Hashtags used in the text (without #) |
| 📣 `mentions` | Usernames that the post mentions |
| 🔗 `id`, `url`, `urls`, `link_preview` | Post ID, post link, links in the post, and the link card (url, title, site, image) |
| 📸 `media`, `post_type` | Images and videos (type, url, thumbnail, width, height, alt) and the post type: text, image, video, carousel or media |
| ↩️ `is_reply`, `reply_to`, `parent_post`, `quoted_post`, `reposted_post`, `is_repost` | Thread context: the post a reply answers, plus quoted and reposted posts |
| 👥 `follower_count`, `author_bio`, `author_bio_links`, `author_topics` | Author profile details (only when **Add author profile details** is on) |
| 🌍 `lang`, `topic`, `location` | Language code, the post's topic tag and the tagged place |
| 🔖 `keyword`, `matched_keywords`, `match`, `rank` | Which search found the post, how it matched, and the order it was saved in |

Other fields (filled from the post, whatever the author setting): `author_profile_url`, `author_profile_pic`, `author_is_private`, `is_edited`, `reply_control`, `is_sponsored`, `location_id`, `scraped_at`.

To compare Threads engagement between posts, open the **Engagement** view in the Output tab.

> **Note:** A field that does not apply to a post is `null`, for example `parent_post` on a post that is not a reply. Author profile fields stay empty for private profiles or profiles that could not be read. The run log tells you how many posts have no author profile details.

#### How do I find Threads mentions of my brand?

Search your **brand name** (and its #hashtag) as a keyword. That finds posts whose text contains the name, including posts that tag `@yourbrand`. A line with `@` and a Threads username (letters, numbers, dots and underscores), such as `@yourbrand`, does something else: it returns the posts written **by** that account. In those rows, `mentions` lists the accounts *your brand* mentioned. So you can't search for the text `@yourbrand` itself. A line like `@my-brand`, which is not a valid username, runs as a normal text search.

#### What data can't it extract?

This Threads data scraper only collects what Threads shows to visitors who are not logged in, so it can't get:

- View counts and following counts.
- Private posts, or details of private profiles.
- The full reply thread or all comments under a post. You only get the post a reply answers, plus quoted and reposted posts.

To collect public posts on other networks, see [Facebook Post Scraper](https://apify.com/insights_data/facebook-post-scraper) and the other Actors listed under "Other social media scrapers" below.

***

### 🛠️ How to scrape Threads posts by keyword

You don't need any coding experience. Here is how to scrape data from Threads in five steps:

1. [Create a free Apify account](https://console.apify.com/sign-up) using your email.
2. Open [Search Threads By Keywords](https://apify.com/insights_data/search-threads-by-keywords).
3. Add your keywords, #hashtags or @users in **Keywords, #hashtags or @users**, one per line.
4. Set **Max posts**, then click **Start** and wait for the run to finish.
5. Download your data in JSON, CSV, Excel, XML or HTML. The steps are under "Tables, views and the run summary" in the Output section.

***

### 💲 Threads scraper pricing: how much does it cost?

Search Threads By Keywords uses **pay-per-event** pricing. Your bill has three parts:

1. **Results:** you pay for each post saved to the posts table. The price depends on your Apify plan (see the table below).
2. **Start fee:** $0.00005 per GB of run memory. At the default 1 GB, that is **$0.00005 per run**.
3. **Platform usage:** the resources the run uses on Apify, billed separately.

| Apify plan | Price per result | Price per 1,000 results |
|---|---|---|
| 🆓 Free | $0.006 | $6.00 |
| 🚀 Starter | $0.0055 | $5.50 |
| 📦 Scale | $0.005 | $5.00 |
| 🏢 Business and higher | $0.0045 | $4.50 |

The plan discount applies to the result price only. The start fee is the same on every plan, and platform usage is billed at your Apify plan's own rates.

Examples of result charges:

- 10 posts at the Free plan price: 10 × $0.006 = $0.06.
- 1,000 posts on the Starter plan: 1,000 × $0.0055 = $5.50.

The start fee and platform usage come on top. Platform usage depends on the run, so we don't give a number for it. To learn your real cost:

1. Do a small test run, for example with one keyword and Max posts 10.
2. Open the run page in Apify Console and read the total cost of that run.
3. Before bigger runs, set a **maximum charge limit** in the run options when you start the run. When the limit is reached, the Actor stops cleanly and keeps every post it has saved.

What you pay for:

- **Billed:** every post saved to the posts table. This includes posts marked `match` = `author` or `related` (see the Output section).
- **Billed once per line:** a post found by two of your lines is saved once for each line, so it is billed twice. Inside one line, a post is saved only once.
- **Not billed:** rows in the authors, media, links, related posts and searches tables.

See the [pricing tab](https://apify.com/insights_data/search-threads-by-keywords/pricing) for details.

#### Can I use this Threads scraper free?

Yes. The [Apify Free plan](https://apify.com/pricing) includes $5 of platform credit every month. That credit pays for the result charges, the start fee and platform usage. Free-plan runs work the same as paid runs: **Max posts** sets the number of posts for each line, and you pay the Free plan price per result shown above.

***

### ⬇️ Input

A Threads keyword search needs only one field: **Keywords, #hashtags or @users**. Everything else has a default. You can fill in the form in Apify Console or send the input as JSON through the API.

#### Settings most people change

| Setting | What it does | Default |
|---|---|---|
| ✏️ **Keywords, #hashtags or @users** (`urls`) | Words, phrases, #hashtags or @usernames, one per line. Threads search links and profile links also work. | `#AI` (prefill) |
| 🔢 **Max posts** (`maxItems`) | Posts to save for **each** line. `0` = everything Threads shows. | `10` |
| ⏱️ **Sort order** (`sort`) | **Newest first** (`recent`) or **Top posts first** (`top`) | Newest first |
| 📅 **Only newer than** (`since`) | Skip older posts: `24h`, `7d`, `2w` or a date like `2026-10-01` | empty |
| 👥 **Add author profile details** (`includeAuthorProfile`) | Adds followers, bio, bio links and topics of every author to each post | on |

Leave **Proxy** (`proxyConfiguration`) as it is.

Here's an example that searches a #hashtag and one account, newest posts first:

```json
{
  "urls": ["#AI", "@nasa"],
  "maxItems": 10,
  "sort": "recent",
  "includeAuthorProfile": true
}
```

This gives up to 20 posts (10 per line).

See the [input tab](https://apify.com/insights_data/search-threads-by-keywords/input-schema) for every field.

#### Keywords, #hashtags or @users

Each line is its own search:

- To use the Actor as a Threads hashtag scraper, start the line with `#`.

- To get Threads user posts from one account, start the line with `@` and the username.

- Lines that differ only in upper and lower case are searched once.

- ✅ Good: `#AI`, `electric cars`, `@nasa`, `@nasa moon`, `https://www.threads.com/search?q=coffee`, `https://www.threads.com/@nasa`

- ❌ Bad: a link to a single post, such as `https://www.threads.com/@nasa/post/...` (it is skipped)

Keyword searches can also return posts that match only by author name (`author`), or that Threads related to your keyword (`related`). These posts are saved and billed, and there is no setting to turn them off. To keep only posts whose text contains your keyword, filter the export by `match` = `text`.

> ⚠️ **Max posts** counts per line, not per run. Three lines with Max posts 50 can give up to 150 posts, and each saved post is billed. Max posts `0`, or an `@user` line without **Only newer than**, can save many posts and cost more. In those cases, set a maximum charge limit before you start.

#### Only newer than

Use a relative time (`24h`, `7d`, `2w`) or a date (`2026-10-01`). If you leave it empty, keyword searches look back about 30 days. With **Top posts first**, a few older top posts can still appear. An `@user` line without this filter reads that account's posts from newest to oldest. A date in the future stops the run with an input error.

***

### ⬆️ Output

Results appear in the **Output** tab while the run is going.

#### Tables, views and the run summary

- **Posts table:** the main results, one row per saved post. Its five views (Posts, Engagement, Content, Authors and Thread context) show different columns of the same rows.
- **Extra tables:** these are free, and each is its own table:
  - authors: one row per author
  - media: one row per image or video
  - links: one row per link
  - related posts: posts that were replied to, quoted or reposted
  - searches: one row per input line
- **Run summary:** totals for the run. It shows posts saved, posts charged, searches, searches with problems and keywords without posts, and whether your maximum charge limit was reached.

You can open all of them from the Output tab. To export Threads posts or any extra table, open the run's **Storage** tab, go to **Datasets**, pick the table and click **Export**. Formats are JSON, CSV, Excel, XML or HTML, and you can choose only the fields you need.

#### JSON example

A real row for the `@nasa` line, taken from an earlier test run. Some fields are left out and the text is shortened; a full row has every field listed in the data fields table. `rank` 2 means it was the second post saved in that test run.

```json
{
  "rank": 2,
  "id": "4007205075076613784",
  "text": "A \"space jellyfish\" happens near sunrise or sunset when the…",
  "author": "nasa",
  "created_at": "2026-10-13T18:28:11Z",
  "like_count": 4192,
  "reply_count": 17,
  "repost_count": 90,
  "quote_count": 11,
  "engagement": 4310,
  "hashtags": [],
  "media": [],
  "post_type": "text",
  "url": "https://www.threads.com/@nasa/post/Decc8jiFYaY",
  "verified": true,
  "follower_count": 12789004,
  "author_profile_url": "https://www.threads.com/@nasa",
  "keyword": "@nasa",
  "matched_keywords": ["@nasa"],
  "match": "author"
}
```

#### Searches table and match values

The searches table has one row per input line. Each row has `keyword`, `mode` (`keyword search` or `user feed`), `status`, `posts_saved`, `requests` and `searched_at`.

| Status | Meaning |
|---|---|
| ✅ `ok` | The search finished |
| 🎯 `full` | Max posts or your maximum charge limit was reached |
| ⏹️ `limit` | The search stopped before Max posts (see "How many results can you get?") |
| 🕳️ `empty` | No posts were found |
| ⚠️ `error` | The search stopped early. The other searches went on. Run that line again later |

The `match` field tells you why a post was saved:

- `text`: every word of your keyword is in the post.
- `author`: the keyword is in the author's username or name.
- `related`: Threads returned the post for your keyword, but the text does not contain the keyword.

***

### 💡 Tips and advanced usage

#### How many results can you get?

You get up to **Max posts** for each line, and with `0` you get everything Threads shows. Threads shows visitors who are not logged in only a limited set of posts per search, so rare keywords can return few posts or none. Each search also has a built-in limit on how far it goes. The Actor does not publish this number. When a search hits it, its row in the searches table shows `limit`.

#### Get faster or cheaper results

- 👥 Switch off **Add author profile details** if you don't need followers and bios. The Actor then has less to load.
- 📅 Use **Only newer than** (for example `24h`) to keep only fresh posts.
- 🏷️ If a Threads hashtag search returns few posts, try the plain word instead, or the other way round.

#### Run it on a schedule

For ongoing Threads data collection, here is a daily Threads brand monitoring setup:

1. Fill in your brand name and product #hashtag, set **Only newer than** to `24h`, and save the input as a [task](https://docs.apify.com/platform/actors/running/tasks). A task is your saved input, so you can rerun it without filling in the form again.
2. Add an [Apify schedule](https://docs.apify.com/platform/schedules) that runs the task every morning, or weekly.
3. Each run creates a new dataset. Merge the runs in a spreadsheet and remove duplicates by `id`, then compare them by `created_at` and `engagement`.

Keep **Max posts** at a fixed number (not `0`) for daily runs, so each run bills at most Max posts × the number of lines in results, plus the start fee and platform usage.

***

### 🔌 Threads scraper integrations and API

#### Can I use it as a Threads search API?

Yes, you can use it as a Threads API scraper. The [Apify API](https://docs.apify.com/api/v2) starts runs, waits for them and returns the results as JSON. Use the `apify-client` package for [Node.js](https://apify.com/insights_data/search-threads-by-keywords/api/javascript) or [Python](https://apify.com/insights_data/search-threads-by-keywords/api/python). The [API tab](https://apify.com/insights_data/search-threads-by-keywords/api) has code you can copy.

#### Threads scraper Python example

With the Python client, the Actor works like a Threads keyword search API: you send keywords and get posts back.

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("insights_data/search-threads-by-keywords").call(
    run_input={"urls": ["#AI", "@nasa"], "maxItems": 10, "sort": "recent", "includeAuthorProfile": True}
)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["author"], item["engagement"], item["url"])
```

#### Can I integrate it with other apps?

Yes. [Apify integrations](https://apify.com/integrations) connect it to Make, Zapier, n8n, Slack, Google Sheets, Google Drive, Airbyte and more. Here are two social media monitoring workflows you can set up yourself:

- 📗 **Google Sheets brand tracker:** in your saved task, add the Google Sheets integration and pick a sheet. Each finished run then adds its posts to that sheet. Daily runs can repeat posts, so remove duplicates by `id`.
- 🔔 **Slack alerts:** build a Threads n8n workflow with the [Apify node for n8n](https://docs.apify.com/platform/integrations/n8n), or start one from a [webhook](https://docs.apify.com/integrations/webhooks) when a run succeeds. In your flow, add a filter that keeps posts with high `engagement`, and a Slack step that sends them to a channel. The Actor provides the data; the filter and the Slack step are parts you build.

#### Can I use it with AI agents (Threads MCP)?

Yes. Through the Apify MCP server, Claude and other MCP clients can find this Actor, run it and read the results. The [MCP tab](https://apify.com/insights_data/search-threads-by-keywords/api/mcp) has the setup steps.

***

### 🧩 Other social media scrapers

These Actors from the same team cover Facebook, Instagram and other networks, so you can follow the same brand or topic across platforms:

| Actor | What it does |
|---|---|
| 🎥 [Facebook Post and Reel Scraper](https://apify.com/insights_data/facebook-post-and-reel-scraper) | Facebook posts, reels and videos with views, reactions, comments and transcripts |
| 📘 [Facebook Post Scraper](https://apify.com/insights_data/facebook-post-scraper) | Public Facebook posts from pages, profiles and groups, with reactions, comments and shares |
| 📷 [Instagram Profile Scraper](https://apify.com/insights_data/instagram-profile-scraper) | Public Instagram profiles with bio, followers, engagement rate and latest posts |
| 💼 [Posts Search Scraper for LinkedIn — No Cookies](https://apify.com/insights_data/posts-search-scraper-for-linkedin-no-cookies) | Public LinkedIn posts by keyword, phrase or hashtag |
| 📈 [X (Twitter) Trends Scraper](https://apify.com/insights_data/twitter-trends-scraper) | Trending hashtags and topics on X for countries and cities |
| 🎵 [TikTok Hashtag Scraper](https://apify.com/insights_data/tiktok-hashtag-scraper) | TikTok videos for any hashtag, with views, likes and author stats |

***

### ❓ FAQ

#### Is it legal to scrape Threads?

Threads data scraping is generally legal when you collect publicly available posts. Posts can still contain personal data, which laws such as the GDPR protect. Collect personal data only when you have a legitimate reason, and follow Threads' terms of use and copyright rules. This is not legal advice. If your project uses personal data, ask a lawyer.

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

Yes. The Actor runs every Threads search without account login, cookies or an API key, because it reads only what Threads shows to visitors who are not logged in. Private posts and private profile details are not included.

#### How does Search Threads By Keywords work?

This Threads search post scraper does what you would do in Threads search, only faster:

1. It runs a search for each of your lines, all at the same time.
2. It keeps the posts that match your keyword, date filter and sort order.
3. If **Add author profile details** is on, it adds each author's public profile details.
4. It saves each post as soon as it's ready.

If one search fails, the others keep going, and posts that were already saved stay in your dataset.

#### Is this Threads search scraper the official Threads API?

No. It is an independent Meta Threads scraper for public posts, not Meta's official [Threads API](https://developers.facebook.com/docs/threads). You don't need a Meta developer app, and you get engagement, media, thread context and author details in one table.

#### Can it collect Instagram posts?

No. Threads is Instagram's app, so you can call this an Instagram Threads scraper, but it only collects posts from Threads, not from Instagram. For Instagram profiles and their latest posts, use [Instagram Profile Scraper](https://apify.com/insights_data/instagram-profile-scraper). To see what trends on X at the same time, add [X (Twitter) Trends Scraper](https://apify.com/insights_data/twitter-trends-scraper).

#### Can I scrape a single Threads post by its link?

No. Single post links are skipped. Instead of a link-based Threads post scraper, this is a Threads keyword search scraper: it finds posts through search. If you know the author, search their `@username` instead (optionally with a word, like `@nasa moon`).

#### Why am I getting fewer results than expected?

- Threads shows visitors who are not logged in a limited set of posts, so rare keywords can return few posts or none.
- Without **Only newer than**, keyword searches look back about 30 days. Try a broader keyword, a #hashtag, or `2w`.
- **Max posts** counts per line; raise it if you need more posts per keyword.
- A search can stop before Max posts (status `limit` in the searches table).
- If the run reached your maximum charge limit, it stopped early.

#### Is it reliable?

Like any Threads web scraper, it depends on what Threads shows publicly. If Threads cannot be reached and nothing was saved, the run fails with a message telling you to try again later. If Threads changes its search page, the run stops with a message saying the Actor needs an update. If that happens, please report it on the Issues tab.

***

### 📧 Support and feedback

Found a bug or want a new field? Please open an issue on the [Issues tab](https://apify.com/insights_data/search-threads-by-keywords/issues/open).

Need a **custom solution**, more data, or a scraper for another site? Email us at hello.insights.data@gmail.com.

Built and maintained by [Insights Data](https://apify.com/insights_data).

# Actor input Schema

## `urls` (type: `array`):

Words, #hashtags, phrases or @usernames, one per line. You can also paste Threads search links or profile links. '@user' returns that user's own posts. Add as many as you like.

## `maxItems` (type: `integer`):

Posts to save for EACH keyword, #hashtag or @user (3 keywords with 50 give up to 150 posts). 0 = everything Threads shows.

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

Newest first, or Threads' own top posts first.

## `since` (type: `string`):

Skip older posts. Use 24h, 7d, 2w or a date like 2026-10-01. Leave empty for the last 30 days.

## `includeAuthorProfile` (type: `boolean`):

Add followers, bio, bio links and topics of every author to each post.

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

Optional. Runs without a proxy first and switches to a stronger proxy automatically if Threads rejects requests.

## Actor input object example

```json
{
  "urls": [
    "#AI"
  ],
  "maxItems": 10,
  "sort": "recent",
  "includeAuthorProfile": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Every saved post.

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

Likes, replies, reposts and quotes.

## `content` (type: `string`):

Text parts: hashtags, mentions, links and media.

## `authorsView` (type: `string`):

Author columns of every post.

## `context` (type: `string`):

Replies, quotes, reposts and post settings.

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

One row per author seen.

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

One row per image or video.

## `links` (type: `string`):

One row per link found in posts.

## `relatedPosts` (type: `string`):

Posts that were replied to, quoted or reposted.

## `keywords` (type: `string`):

One row per searched keyword.

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

Counts 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 = {
    "urls": [
        "#AI"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("insights_data/search-threads-by-keywords").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 = {
    "urls": ["#AI"],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("insights_data/search-threads-by-keywords").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 '{
  "urls": [
    "#AI"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call insights_data/search-threads-by-keywords --silent --output-dataset

```

## MCP server setup

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

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/ObzRvBIISnI8ykUwx/builds/qG5uDjcpOHx4ML3cn/openapi.json
