{
  "openapi": "3.0.1",
  "info": {
    "title": "Threads: Public Profiles, Posts & Replies",
    "description": "Threads Scraper for public profiles, posts and replies. Enter a username to export its profile and recent posts with text, links and engagement counts.",
    "version": "0.2",
    "x-build-id": "ukx36jPyNIjd5nMed"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/deepmine~threads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-deepmine-threads",
        "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/runs": {
      "post": {
        "operationId": "runs-sync-deepmine-threads",
        "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/run-sync": {
      "post": {
        "operationId": "run-sync-deepmine-threads",
        "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": "👤 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"
            }
          },
          "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
          },
          "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
          },
          "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"
          },
          "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"
            }
          },
          "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
          },
          "searchFromUsernames": {
            "title": "🧑 Only posts by these accounts",
            "type": "array",
            "description": "Optional. Usernames, one per line: the search then reads these accounts' own posts (newest first, up to 500 each) and keeps the ones that mention your term, instead of Threads' search pages. Empty = posts by anyone.",
            "items": {
              "type": "string"
            }
          },
          "searchTab": {
            "title": "🗂️ Search pages",
            "enum": [
              "all",
              "top",
              "recent",
              "tags"
            ],
            "type": "string",
            "description": "All reads every Threads search page for the term (Top, Recent, #tag, related tags) and, with Search deeper, the authors' and matching accounts' posts. Top, Recent or Tags reads only that part (fewer posts, ~20 per page).",
            "default": "all"
          },
          "searchLanguage": {
            "title": "🌐 Preferred language",
            "enum": [
              "any",
              "en",
              "es",
              "pt",
              "fr",
              "de",
              "it",
              "ja",
              "ko",
              "zh",
              "hi",
              "id",
              "tr"
            ],
            "type": "string",
            "description": "Ask Threads for search results in this language first (the language a visitor's browser would ask for). A preference, not a filter: posts in other languages can still come. Threads' default favours English.",
            "default": "any"
          },
          "includeSearchReplies": {
            "title": "Include replies found by the search",
            "type": "boolean",
            "description": "Threads' search also shows replies to other posts (isReply = true). Off: posts only; replies left out are not charged.",
            "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."
          },
          "resumeFromDatasetId": {
            "title": "⏭️ Skip posts already in this dataset",
            "type": "string",
            "description": "Optional. The dataset ID of an earlier run (its Storage tab): posts and profiles already there are skipped and not charged. Use it to continue where a run stopped, or on a schedule to get only new posts."
          },
          "includeViewCounts": {
            "title": "👁️ View counts on every post",
            "type": "boolean",
            "description": "Read view counts for search and profile posts when Threads shows them. Long author histories save posts even if their view counts aren't ready near the time limit. Post URLs always request view counts. 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}