{
  "openapi": "3.0.1",
  "info": {
    "title": "Threads Scraper — Posts, Profiles, Search, Accounts & URLs",
    "description": "Scrape Meta Threads (threads.com / threads.net) posts, profiles, keyword search, accounts by keyword and post URLs. No login. Up to 1,000 posts per account or search, up to 100 accounts per keyword. Likes, replies, reposts, quotes, shares, media, language, bio links, date filters and Top/Recent.",
    "version": "0.1",
    "x-build-id": "YFL8nBMX4g4VJTPsd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automation-lab~threads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automation-lab-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/automation-lab~threads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automation-lab-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/automation-lab~threads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automation-lab-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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Threads scraping mode",
            "enum": [
              "profile",
              "posts",
              "search",
              "urls",
              "accounts"
            ],
            "type": "string",
            "description": "Choose what to scrape: user profiles only, user posts with engagement data, search posts by keyword, find accounts by keyword, or specific posts by URL. If the chosen mode has no input but exactly one other list is filled, the mode for that list runs.",
            "default": "posts"
          },
          "usernames": {
            "title": "Threads usernames",
            "type": "array",
            "description": "Threads usernames to scrape in profile or posts modes. @ is optional, and a profile link works too; examples: zuck, @zuck or https://www.threads.com/@zuck.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Threads search keywords",
            "type": "array",
            "description": "Keywords to search for on Threads. Used in search mode (posts that match) and accounts mode (accounts whose name or username matches).",
            "items": {
              "type": "string"
            }
          },
          "searchSort": {
            "title": "Search result order",
            "enum": [
              "top",
              "recent"
            ],
            "type": "string",
            "description": "Choose Top for relevance-ranked results or Recent for freshest-first monitoring. Used in search mode only.",
            "default": "top"
          },
          "postUrls": {
            "title": "Threads post URLs",
            "type": "array",
            "description": "Links to individual Threads posts, used in urls mode only. Accepts threads.com or threads.net links such as https://www.threads.com/@zuck/post/DfNR0zhEdWv or https://www.threads.net/t/DfNR0zhEdWv, and share-button links such as https://www.threads.com/share/AbCdEf123. Each post returns one row with text, engagement counts and media.",
            "items": {
              "type": "string"
            }
          },
          "maxPosts": {
            "title": "Max Threads posts per user/query (items)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of posts to extract per username or search query. Threads pages are read until this limit or until the account or search has no more public posts.",
            "default": 20
          },
          "maxAccounts": {
            "title": "Max accounts per keyword (accounts mode)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Accounts mode only: how many matching accounts to return per keyword. Threads returns up to about 100 accounts per keyword, in its own relevance order. Each account is one profile row without a follower count; run profile mode on the usernames you pick to get followers.",
            "default": 25
          },
          "postedAfter": {
            "title": "Posted after",
            "type": "string",
            "description": "Optional ISO date (YYYY-MM-DD) or RFC3339 timestamp. Only posts published at or after this time are returned. Examples: 2026-05-01 or 2026-05-01T00:00:00Z. Day first with dots (01.05.2026) also works, and day/month with the year last when only one order fits (27-10-2026)."
          },
          "postedBefore": {
            "title": "Posted before",
            "type": "string",
            "description": "Optional ISO date (YYYY-MM-DD) or RFC3339 timestamp. Only posts published before this time are returned. Examples: 2026-06-01 or 2026-06-01T00:00:00Z. Day first with dots (01.06.2026) also works, and day/month with the year last when only one order fits."
          },
          "includeProfile": {
            "title": "Include Threads profile info",
            "type": "boolean",
            "description": "Include user profile metadata (followers, bio, verified status) as a separate dataset item. Only applies to posts mode.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}