{
  "openapi": "3.0.1",
  "info": {
    "title": "Threads Scraper: Profiles, Posts, Replies, Followers & Search",
    "description": "Scrape Threads (Meta) user search, profile threads, replies, media, reposts, followers and social counts, post replies, post and hashtag search, keyword suggestions and the For You feed. Real-time, clean JSON, auto pagination. Pay only for results.",
    "version": "1.0",
    "x-build-id": "aDacDZYJiUo6giTcG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapysocial~threads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapysocial-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/scrapysocial~threads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapysocial-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/scrapysocial~threads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapysocial-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": [
          "endpoint"
        ],
        "properties": {
          "endpoint": {
            "title": "What to scrape",
            "enum": [
              "search-users",
              "search-keywords",
              "search-posts",
              "hashtag-posts",
              "user-lookup",
              "user-threads",
              "user-replies",
              "user-media",
              "user-reposts",
              "user-followers",
              "user-social-counts",
              "post-replies",
              "feed-for-you",
              "search-recommended-users"
            ],
            "type": "string",
            "description": "Pick the Threads data you want. Then fill only the fields that endpoint uses (each field says which endpoints use it). Full list with descriptions: see the README tab.",
            "default": "user-threads"
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Search keyword or exact username (without @).<br><br><b>Used by:</b> Search Users, User Lookup. <b>Required by:</b> Search Users, User Lookup. <b>Example:</b> <code>nike</code>"
          },
          "count": {
            "title": "Count",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Page size (1–50). Omit = 20 (HAR default).<br><br><b>Used by:</b> Search Users, Search Posts, Hashtag Posts, User Lookup, User Threads, User Replies +5 more. <b>Example:</b> <code>10</code>"
          },
          "query": {
            "title": "Query",
            "type": "string",
            "description": "Tag / hashtag name as in the Threads UI (e.g. nike, Claude AI). Preferred buyer input.<br><br><b>Used by:</b> Search Keywords, Search Posts, Hashtag Posts. <b>Required by:</b> Search Keywords, Search Posts, Hashtag Posts. <b>Example:</b> <code>nike</code>"
          },
          "recent": {
            "title": "Recent",
            "enum": [
              "0",
              "1"
            ],
            "type": "string",
            "description": "Sort mode: 0 = Top (default), 1 = Recent. Case-sensitive integer enum.<br><br><b>Used by:</b> Search Posts, Hashtag Posts."
          },
          "cursor": {
            "title": "Cursor",
            "type": "string",
            "description": "Pagination cursor from the previous response. Omit on the first page (sends JSON null).<br><br><b>Used by:</b> Search Posts, Hashtag Posts, User Threads, User Replies, User Media, User Reposts +2 more."
          },
          "tagId": {
            "title": "Tag ID",
            "type": "string",
            "description": "Optional tag id (from search-keywords). Prefer hashtag-posts when tag-scoped results are required.<br><br><b>Used by:</b> Search Posts, Hashtag Posts."
          },
          "username": {
            "title": "Username",
            "type": "string",
            "description": "Threads username without @. Send this or `userId`. Resolved via search-users when `userId` is omitted.<br><br><b>Used by:</b> User Threads, User Replies, User Media, User Reposts, User Followers, User Social Counts. <b>Example:</b> <code>instagram</code>"
          },
          "userId": {
            "title": "User ID",
            "type": "string",
            "description": "Numeric Threads / Instagram user id. Optional when `username` is sent.<br><br><b>Used by:</b> User Threads, User Replies, User Media, User Reposts, User Followers, User Social Counts."
          },
          "postId": {
            "title": "Post ID",
            "type": "string",
            "description": "Post identifier from the UI. Allowed: numeric pk, shortcode (e.g. DfxSFeEEtKN), or https://www.threads.com/@user/post/{code}.<br><br><b>Used by:</b> Post Replies. <b>Required by:</b> Post Replies. <b>Example:</b> <code>DfxSFeEEtKN</code>"
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "TOP",
              "RECENT"
            ],
            "type": "string",
            "description": "Reply sort. Allowed: \"TOP\" (ranked, default), \"RECENT\" (newest first). Case-sensitive.<br><br><b>Used by:</b> Post Replies."
          },
          "maxItems": {
            "title": "Max results per query",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop paginating a query after this many results. Each saved result is one billable \"result-item\" event.",
            "default": 100
          },
          "maxPages": {
            "title": "Max pages per query",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper bound on API pages fetched per query (a page is usually 10–50 results).",
            "default": 10
          },
          "batch": {
            "title": "Batch (many queries in one run)",
            "type": "array",
            "description": "Optional JSON array. Each object is one query for the selected endpoint; its keys override the form fields above. Example: <code>[{\"username\":\"zuck\"},{\"username\":\"instagram\"}]</code>"
          },
          "splitItems": {
            "title": "One row per result",
            "type": "boolean",
            "description": "On (recommended): every post/user/comment is its own dataset row. Off: one row per API page (the list stays nested). Billing is per result either way.",
            "default": true
          },
          "concurrency": {
            "title": "Parallel queries",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many batch queries run at the same time.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}