{
  "openapi": "3.0.1",
  "info": {
    "title": "Threads Scraper — Posts, Profiles, Search & Monitoring",
    "description": "Scrape public Threads posts, profiles, replies, search and media without login. Mix targets in one run, monitor new or changed posts, and pay only for delivered results.",
    "version": "0.0",
    "x-build-id": "HZvVp1mefUNk0Xb7d"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yearly_register~threads-scraper-v2/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yearly_register-threads-scraper-v2",
        "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/yearly_register~threads-scraper-v2/runs": {
      "post": {
        "operationId": "runs-sync-yearly_register-threads-scraper-v2",
        "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/yearly_register~threads-scraper-v2/run-sync": {
      "post": {
        "operationId": "run-sync-yearly_register-threads-scraper-v2",
        "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": [
          "targets"
        ],
        "properties": {
          "targets": {
            "title": "What do you want to scrape?",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "Add usernames, profile/post URLs, #hashtags, keyword phrases, accounts:queries, replies:@username, or reposts:@username. The Actor detects the target type automatically.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Global cap for final unique rows delivered by the run. Start small, then increase when you know the target returns what you need.",
            "default": 250
          },
          "accountSearches": {
            "title": "Additional account searches",
            "maxItems": 100,
            "type": "array",
            "description": "Optional explicit user/account discovery queries. You can usually use accounts:query directly in Targets instead.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "maxPosts": {
            "title": "Maximum posts per profile",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop each profile, replies, or repost feed after this many discovered post records.",
            "default": 100
          },
          "scrapeReplies": {
            "title": "Include exposed replies",
            "type": "boolean",
            "description": "Keep reply records Threads exposes for post targets.",
            "default": false
          },
          "includeNestedReplies": {
            "title": "Include nested replies",
            "type": "boolean",
            "description": "Keep replies below the first level when Threads exposes relationship metadata.",
            "default": true
          },
          "fullConversation": {
            "title": "Include conversation context",
            "type": "boolean",
            "description": "Keep the root post and publicly exposed replies available in the fetched payload, subject to reply limits. This does not claim exhaustive conversation pagination.",
            "default": false
          },
          "maxReplies": {
            "title": "Maximum replies",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum reply records retained across the run.",
            "default": 100
          },
          "maxReplyDepth": {
            "title": "Maximum reply depth",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Keep publicly exposed replies up to this relationship depth.",
            "default": 10
          },
          "dateFrom": {
            "title": "Posted from",
            "type": "string",
            "description": "Inclusive ISO date/time cutoff. Posts without a usable timestamp are excluded when this filter is set."
          },
          "dateTo": {
            "title": "Posted to",
            "type": "string",
            "description": "Inclusive ISO date/time cutoff. Must be on or after Posted from."
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Keep posts with at least this many likes. Missing metrics do not satisfy a minimum."
          },
          "maxLikes": {
            "title": "Maximum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Keep posts with no more than this many likes. Missing metrics do not satisfy a maximum."
          },
          "minReplies": {
            "title": "Minimum replies",
            "minimum": 0,
            "type": "integer",
            "description": "Keep posts with at least this many replies. Missing metrics do not satisfy a minimum."
          },
          "minReposts": {
            "title": "Minimum reposts",
            "minimum": 0,
            "type": "integer",
            "description": "Keep posts with at least this many reposts. Missing metrics do not satisfy a minimum."
          },
          "verifiedOnly": {
            "title": "Verified authors only",
            "type": "boolean",
            "description": "Keep only posts whose public author metadata is explicitly verified.",
            "default": false
          },
          "includeAuthors": {
            "title": "Include authors",
            "type": "array",
            "description": "Keep posts from these exact Threads usernames only. Leading @ is optional.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "excludeAuthors": {
            "title": "Exclude authors",
            "type": "array",
            "description": "Remove posts from these exact Threads usernames. Leading @ is optional.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "includeKeywords": {
            "title": "Include keywords",
            "type": "array",
            "description": "Keep posts whose returned text contains at least one term.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Remove posts whose returned text contains any term.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "hashtags": {
            "title": "Required hashtags",
            "type": "array",
            "description": "Keep posts containing at least one of these normalized hashtags.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "mentions": {
            "title": "Required mentions",
            "type": "array",
            "description": "Keep posts mentioning at least one of these exact usernames.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "mediaTypes": {
            "title": "Media types",
            "type": "array",
            "description": "Keep posts containing at least one selected media type.",
            "items": {
              "type": "string",
              "enum": [
                "image",
                "video",
                "carousel",
                "unknown"
              ]
            }
          },
          "repliesOnly": {
            "title": "Replies only",
            "type": "boolean",
            "description": "Emit reply posts and exclude root posts.",
            "default": false
          },
          "rootPostsOnly": {
            "title": "Root posts only",
            "type": "boolean",
            "description": "Emit root posts and exclude replies. Cannot be enabled with Replies only.",
            "default": false
          },
          "includeReposts": {
            "title": "Include reposts",
            "type": "boolean",
            "description": "Include records identified as reposts.",
            "default": true
          },
          "includeQuotes": {
            "title": "Include quotes",
            "type": "boolean",
            "description": "Include records identified as quote posts.",
            "default": true
          },
          "sortBy": {
            "title": "Sort results",
            "enum": [
              "default",
              "newest",
              "oldest",
              "mostLiked",
              "mostReplied",
              "mostReposted",
              "engagement"
            ],
            "type": "string",
            "description": "Final post ordering after normalization, deduplication, reply policy, and filtering.",
            "default": "default"
          },
          "monitor": {
            "title": "Only return new or changed posts",
            "type": "boolean",
            "description": "Turn the scrape into a persistent monitor. Future scheduled runs can return only new posts or engagement changes.",
            "default": false
          },
          "stateKey": {
            "title": "Monitor name",
            "pattern": "^[A-Za-z0-9._-]{1,128}$",
            "minLength": 1,
            "maxLength": 128,
            "type": "string",
            "description": "Stable identifier for this independent monitor. Reuse the same value on future scheduled runs.",
            "default": "default"
          },
          "emitMode": {
            "title": "What should monitor runs return?",
            "enum": [
              "new",
              "new_and_changed",
              "changed",
              "all"
            ],
            "type": "string",
            "description": "new = unseen posts; changed = metric changes; new_and_changed = both; all = every eligible record.",
            "default": "new"
          },
          "changeRetentionDays": {
            "title": "Remember changes for",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Discard monitoring snapshots not seen within this many days.",
            "default": 30
          },
          "maxStateRecords": {
            "title": "Maximum remembered posts",
            "minimum": 100,
            "maximum": 500000,
            "type": "integer",
            "description": "Maximum post snapshots retained for this monitor after pruning.",
            "default": 50000
          },
          "proxyMode": {
            "title": "Proxy strategy",
            "enum": [
              "auto",
              "direct",
              "datacenter",
              "residential"
            ],
            "type": "string",
            "description": "Auto starts with direct HTTP and escalates to Apify datacenter or residential proxies only after failure.",
            "default": "auto"
          },
          "maxConcurrency": {
            "title": "Maximum concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum Threads targets processed concurrently.",
            "default": 5
          },
          "requestTimeoutSecs": {
            "title": "Request timeout",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Abort one HTTP attempt after this many seconds.",
            "default": 30
          },
          "maxRequestRetries": {
            "title": "Request retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum bounded retries per fetch strategy for retryable failures.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}