{
  "openapi": "3.0.1",
  "info": {
    "title": "Threads Scraper & API - Posts, Replies, Profiles & Search",
    "description": "Threads API alternative with no login, no Meta token and no 500-search weekly cap. Scrape Threads posts, Threads replies and comments with full reply trees, profiles and keyword search, or schedule it to get only new posts. JSON, CSV, Excel.",
    "version": "0.1",
    "x-build-id": "58ieVEKPdJTv7JYGy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/headply~threads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-headply-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/headply~threads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-headply-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/headply~threads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-headply-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": {
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "Keywords or phrases to search on Threads. Each term is scraped separately and every result is tagged with the term that found it. Threads' own API allows roughly 500 keyword searches per week; this has no such cap.",
            "items": {
              "type": "string"
            }
          },
          "profiles": {
            "title": "Profiles",
            "type": "array",
            "description": "Threads handles or profile URLs, for example zuck, @zuck or https://www.threads.com/@zuck. Returns the profile plus its most recent posts.",
            "items": {
              "type": "string"
            }
          },
          "postUrls": {
            "title": "Post URLs",
            "type": "array",
            "description": "Threads post URLs or bare shortcodes. Returns the post and its reply tree, with each reply's depth in the conversation.",
            "items": {
              "type": "string"
            }
          },
          "searchSort": {
            "title": "Search result ordering",
            "enum": [
              "default",
              "recent",
              "both"
            ],
            "type": "string",
            "description": "Threads ranks search results either by relevance or by recency. The two orderings return overlapping but different sets, so 'Both' gives the widest coverage at twice the request cost.",
            "default": "default"
          },
          "includeReplies": {
            "title": "Include reply trees",
            "type": "boolean",
            "description": "For each post URL, also scrape its replies with conversation depth. Turn off to fetch the posts alone.",
            "default": true
          },
          "includeProfilePosts": {
            "title": "Include posts from profiles",
            "type": "boolean",
            "description": "Return each profile's recent posts alongside the profile record. Turn off for profile details only.",
            "default": true
          },
          "maxPostsPerQuery": {
            "title": "Max posts per search keyword",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Upper bound on results returned for each keyword. Keyword search returns the first page of results; Threads only serves deeper search pages to logged-in sessions, and this Actor runs without login.",
            "default": 100
          },
          "maxPostsPerProfile": {
            "title": "Max posts per profile",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Upper bound on posts returned for each profile. The Actor pages through the profile's posts to reach this number, beyond the first page shown on the profile.",
            "default": 100
          },
          "maxRepliesPerPost": {
            "title": "Max replies per post",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Upper bound on replies returned for each post. Set to 0 to skip replies entirely.",
            "default": 200
          },
          "replyDepth": {
            "title": "Reply depth",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "How deep into the reply tree to traverse. 1 returns the first page of replies embedded in the post (fastest and cheapest, roughly the top ~25). Higher values open each reply's own page to gather replies-to-replies, costing one extra page fetch per reply that has them; the total is still capped by Max replies per post, and each reply is billed the same either way.",
            "default": 1
          },
          "onlyNewSinceLastRun": {
            "title": "Only new since last run (monitoring mode)",
            "type": "boolean",
            "description": "For scheduled runs. Returns only posts not delivered by an earlier run with the same Monitor name, so you never pay for the same post twice. Applies to keyword searches and profile posts; post URLs and replies are always returned in full. Profiles also get followerChange since the last run. The first run returns everything and remembers it.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Label for this monitor's memory. Runs with the same name share memory; use a different name per schedule, client or campaign to keep them separate. Change it to start over. Only used when monitoring mode is on.",
            "default": "default"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Threads rate-limits single IP addresses quickly. Residential proxies are strongly recommended for anything beyond a handful of requests.",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Parallel requests. Raise for speed, lower if you see blocks.",
            "default": 10
          },
          "maxRequestRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many times a failed request is retried, with a fresh proxy address each time, before it is given up on.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}