{
  "openapi": "3.0.1",
  "info": {
    "title": "Threads Scraper",
    "description": "Posts, replies, reposts, profiles, keyword and hashtag search, whole threads with replies and account discovery on Meta Threads. Every post with text, media, links, mentions and engagement. No login.",
    "version": "0.1",
    "x-build-id": "oI9ERqHq9xwFz128M"
  },
  "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": {
          "mode": {
            "title": "🧭 What to get",
            "enum": [
              "posts",
              "replies",
              "reposts",
              "profile",
              "search",
              "thread",
              "users"
            ],
            "type": "string",
            "description": "<b>Posts</b> — an account's own posts, as many as you ask for. <b>Replies</b> / <b>Reposts</b> — what an account answered or boosted. <b>Profile</b> — followers, bio, links and contacts. <b>Search</b> — public posts for keywords and hashtags. <b>Thread</b> — one post with its replies. <b>Accounts</b> — people and brands matching a keyword.",
            "default": "posts"
          },
          "usernames": {
            "title": "👤 Usernames",
            "type": "array",
            "description": "For Posts, Replies, Reposts and Profile. Bare name, with @, or the profile URL: <code>zuck</code>, <code>@natgeo</code>, <code>https://www.threads.net/@nasa</code>.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "🔎 Keywords or hashtags",
            "type": "array",
            "description": "For Search and Accounts. <code>AI agents</code>, <code>#nba</code>, <code>coffee roaster brooklyn</code>. The # is optional.",
            "items": {
              "type": "string"
            }
          },
          "postUrls": {
            "title": "🔗 Post URLs",
            "type": "array",
            "description": "For Thread mode: <code>https://www.threads.net/@zuck/post/Dcy_A8pGo-m</code>. In Posts mode these are fetched too.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "🔗 Any Threads URLs",
            "type": "array",
            "description": "Profile, post, search or tag URLs — each is routed to the matching job automatically.",
            "items": {
              "type": "string"
            }
          },
          "maxPosts": {
            "title": "💯 Posts per account or keyword",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Cap per username or keyword, not per run. Posts mode pages through the whole profile; Search returns what Threads shows a logged-out visitor (usually 20–60 posts per keyword across the top, recent and tag pages).",
            "default": 100
          },
          "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
          },
          "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"
            ]
          },
          "postedAfter": {
            "title": "📅 Only posts after",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}",
            "type": "string",
            "description": "<code>YYYY-MM-DD</code>. Older posts are dropped and Posts mode stops paging once it reaches them."
          },
          "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"
            }
          },
          "includeProfile": {
            "title": "👤 Add a profile row per account",
            "type": "boolean",
            "description": "Posts, Replies and Reposts modes: also save the account's profile (followers, bio, links, contacts).",
            "default": false
          },
          "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).",
            "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
          },
          "concurrency": {
            "title": "Parallel jobs",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many accounts or keywords are processed at once.",
            "default": 4
          },
          "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
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}