{
  "openapi": "3.0.1",
  "info": {
    "title": "Threads Scraper — Posts, Profiles, Search & Replies, No Login",
    "description": "Scrape Threads posts by username or keyword with view counts on every post, likes, replies. Like/reply minimums, language filter, only-new-since-last-run monitoring, bio emails and phones. Typical run: 30 posts of one account in about 15 seconds. Example input: {\"usernames\":[\"time\"],\"maxPosts\":30}",
    "version": "0.1",
    "x-build-id": "pHgxmfppDMUivDRvh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lergassy~threads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lergassy-threads-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/lergassy~threads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lergassy-threads-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/lergassy~threads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lergassy-threads-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",
        "properties": {
          "usernames": {
            "title": "👤 Usernames",
            "type": "array",
            "description": "Accounts to read: bare name, @name or profile URL — \"zuck\", \"@natgeo\", \"https://www.threads.net/@nasa\". Returns each account's latest posts; set mode to \"replies\", \"reposts\" or \"profile\" for those instead.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "🔎 Keywords or hashtags",
            "type": "array",
            "description": "Search terms: one word, a hashtag or a short phrase per item — \"coffee\", \"#nba\", \"AI agents\". Keywords alone run a post search; set mode to \"users\" to find accounts instead. For phrases of several words Threads often shows a logged-out visitor nothing; the Actor then searches each word and keeps only posts that contain all of them, which can leave few or no rows. Pass alternatives as separate items. The # is optional.",
            "items": {
              "type": "string"
            }
          },
          "postUrls": {
            "title": "🔗 Post URLs",
            "type": "array",
            "description": "Post links: <code>https://www.threads.net/@zuck/post/Dcy_A8pGo-m</code>, or share links from the app (<code>https://www.threads.com/share/CODE</code>). Each returns the post with its replies.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "🧭 What to get",
            "enum": [
              "posts",
              "replies",
              "reposts",
              "profile",
              "search",
              "thread",
              "users"
            ],
            "type": "string",
            "description": "Optional. Left at \"posts\", the Actor follows what you filled: usernames → that account's posts, keywords alone → post search, post URLs → the post with its replies. Set it for the other jobs: \"replies\" / \"reposts\" = what an account answered or boosted, \"profile\" = followers, bio, links, contacts (all need usernames); \"users\" = accounts matching a keyword (needs keywords); \"search\" and \"thread\" can also be set explicitly.",
            "default": "posts"
          },
          "maxPosts": {
            "title": "💯 Posts per account or keyword",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Posts per username or keyword (not per run), 1-10000, default 100. Each post is one billed row. For a quick answer set 10-20. Posts mode pages through the whole profile; search returns what Threads shows a logged-out visitor, usually 20-60 posts per keyword.",
            "default": 100
          },
          "startUrls": {
            "title": "🔗 Any Threads URLs",
            "type": "array",
            "description": "Threads profile, post, search or tag URLs, sorted automatically: profile URLs are read as accounts, search and tag URLs as keywords, post URLs as posts. With an explicit mode, URLs that do not fit it are skipped and not charged.",
            "items": {
              "type": "string"
            }
          },
          "postedAfter": {
            "title": "📅 Only posts after",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}",
            "type": "string",
            "description": "YYYY-MM-DD; older posts are dropped. In \"posts\" mode paging stops once it reaches this date. Search has no date operator: Threads returns its usual page per query and older posts are then filtered out, so a narrow date window can leave 0 rows."
          },
          "lastDays": {
            "title": "🗓️ Only posts from the last N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Rolling date filter: <code>7</code> keeps only posts published in the last 7 days (counted back from the moment the run starts). Older posts are dropped and never charged; in \"posts\" mode paging stops once it reaches them. If <b>Only posts after</b> is set too, the later of the two dates is used."
          },
          "postedBefore": {
            "title": "📅 Posted before",
            "type": "string",
            "description": "<code>YYYY-MM-DD</code>. Newer posts are dropped. Together with <b>Posted after</b> this gives a date window, so a scheduled run never re-collects yesterday's posts."
          },
          "includeViews": {
            "title": "👁️ View counts",
            "type": "boolean",
            "description": "Fills viewCount on every post (the number Threads shows under a post). It is read from each post's own page: one extra request per post, run in parallel, no extra charge. Set false when you do not need view counts: the run makes fewer requests and finishes sooner.",
            "default": true
          },
          "includeProfile": {
            "title": "👤 Profile / author followers",
            "type": "boolean",
            "description": "Posts, Replies and Reposts modes: also save the account's profile (followers, bio, links, contacts). Search: every post row gets <code>authorFollowers</code>, <code>authorVerified</code>, <code>authorBio</code> and <code>authorBioLinks</code> of its author — each unique author's profile is read once per run and charged once as a Profile event; an author whose profile could not be read keeps the fields empty and is not charged.",
            "default": false
          },
          "maxRepliesPerPost": {
            "title": "💬 Replies per post (Thread mode)",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Threads shows a logged-out visitor the first ~25 replies of a post.",
            "default": 100
          },
          "filterKeywords": {
            "title": "🧹 Keep only posts containing",
            "type": "array",
            "description": "Case-insensitive words or phrases; a post is kept when it contains any of them. Empty = keep everything.",
            "items": {
              "type": "string"
            }
          },
          "strictKeywordMatch": {
            "title": "🎯 Only posts that contain the keyword",
            "type": "boolean",
            "description": "Search mode: keep a post only when your keyword (or every word of it) actually appears in the text or hashtags. Threads pads keyword results with loosely related posts — this switch removes them. Every row also carries <code>containsKeyword</code> so you can filter later instead.",
            "default": false
          },
          "languages": {
            "title": "🌐 Languages",
            "type": "array",
            "description": "Keep only posts in these languages, ISO codes: <code>en</code>, <code>es</code>, <code>ja</code>, <code>zh</code>, <code>ko</code>, <code>ru</code>… Threads labels only some posts; for the rest the script of the text is used (Latin letters count as <code>en</code>). Empty = all languages.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minLikes": {
            "title": "❤️ Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Drop posts with fewer likes. <code>1</code> removes the zero-engagement filler that keyword search returns.",
            "default": 0
          },
          "minReplies": {
            "title": "💬 Minimum replies",
            "minimum": 0,
            "type": "integer",
            "description": "Drop posts with fewer replies.",
            "default": 0
          },
          "minViews": {
            "title": "👁️ Minimum views",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only posts with at least this many views. Threads publishes a view count for very few posts when read without a login, so posts with no count are kept, not dropped. For a dependable threshold use Min likes or Min replies.",
            "default": 0
          },
          "searchTypes": {
            "title": "🔎 Search result pages",
            "type": "array",
            "description": "Search mode: which result pages to combine. Duplicates are removed.",
            "items": {
              "type": "string",
              "enum": [
                "top",
                "recent",
                "tags"
              ],
              "enumTitles": [
                "Top",
                "Recent",
                "Tag page (#hashtag)"
              ]
            },
            "default": [
              "top",
              "recent",
              "tags"
            ]
          },
          "expandQueries": {
            "title": "🔁 Expand each keyword",
            "type": "boolean",
            "description": "Threads shows a visitor one page (20–25 posts) per query and result type, and different wordings return different posts. On, every keyword is also searched as singular/plural, with and without the hash and as a joined hashtag, in top, recent and tag order — several times more unique posts per keyword. Off searches the exact text only.",
            "default": true
          },
          "includeProfileDetails": {
            "title": "👤 Full profiles in Accounts mode",
            "type": "boolean",
            "description": "Accounts mode: open each account's page for follower count, bio links and contacts (one extra request per account). <b>It also sets the price of the row:</b> with details on you pay the profile rate, with it off you pay the cheaper account rate — the row still arrives as type <code>profile</code> either way.",
            "default": true
          },
          "maxUsersPerKeyword": {
            "title": "👥 Accounts per keyword",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Accounts mode.",
            "default": 20
          },
          "maxItems": {
            "title": "Maximum rows per run",
            "minimum": 1,
            "maximum": 500000,
            "type": "integer",
            "description": "Stop after this many rows in the run.",
            "default": 10000
          },
          "monitoringStoreName": {
            "title": "🔔 Monitoring mode — store name",
            "type": "string",
            "description": "Leave empty for a normal run. Only for scheduled monitoring: with a name set (e.g. brand-watch), a run returns only posts not delivered by earlier runs with the same name, so a repeated call can return 0 rows. From 23 November 2026 a monitoring run costs $0.005 per run on top of the rows."
          },
          "concurrency": {
            "title": "Parallel jobs",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many accounts or keywords are processed at once. Left empty, a list of 10+ accounts runs 10 at a time and keywords 4 at a time."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify datacenter proxies work for Threads. If runs end with rate-limit error rows, switch to Residential.",
            "default": {
              "useApifyProxy": true
            }
          },
          "includeRunSummary": {
            "title": "🧾 Add a free summary row at the end of the run",
            "type": "boolean",
            "description": "One extra free row with the run's totals: rows delivered, free rows, what was charged and how much in US dollars. It carries type \"notice\", so a filter on your data rows skips it.",
            "default": true
          },
          "strictMode": {
            "title": "🔒 Strict mode",
            "type": "boolean",
            "description": "Turns all four switches below off at once and keeps your usernames and keywords out of the run log. No contact details, no third-party data provider, no retries through other IP addresses after a refusal, no commercial web unblocker. A refused target comes back as a free error row with the reason, so you get fewer rows on days Threads throttles.",
            "default": false
          },
          "includeContacts": {
            "title": "Contact details",
            "type": "boolean",
            "description": "Off: no emails/phones fields, and emails and phone numbers inside bio and post text are replaced with [email removed] / [phone removed]; contact links (mailto:, tel:, WhatsApp, Telegram, Messenger…) are dropped from bio links. Prices do not change.",
            "default": true
          },
          "allowExternalProviders": {
            "title": "Third-party backup provider",
            "type": "boolean",
            "description": "Off: a target that Threads refuses is never filled by an external data provider; it stays an error row.",
            "default": true
          },
          "retryRefused": {
            "title": "Retry refused requests",
            "type": "boolean",
            "description": "Off: one attempt per request. When Threads refuses (rate limit, login wall, cut-off), the request is not repeated through other IP addresses or the residential rescue route; the target becomes a free error row.",
            "default": true
          },
          "allowUnblocker": {
            "title": "Commercial web unblocker",
            "type": "boolean",
            "description": "Off: the paid web-unblocker service (last step after refusals) is never used.",
            "default": true
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}