# Search Threads for a keyword: posts, #tags and accounts

**Use case:** 

What Threads search shows a visitor for starbucks and #coffee: for the word, the Top and Tags pages (each loaded twice, new posts of the second load added once) and the accounts the search box offers (up to 10, each an exact profile row); for the #tag, its Tags page. Every row names its keyword and surface; post rows say whether they hold it. Threads gives a visitor no Recent tab or date window.

## Input

```json
{
  "profiles": [
    "zuck",
    "https://www.threads.com/@threads"
  ],
  "posts": [
    "https://www.threads.com/@zuck/post/DdZ7sQvkTFn"
  ],
  "keywords": [
    "starbucks",
    "#coffee"
  ],
  "maxPostsPerProfile": 25,
  "profileTabs": [],
  "postedAfter": "",
  "includeProfileRow": true,
  "maxRepliesPerPost": 0,
  "repliesOrder": "top",
  "includeNestedReplies": false,
  "searchSurfaces": [
    "top",
    "tags",
    "accounts"
  ],
  "searchPasses": 2,
  "maxPostsPerKeyword": 0,
  "keywordMatchOnly": false,
  "includeViews": false,
  "includeAuthorProfiles": false,
  "includeRaw": false,
  "minLikes": 0,
  "verifiedOnly": false,
  "maxItems": 0,
  "runTag": ""
}
```

## Output

