{
  "openapi": "3.0.1",
  "info": {
    "title": "Threads Scraper: All Posts, Views & Profiles",
    "description": "Scrape all posts of Threads profiles without login: text, likes, replies, reposts, quotes, exact views, media, links. Every post down to the first one, date range, latest replies and reposts, only new posts since the last run, and a profiles table with followers, bio links and contacts.",
    "version": "0.1",
    "x-build-id": "gj6yGC2QkAjBQaBmV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/s_actors~threads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-s_actors-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/s_actors~threads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-s_actors-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/s_actors~threads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-s_actors-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": {
          "usernames": {
            "title": "👤 Threads profiles",
            "type": "array",
            "description": "One per line: @username, a username, or a profile link (threads.com/@user). Public profiles only: private and missing accounts are reported in the run status and are free. Each account's followers, bio, bio links and contacts go to the profiles table once, free.",
            "items": {
              "type": "string"
            }
          },
          "maxPostsPerProfile": {
            "title": "📝 Max posts per profile",
            "minimum": 0,
            "type": "integer",
            "description": "How many posts to scrape from each profile, newest first (pinned posts come first, as on the profile). 0 = every post down to the account's first one (about 15 threads a second).",
            "default": 100
          },
          "postUrls": {
            "title": "🔗 Post links",
            "type": "array",
            "description": "Optional: single posts by link (threads.com/@user/post/CODE), with views and all stats. Can be used alone or together with profiles.",
            "items": {
              "type": "string"
            }
          },
          "includeViews": {
            "title": "👁️ View counts",
            "type": "boolean",
            "description": "Exact view count of each post (and the engagement rate from it). Threads shows views only on the post page, so the Actor reads the start of each page: about 0.2 seconds per post. Turn off for the fastest runs.",
            "default": true
          },
          "includeThreadContinuations": {
            "title": "🧵 Thread continuations",
            "type": "boolean",
            "description": "Also output the author's follow-up posts in their own threads (multi-part posts), each as a row with threadId and positionInThread. Off = only the first post of every thread.",
            "default": true
          },
          "includeReplies": {
            "title": "💬 Latest replies of the account",
            "type": "boolean",
            "description": "Also output the replies the account wrote under other people's posts, with the post it answered (replyToPostUrl, replyToText). Threads shows only the latest 15 replies without login.",
            "default": false
          },
          "includeReposts": {
            "title": "🔁 Latest reposts of the account",
            "type": "boolean",
            "description": "Also output the posts the account reposted (the original post with its author and stats, plus repostedAt). Threads shows only the latest 25 reposts without login.",
            "default": false
          },
          "postedAfter": {
            "title": "📅 Posted after",
            "type": "string",
            "description": "Only posts published after this: a date like 2025-01-01 or a period like 7 days, 2 weeks, 6 months, 1 year (ago). Reading stops at the first older post."
          },
          "postedBefore": {
            "title": "📅 Posted before",
            "type": "string",
            "description": "Only posts published before this: a date like 2025-03-01 or a period like 30 days (ago)."
          },
          "minLikes": {
            "title": "❤️ Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Only posts with at least this many likes. Leave empty for all."
          },
          "onlyNewPosts": {
            "title": "🔔 Only new posts since the previous run",
            "type": "boolean",
            "description": "Output only posts newer than the newest one any earlier run in your account saw for this profile (key-value store threads-profile-state); replies and reposts already seen are skipped too. The first run outputs posts as usual (within Max posts per profile) and remembers the newest. A run with no new posts costs only the start.",
            "default": false
          },
          "maxConcurrency": {
            "title": "⚡ Profiles at the same time",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many profiles (and post links) are scraped in parallel. Each profile's posts are read page by page (15 threads a page).",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "🛡️ Proxy",
            "type": "object",
            "description": "Requests go direct first and switch to Apify datacenter proxies (then residential) when Threads refuses them. The default works for most runs.",
            "default": {
              "useApifyProxy": true
            }
          },
          "debugLog": {
            "title": "🐞 Debug log",
            "type": "boolean",
            "description": "Log every retried request (for troubleshooting).",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}