{
  "openapi": "3.0.1",
  "info": {
    "title": "Threads Scraper — Bài viết, Hồ sơ, Hashtag & Tìm kiếm từ khóa",
    "description": "Năm chế độ trích xuất Threads trong một actor: hồ sơ người dùng, hashtag, tìm kiếm từ khóa, bài viết đơn lẻ kèm phản hồi, và feed tùy chỉnh. Dán hàng loạt tối đa 100 username hoặc từ khóa, bộ lọc ngày tương đối, chỉ số tương tác, timestamp ISO. Không cần đăng nhập. $0.005 mỗi kết quả.",
    "version": "1.0",
    "x-build-id": "6aUSriBOtMho3EElX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/claude_code_reviewer~threads-scraper-vi/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-claude_code_reviewer-threads-scraper-vi",
        "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/claude_code_reviewer~threads-scraper-vi/runs": {
      "post": {
        "operationId": "runs-sync-claude_code_reviewer-threads-scraper-vi",
        "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/claude_code_reviewer~threads-scraper-vi/run-sync": {
      "post": {
        "operationId": "run-sync-claude_code_reviewer-threads-scraper-vi",
        "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": "🎯 Chế độ",
            "enum": [
              "user",
              "hashtag",
              "search",
              "post",
              "feed"
            ],
            "type": "string",
            "description": "Bạn muốn scrape gì? Chọn một chế độ và điền vào phần tương ứng bên dưới.",
            "default": "user"
          },
          "usernames": {
            "title": "👤 Danh sách username",
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "Username Threads thuần (không cần @, không cần URL). Ví dụ: zuck, mosseri. Dùng khi Chế độ = User.",
            "items": {
              "type": "string"
            }
          },
          "bulkUsernames": {
            "title": "📋 Dán username hàng loạt",
            "type": "string",
            "description": "**Mỗi dòng một username**, nhấn Enter giữa các dòng. **Không dấu nháy, không dấu phẩy.** Ví dụ:\n\n```\nzuck\nmosseri\nfinkd\n```\n\nBạn có thể copy một cột từ Google Sheets / Excel và dán thẳng vào đây. Sẽ được gộp vào danh sách Username khi chạy."
          },
          "keywords": {
            "title": "🏷️ Từ khóa / Tag",
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "Từ khóa cho chế độ Tìm kiếm, hoặc hashtag cho chế độ Hashtag (dấu # ở đầu tùy chọn). Ví dụ: tin AI, #côngnghệ.",
            "items": {
              "type": "string"
            }
          },
          "bulkKeywords": {
            "title": "📋 Dán từ khóa hàng loạt",
            "type": "string",
            "description": "**Mỗi dòng một từ khóa hoặc hashtag**, nhấn Enter giữa các dòng. **Không dấu nháy, không dấu phẩy.** Ví dụ:\n\n```\nLLM agent\nvibe coding\n#AI\n```\n\nSẽ được gộp vào danh sách Từ khóa khi chạy."
          },
          "searchSort": {
            "title": "🔀 Sắp xếp tìm kiếm",
            "enum": [
              "top",
              "recent"
            ],
            "type": "string",
            "description": "Thứ tự sắp xếp kết quả tìm kiếm từ khóa. Chỉ áp dụng cho Chế độ = Tìm kiếm.",
            "default": "top"
          },
          "dateFrom": {
            "title": "📅 Ngày bắt đầu",
            "type": "string",
            "description": "Ngày cũ nhất của bài viết. Chấp nhận YYYY-MM-DD hoặc cách biểu đạt tương đối như \"7 days\", \"1 month\"."
          },
          "dateTo": {
            "title": "📅 Ngày kết thúc",
            "type": "string",
            "description": "Ngày mới nhất của bài viết. Cùng định dạng với Ngày bắt đầu."
          },
          "postUrls": {
            "title": "💬 URL bài viết",
            "uniqueItems": true,
            "type": "array",
            "description": "URL đầy đủ của bài viết Threads. Dùng khi Chế độ = Post. Ví dụ: https://www.threads.com/@user/post/ABC123.",
            "items": {
              "type": "string"
            }
          },
          "feedUrls": {
            "title": "📰 URL feed",
            "uniqueItems": true,
            "type": "array",
            "description": "URL feed tùy chỉnh của Threads. Dùng khi Chế độ = Feed. Ví dụ: https://www.threads.com/custom_feed/18113589370710265.",
            "items": {
              "type": "string"
            }
          },
          "maxPosts": {
            "title": "📊 Số bài tối đa",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Số bài viết tối đa trên mỗi nguồn. Càng nhiều thì càng nhiều kết quả tính phí ($0.005 mỗi bài). Cuộn trang được quản lý tự động.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}