```json
{
  "row_type": {
    "label": "Row type",
    "format": "string"
  },
  "input": {
    "label": "Input",
    "format": "string"
  },
  "input_index": {
    "label": "Input #",
    "format": "integer"
  },
  "inputs_merged": {
    "label": "Inputs merged",
    "format": "array"
  },
  "source_kind": {
    "label": "Source",
    "format": "string"
  },
  "status": {
    "label": "Status",
    "format": "string"
  },
  "status_detail": {
    "label": "Status detail",
    "format": "string"
  },
  "scraped_at": {
    "label": "Scraped at",
    "format": "string"
  },
  "post_code": {
    "label": "Post code",
    "format": "string"
  },
  "post_id": {
    "label": "Post id",
    "format": "string"
  },
  "post_url": {
    "label": "Post URL",
    "format": "string"
  },
  "created_at": {
    "label": "Published",
    "format": "string"
  },
  "created_at_timestamp": {
    "label": "Published (timestamp)",
    "format": "integer"
  },
  "text": {
    "label": "Text",
    "format": "string"
  },
  "text_length": {
    "label": "Text length",
    "format": "integer"
  },
  "media_type": {
    "label": "Media type",
    "format": "string"
  },
  "media": {
    "label": "Media",
    "format": "array"
  },
  "image_urls": {
    "label": "Image URLs",
    "format": "array"
  },
  "video_urls": {
    "label": "Video URLs",
    "format": "array"
  },
  "media_count": {
    "label": "Media count",
    "format": "integer"
  },
  "gif_url": {
    "label": "GIF URL",
    "format": "string"
  },
  "has_audio": {
    "label": "Has audio",
    "format": "boolean"
  },
  "accessibility_caption": {
    "label": "Alt text",
    "format": "string"
  },
  "links": {
    "label": "Links",
    "format": "array"
  },
  "mentions": {
    "label": "Mentions",
    "format": "array"
  },
  "stickers": {
    "label": "Stickers",
    "format": "array"
  },
  "topic_tag": {
    "label": "Topic tag",
    "format": "string"
  },
  "link_preview": {
    "label": "Link preview",
    "format": "object"
  },
  "like_count": {
    "label": "Likes",
    "format": "integer"
  },
  "reply_count": {
    "label": "Replies",
    "format": "integer"
  },
  "repost_count": {
    "label": "Reposts",
    "format": "integer"
  },
  "quote_count": {
    "label": "Quotes",
    "format": "integer"
  },
  "share_count": {
    "label": "Shares",
    "format": "integer"
  },
  "view_count": {
    "label": "Views",
    "format": "integer"
  },
  "views_source": {
    "label": "Views source",
    "format": "string"
  },
  "engagement_rate": {
    "label": "Engagement rate",
    "format": "number"
  },
  "is_reply": {
    "label": "Reply",
    "format": "boolean"
  },
  "reply_to_username": {
    "label": "Reply to",
    "format": "string"
  },
  "reply_to_user_id": {
    "label": "Reply to (id)",
    "format": "string"
  },
  "parent_post_code": {
    "label": "Parent post",
    "format": "string"
  },
  "root_post_code": {
    "label": "Root post",
    "format": "string"
  },
  "reply_level": {
    "label": "Reply level",
    "format": "integer"
  },
  "is_quote": {
    "label": "Quote",
    "format": "boolean"
  },
  "quoted_post": {
    "label": "Quoted post",
    "format": "object"
  },
  "is_repost": {
    "label": "Repost",
    "format": "boolean"
  },
  "reposted_post": {
    "label": "Reposted post",
    "format": "object"
  },
  "thread_id": {
    "label": "Thread id",
    "format": "string"
  },
  "thread_position": {
    "label": "Thread position",
    "format": "integer"
  },
  "self_thread_count": {
    "label": "Self-thread posts",
    "format": "integer"
  },
  "is_pinned": {
    "label": "Pinned",
    "format": "boolean"
  },
  "is_edited": {
    "label": "Edited",
    "format": "boolean"
  },
  "is_paid_partnership": {
    "label": "Paid partnership",
    "format": "boolean"
  },
  "is_spoiler": {
    "label": "Spoiler",
    "format": "boolean"
  },
  "reply_control": {
    "label": "Reply control",
    "format": "string"
  },
  "ai_label": {
    "label": "AI label",
    "format": "string"
  },
  "author_username": {
    "label": "Author",
    "format": "string"
  },
  "author_id": {
    "label": "Author id",
    "format": "string"
  },
  "author_name": {
    "label": "Author name",
    "format": "string"
  },
  "author_verified": {
    "label": "Author verified",
    "format": "boolean"
  },
  "author_profile_pic_url": {
    "label": "Author picture",
    "format": "string"
  },
  "author_is_private": {
    "label": "Author private",
    "format": "boolean"
  },
  "author_followers": {
    "label": "Author followers",
    "format": "integer"
  },
  "query": {
    "label": "Query",
    "format": "string"
  },
  "search_surface": {
    "label": "Search surface",
    "format": "string"
  },
  "search_tag": {
    "label": "Search tag",
    "format": "string"
  },
  "keyword_match": {
    "label": "Keyword match",
    "format": "boolean"
  },
  "list_note": {
    "label": "List note",
    "format": "string"
  },
  "replies_requested": {
    "label": "Replies requested",
    "format": "integer"
  },
  "replies_delivered": {
    "label": "Replies delivered",
    "format": "integer"
  },
  "replies_note": {
    "label": "Replies note",
    "format": "string"
  },
  "related_posts": {
    "label": "Related posts",
    "format": "array"
  },
  "raw": {
    "label": "Raw",
    "format": "object"
  },
  "run_tag": {
    "label": "Run tag",
    "format": "string"
  },
  "username": {
    "label": "Username",
    "format": "string"
  },
  "user_id": {
    "label": "User id",
    "format": "string"
  },
  "full_name": {
    "label": "Name",
    "format": "string"
  },
  "biography": {
    "label": "Bio",
    "format": "string"
  },
  "bio_links": {
    "label": "Bio links",
    "format": "array"
  },
  "is_verified": {
    "label": "Verified",
    "format": "boolean"
  },
  "is_private": {
    "label": "Private",
    "format": "boolean"
  },
  "profile_pic_url": {
    "label": "Picture",
    "format": "string"
  },
  "profile_pic_hd_url": {
    "label": "Picture (HD)",
    "format": "string"
  },
  "follower_count": {
    "label": "Followers",
    "format": "integer"
  },
  "threads_count": {
    "label": "Threads",
    "format": "integer"
  },
  "threads_count_shown": {
    "label": "Threads (shown)",
    "format": "string"
  },
  "profile_tags": {
    "label": "Profile tags",
    "format": "array"
  },
  "profile_url": {
    "label": "Profile URL",
    "format": "string"
  },
  "instagram_url": {
    "label": "Instagram",
    "format": "string"
  },
  "podcast_name": {
    "label": "Podcast",
    "format": "string"
  },
  "podcast_url": {
    "label": "Podcast URL",
    "format": "string"
  },
  "tab": {
    "label": "Tabs",
    "format": "string"
  },
  "posts_requested": {
    "label": "Posts requested",
    "format": "integer"
  },
  "posts_delivered": {
    "label": "Posts delivered",
    "format": "integer"
  },
  "posts_note": {
    "label": "Posts note",
    "format": "string"
  },
  "last_post_at": {
    "label": "Last post",
    "format": "string"
  },
  "recent_posts_read": {
    "label": "Recent posts read",
    "format": "integer"
  },
  "recent_avg_likes": {
    "label": "Avg likes (recent)",
    "format": "number"
  },
  "recent_avg_replies": {
    "label": "Avg replies (recent)",
    "format": "number"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Threads Scraper: Posts, Threads Replies, Profile Scraper, API Actor is ready to run with the inputs already set for "Search Threads for a keyword: posts, #tags and accounts". [Sign up or log in](https://console.apify.com/create-task-from-example/sAZdj4s6NgkytwX9S) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Search Threads for a keyword: posts, #tags and accounts" task

The Threads Scraper: Posts, Threads Replies, Profile Scraper, API Actor will start running based on the input automatically. You can also change all the input fields, like profiles: usernames or links, posts: links or codes, and more, to match your specific use case.

### 3. Receive the "Search Threads for a keyword: posts, #tags and accounts" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as row type, input, input #, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Search Threads for a keyword: posts, #tags and accounts" task via API](https://apify.com/hyperbach/threads-scraper.md).

## About this Actor

This example demonstrates how to use [Threads Scraper: Posts, Threads Replies, Profile Scraper, API](https://apify.com/hyperbach/threads-scraper.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/hyperbach/threads-scraper.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

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 full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/hyperbach/threads-scraper.md

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