{
  "openapi": "3.0.1",
  "info": {
    "title": "Threads Scraper: Posts, Replies, Profiles & Search",
    "description": "Meta Threads scraper and Threads API for public data: search posts by keyword or hashtag (often hundreds per term) or find accounts, and scrape profiles, posts, replies and reposts by username or post URL. Likes, views, shares, media, links, followers and Instagram counts. No login.",
    "version": "0.1",
    "x-build-id": "mUON8o1yvYz8lSHc3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/deepmine~threads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-deepmine-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/deepmine~threads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-deepmine-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/deepmine~threads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-deepmine-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": {
          "searchQueries": {
            "title": "🔍 Search terms",
            "type": "array",
            "description": "Words or hashtags, one per line, e.g. coffee or #booktok. A Threads search or tag URL works too. Empty = no search.",
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "🧭 Search for",
            "enum": [
              "posts",
              "profiles"
            ],
            "type": "string",
            "description": "Posts that mention the term, or accounts (up to 100 per term, each with followers, bio and links).",
            "default": "posts"
          },
          "usernames": {
            "title": "👤 Usernames or profile URLs",
            "type": "array",
            "description": "Accounts, one per line: mosseri, @mosseri or threads.com/@mosseri. You get the profile and its posts; pick replies or reposts under 👤 Profile options. Empty = none.",
            "items": {
              "type": "string"
            }
          },
          "postUrls": {
            "title": "🔗 Post URLs",
            "type": "array",
            "description": "Post links, one per line (threads.com/@user/post/... or threads.com/t/...). You get the post with its view count, then its replies. Empty = none.",
            "items": {
              "type": "string"
            }
          },
          "maxItemsPerInput": {
            "title": "📊 Max results per input",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Most results per search term, per profile tab and per post's replies. A search term gives up to a few hundred posts (see Search depth in the README).",
            "default": 100
          },
          "sort": {
            "title": "🔃 Sort",
            "enum": [
              "top",
              "recent",
              "recentStrict"
            ],
            "type": "string",
            "description": "For search results and replies. Recent sends each batch newest first as it arrives (first rows in seconds); Recent, strict gathers more first and sorts everything.",
            "default": "top"
          },
          "onlyMatchingPosts": {
            "title": "Only posts that mention the search term",
            "type": "boolean",
            "description": "Threads also shows loosely related posts. On: keep only posts whose text, topic, hashtags or author name contain your words. Posts left out are not charged.",
            "default": true
          },
          "deepSearch": {
            "title": "Search deeper",
            "type": "boolean",
            "description": "When Threads' search pages run out before your max, also read the newest posts of the authors found and of accounts matching the term, keeping posts that mention it. Off: Threads' search pages only.",
            "default": true
          },
          "profileContent": {
            "title": "For each username, get",
            "type": "array",
            "description": "Any mix of the profile, its posts, its replies to others (each with the post it answers) and its reposts (Threads shows the latest 25).",
            "items": {
              "type": "string",
              "enum": [
                "profile",
                "posts",
                "replies",
                "reposts"
              ],
              "enumTitles": [
                "Profile",
                "Posts",
                "Replies",
                "Reposts"
              ]
            },
            "default": [
              "profile",
              "posts"
            ]
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Add each linked post's replies after the post, up to 📊 Max results per input.",
            "default": true
          },
          "includeNestedReplies": {
            "title": "Include replies to replies",
            "type": "boolean",
            "description": "Under each reply, add the replies to it, up to 3 levels deep. Each row has replyDepth and parentPostId to rebuild the tree.",
            "default": true
          },
          "postedAfter": {
            "title": "📅 Posted after",
            "type": "string",
            "description": "A date (2026-09-01) or a period (7 days, 12 hours). Empty = any time. Posts outside the window are not charged."
          },
          "postedBefore": {
            "title": "📅 Posted before",
            "type": "string",
            "description": "A date (2026-09-30) or a period. Empty = up to now."
          },
          "includeViewCounts": {
            "title": "👁️ View counts on every post",
            "type": "boolean",
            "description": "On: every search and profile post gets its view count (viewCount), read in parallel from the post's own page; rows still stream as they're ready. Post URLs always get theirs. Same price.",
            "default": true
          },
          "includeAuthorDetails": {
            "title": "👤 Author details on every post",
            "type": "boolean",
            "description": "Add the author's followers, bio, HD photo, topics, Instagram followers and bio links to every post row (looked up once per author). Same price.",
            "default": true
          },
          "includeReplyViewCounts": {
            "title": "View counts on replies too",
            "type": "boolean",
            "description": "Read each reply's view count (viewCount): one more page per reply, read alongside the rows so the first row doesn't wait. Turn off for the fastest big reply runs. Same price.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Leave as is. The Actor starts on Apify datacenter IPs, which Threads serves, and moves a request to residential only if Threads refuses. Same price either way.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}