{
  "openapi": "3.0.1",
  "info": {
    "title": "Threads Scraper - Posts, Profiles, Replies & Search",
    "description": "Scrape Meta Threads (threads.com) without login: profile posts, Replies and Reposts tabs, post replies, keyword and hashtag search (60-85 posts per keyword), account search with emails from bios. Monitoring mode for new posts. From $1.50 per 1,000.",
    "version": "0.1",
    "x-build-id": "IPZLZyvqAlKUP7AZc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alom~threads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alom-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/alom~threads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-alom-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/alom~threads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-alom-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": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "posts",
              "profile",
              "user_replies",
              "user_reposts",
              "post",
              "search",
              "accounts"
            ],
            "type": "string",
            "description": "Leave empty to run everything you filled in below (usernames = posts, post URLs, keywords = post search). Pick a mode for the Replies / Reposts tabs of profiles or to find accounts by keyword."
          },
          "usernames": {
            "title": "Usernames or profile URLs",
            "type": "array",
            "description": "e.g. <code>zuck</code>, <code>@mosseri</code> or <code>https://www.threads.com/@nasa</code> (threads.net works too). Used by the three Profiles modes.",
            "items": {
              "type": "string"
            }
          },
          "includeProfile": {
            "title": "Add a profile row (followers, bio, links)",
            "type": "boolean",
            "description": "In the profile modes (posts, replies, reposts), also return one <code>type: profile</code> row per account. It comes from the same page, so it adds no extra request.",
            "default": true
          },
          "postUrls": {
            "title": "Post URLs",
            "type": "array",
            "description": "e.g. <code>https://www.threads.com/@zuck/post/Dd1MqfcG0aH</code>. Returns the post, the author's own continuation of the thread and (optionally) its replies.",
            "items": {
              "type": "string"
            }
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Return the replies to each post URL as <code>type: reply</code> rows (including nested reply chains), most relevant first.",
            "default": true
          },
          "maxReplies": {
            "title": "Max replies per post",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Threads shows logged-out visitors roughly the first 1,000 replies of a post.",
            "default": 50
          },
          "repliesSort": {
            "title": "Replies order",
            "enum": [
              "top",
              "recent"
            ],
            "type": "string",
            "description": "<b>Newest first</b> is what a monitor wants: with <i>Only new posts since my last run</i> it stops at the first reply an earlier run already returned.",
            "default": "top"
          },
          "searchQueries": {
            "title": "Search keywords or #hashtags",
            "type": "array",
            "description": "Keywords, <code>#hashtags</code>, or threads.com search / <code>/tag/</code> URLs. Threads shows logged-out visitors ~20 posts per result page, so the Actor opens several result pages (keyword search, tag search, tag page) from fresh IPs and merges them: typically <b>60-85 unique posts per keyword</b>. In <b>accounts</b> mode: keywords to find profiles by (up to 100 per keyword). In the profile modes: keywords only <i>flag</i> matching rows (<code>keywordMatch</code>).",
            "items": {
              "type": "string"
            }
          },
          "searchSort": {
            "title": "Search order",
            "enum": [
              "top",
              "recent"
            ],
            "type": "string",
            "description": "<b>Recent</b> returns the posts found newest first. The real \"Recent\" tab of Threads needs a logged-in account: with your own session cookie (below) it is used, without one the Actor sorts what it found.",
            "default": "top"
          },
          "requireKeywordMatch": {
            "title": "Only posts that contain the keyword",
            "type": "boolean",
            "description": "Threads' search also returns loosely related posts. Turn on to drop hits whose text, topic tag or link title does not contain the keyword (dropped posts are not charged). Every search row has <code>keywordMatch</code> either way.",
            "default": false
          },
          "maxPosts": {
            "title": "Max results per profile or keyword",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Upper limit per username, per keyword and (accounts mode) accounts per keyword (max 100).",
            "default": 30
          },
          "postedAfter": {
            "title": "Only posts published after",
            "type": "string",
            "description": "Date (UTC), ISO timestamp or relative like <code>7 days</code>. Applies to posts, replies, reposts (repost time) and search results. Profile paging stops once older posts are reached."
          },
          "postedBefore": {
            "title": "Only posts published before",
            "type": "string",
            "description": "Date (UTC) or ISO timestamp (exclusive)."
          },
          "onlyNewSinceLastRun": {
            "title": "Only new posts since my last run (monitoring)",
            "type": "boolean",
            "description": "Skip posts, replies, reposts and accounts an earlier run with the same monitor name already returned (you are not charged for them). Pair with a Schedule.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Keep separate memories for different monitors (e.g. <code>competitors-daily</code>). Defaults to <code>default</code>."
          },
          "sessionCookie": {
            "title": "Your own Threads session cookie (optional, at your own risk)",
            "type": "string",
            "description": "<b>Optional and never required.</b> Paste the cookies of a threads.com tab where you are logged in (the <code>Cookie</code> header, or a JSON export; at least <code>sessionid</code>, ideally also <code>csrftoken</code> and <code>ds_user_id</code>). Searches then use Threads' real \"Recent\" tab and page through it like the app (about twice as many recent posts in our tests). Requests are then made <b>as your account</b> (one IP, at most 2 in parallel): Meta may rate-limit, checkpoint or ban accounts that scrape, so use a spare account. If the cookie is invalid or expired, the run says so and continues without it. Stored encrypted, never logged or returned."
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Profiles / posts / keywords processed in parallel.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "The default Apify datacenter proxy works and is included in the price. If Threads starts blocking it, the run switches to residential proxies by itself (logged).",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}