{
  "openapi": "3.0.1",
  "info": {
    "title": "Threads Search Scraper - Posts by Keyword & Hashtag, No Login",
    "description": "Search Threads posts by keyword or #hashtag without logging in: text, author, likes, replies, reposts, views, media, links and date. Top or newest first, 60-85 posts per keyword, filters for likes, replies, language and date. From $1.50 per 1,000 posts.",
    "version": "0.1",
    "x-build-id": "IndBEdVw3RaSfjctI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alom~threads-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alom-threads-search-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/alom~threads-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-alom-threads-search-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/alom~threads-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-alom-threads-search-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 keywords or #hashtags",
            "type": "array",
            "description": "Keywords, <code>#hashtags</code>, or threads.com search / <code>/tag/</code> URLs. Threads shows logged-out visitors ~20 posts per result page, so the Actor opens several result pages (keyword search, tag search, tag page) from fresh IPs and merges them: typically <b>60-85 unique posts per keyword</b>. In <b>accounts</b> mode: keywords to find profiles by (up to 100 per keyword). In the profile modes: keywords only <i>flag</i> matching rows (<code>keywordMatch</code>).",
            "items": {
              "type": "string"
            }
          },
          "searchSort": {
            "title": "Search order",
            "enum": [
              "top",
              "recent"
            ],
            "type": "string",
            "description": "<b>Recent</b> returns the posts found newest first. The real \"Recent\" tab of Threads needs a logged-in account: with your own session cookie (below) it is used, without one the Actor sorts what it found.",
            "default": "top"
          },
          "requireKeywordMatch": {
            "title": "Only posts that contain the keyword",
            "type": "boolean",
            "description": "Threads' search also returns loosely related posts. Turn on to drop hits whose text, topic tag or link title does not contain the keyword (dropped posts are not charged). Every search row has <code>keywordMatch</code> either way.",
            "default": false
          },
          "maxPosts": {
            "title": "Max posts per keyword",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Threads shows logged-out visitors ~20 posts per result page; the Actor merges several result pages, typically 60-85 unique posts per keyword. With your own session cookie the Recent tab pages much deeper.",
            "default": 50
          },
          "postedAfter": {
            "title": "Only posts published after",
            "type": "string",
            "description": "Date (UTC), ISO timestamp or relative like <code>7 days</code>."
          },
          "postedBefore": {
            "title": "Only posts published before",
            "type": "string",
            "description": "Date (UTC) or ISO timestamp (exclusive)."
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only posts with at least this many likes. Leave empty for no limit. Handy for search, where many results have no engagement at all."
          },
          "minReplies": {
            "title": "Minimum replies",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only posts with at least this many replies. Leave empty for no limit."
          },
          "languages": {
            "title": "Languages",
            "type": "array",
            "description": "Keep only posts in these languages, as two-letter codes: <code>en</code>, <code>es</code>, <code>pt</code>, <code>fr</code>, <code>de</code>, <code>ja</code>, <code>ko</code>, <code>zh</code>, <code>ru</code>… The language is guessed from the text of each post (see the <code>language</code> field). Posts too short to tell are kept.",
            "items": {
              "type": "string"
            }
          },
          "includeViews": {
            "title": "Add view counts",
            "type": "boolean",
            "description": "Fill <code>viewCount</code> (the number Threads shows under a post, e.g. 423K views) on every post. Each count is read from the post's own page: one extra request per post, so the run takes longer. Not charged extra. A post you give by URL always has its view count.",
            "default": false
          },
          "onlyNewSinceLastRun": {
            "title": "Only new posts since my last run (monitoring)",
            "type": "boolean",
            "description": "Skip posts an earlier run with the same monitor name already returned (not charged). Pair with a Schedule to get only fresh posts. For a dedicated monitor see Threads Hashtag & Keyword Monitor.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Keep separate memories for different monitors (e.g. <code>competitors-daily</code>). Defaults to <code>default</code>."
          },
          "sessionCookie": {
            "title": "Your own Threads session cookie (optional, at your own risk)",
            "type": "string",
            "description": "<b>Optional and never required.</b> Paste the cookies of a threads.com tab where you are logged in (the <code>Cookie</code> header, or a JSON export; at least <code>sessionid</code>, ideally also <code>csrftoken</code> and <code>ds_user_id</code>). Searches then use Threads' real \"Recent\" tab and page through it like the app (about twice as many recent posts in our tests). Requests are then made <b>as your account</b> (one IP, at most 2 in parallel): Meta may rate-limit, checkpoint or ban accounts that scrape, so use a spare account. If the cookie is invalid or expired, the run says so and continues without it. Stored encrypted, never logged or returned."
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Profiles / posts / keywords processed in parallel.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "The default Apify datacenter proxy works and is included in the price. If Threads starts blocking it, the run switches to residential proxies by itself (logged).",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}