{
  "openapi": "3.0.1",
  "info": {
    "title": "Threads Scraper — Posts, Profiles, Replies & Hashtags",
    "description": "Scrape Threads posts, profiles, reply threads, search results and hashtags. Browserless, no login, and you only pay for rows actually delivered.",
    "version": "0.1",
    "x-build-id": "usZ42qW3nBnByTJN0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/acebuilds~threads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-acebuilds-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/acebuilds~threads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-acebuilds-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/acebuilds~threads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-acebuilds-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",
        "required": [
          "queries"
        ],
        "properties": {
          "queries": {
            "title": "🔍 What to scrape",
            "minItems": 1,
            "type": "array",
            "description": "One or more of: a keyword (`ai agents`), a `#hashtag`, an `@username`, or any Threads URL — profile (`https://www.threads.com/@zuck`), a tab (`/@zuck/replies`, `/@zuck/media`), a post (`/@zuck/post/CODE`) or a share link (`/t/CODE`). `threads.net` and `threads.com` both work, and tracking parameters like `?si=` are ignored.",
            "items": {
              "type": "string"
            }
          },
          "profileTabs": {
            "title": "👤 Profile tabs to scrape",
            "type": "array",
            "description": "Which tabs to pull when the input is a profile. Threads serves only a handful of posts per tab to logged-out visitors, so scraping several tabs is how you get a fuller picture — measured ~4 posts from `posts` alone vs ~18 across all three. Duplicates are removed and never billed twice.",
            "items": {
              "type": "string",
              "enum": [
                "posts",
                "replies",
                "media"
              ],
              "enumTitles": [
                "Posts",
                "Replies",
                "Media (posts with images/video)"
              ]
            },
            "default": [
              "posts",
              "replies"
            ]
          },
          "expandThreads": {
            "title": "🧵 Expand reply threads",
            "type": "boolean",
            "description": "After collecting posts, also open each post that has replies and scrape the conversation under it (measured ~31 posts per thread). This is the highest-yield option in the actor — and the most expensive, since every reply is a billable row. Use `maxItems` with it.",
            "default": false
          },
          "maxItems": {
            "title": "💯 Max rows (your spend cap)",
            "minimum": 0,
            "type": "integer",
            "description": "Hard ceiling on delivered rows. You are billed per row, so this is your cost cap. `0` = no limit.",
            "default": 0
          },
          "minLikes": {
            "title": "❤️ Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Skip posts below this like count. Filtered posts are never billed.",
            "default": 0
          },
          "minReplies": {
            "title": "💬 Minimum replies",
            "minimum": 0,
            "type": "integer",
            "description": "Skip posts below this reply count.",
            "default": 0
          },
          "onlyVerified": {
            "title": "✅ Verified authors only",
            "type": "boolean",
            "description": "Keep only posts written by verified accounts.",
            "default": false
          },
          "excludeReplies": {
            "title": "🚫 Exclude replies",
            "type": "boolean",
            "description": "Keep only top-level posts, dropping anything that is a reply to someone else.",
            "default": false
          },
          "mustHaveMedia": {
            "title": "🖼 Only posts with media",
            "type": "boolean",
            "description": "Keep only posts that carry an image or video.",
            "default": false
          },
          "postedAfter": {
            "title": "📅 Posted after",
            "type": "string",
            "description": "Keep only posts published on or after this date, e.g. `2026-01-31`.",
            "default": ""
          },
          "postedBefore": {
            "title": "📅 Posted before",
            "type": "string",
            "description": "Keep only posts published on or before this date, e.g. `2026-08-31`.",
            "default": ""
          },
          "includeProfileInfo": {
            "title": "📇 Include a profile row",
            "type": "boolean",
            "description": "For profile inputs, emit one extra row with the account's bio, bio links, follower count and verification status.",
            "default": true
          },
          "maxRetries": {
            "title": "🔁 Max retries per page",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Threads rate-limits aggressively. Each retry rotates to a fresh proxy session and re-establishes cookies, which is what actually clears a block.",
            "default": 4
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy",
            "type": "object",
            "description": "Residential proxies are strongly recommended — Meta challenges datacenter ranges. Falls back automatically if residential is not on your plan.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}