{
  "openapi": "3.0.1",
  "info": {
    "title": "Threads Search Scraper: Keywords, Hashtags, Dates",
    "description": "Search Threads without a login: keyword and tag searches, top or recent posts, or one page per date window down to one hour for depth. One row per post with text, author, time, likes, replies, reposts, media, language and whether the text contains your words. JSON, CSV, API. Pay per post.",
    "version": "0.1",
    "x-build-id": "LJHTCbBcApXuF0LO3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automation_craft~threads-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automation_craft-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/automation_craft~threads-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automation_craft-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/automation_craft~threads-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automation_craft-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 words",
            "type": "array",
            "description": "Keyword searches, one per line, as typed into the Threads search box: coffee, running shoes, ai agents. A pasted Threads search URL (threads.com/search?q=...) is read as its word, or as a tag for a tag search; a profile or post address and a mention (@name, which Threads' search without a login never answers) are refused, free. Each search reads the top posts page (about 20 to 30 posts), the recent page, or one page per date window (searchMode). Up to 100 per run.",
            "items": {
              "type": "string"
            }
          },
          "tags": {
            "title": "Tags",
            "type": "array",
            "description": "Threads tags (topics), one per line, with or without the #: sourdough, #marathontraining. Read on the tag surface of the search, the same way as a search word (top, recent or date windows). Up to 100 per run.",
            "items": {
              "type": "string"
            }
          },
          "searchMode": {
            "title": "Search depth",
            "enum": [
              "top",
              "recent",
              "top_and_recent",
              "windows"
            ],
            "type": "string",
            "description": "top: the top posts page of each search (one page). recent: the newest posts page. top_and_recent: both. windows: one top page per date window of windowHours between postedAfter and postedBefore (the last 7 days when no dates are given), newest window first; the deep mode. Each page that holds at least one post passing your filters is one search page event; an empty page is free."
          },
          "windowHours": {
            "title": "Window length (hours)",
            "enum": [
              "24",
              "12",
              "6",
              "3",
              "1"
            ],
            "type": "string",
            "description": "For the windows mode: the length of each date window, on a fixed UTC grid from midnight. 24 reads one page per day; 1 reads one page per hour, the deepest Threads answers (measured on one day of a busy word: 19 posts from the day window, about 500 distinct posts from 24 hour windows). Shorter windows are not honoured by Threads. At most 744 windows per search. Default 24."
          },
          "postedAfter": {
            "title": "Posted on or after",
            "type": "string",
            "description": "Keep posts from this moment on (UTC): YYYY-MM-DD, YYYY-MM-DDTHH:MM, today, yesterday, \"7 days\", \"2 weeks\", \"1 month\" (whole UTC days counted back from the end day) or \"6 hours\" (counted back from the run's start). With the windows mode this is where the first window starts."
          },
          "postedBefore": {
            "title": "Posted on or before",
            "type": "string",
            "description": "Keep posts up to this moment (UTC): YYYY-MM-DD (the end of that day), YYYY-MM-DDTHH:MM, today, yesterday or \"N hours\". Default: the run's start."
          },
          "requireKeywordInText": {
            "title": "Only posts whose text contains the search words",
            "type": "boolean",
            "description": "Threads also answers related posts that do not contain the search word (more than half of the posts on date window pages in our measurements). On: keep only posts whose own text contains every search word, at the start of a word, in any order and any case (nike matches Nike, #nike and Nikes); the others are left out and never charged. Off: keep every post Threads answers; each row still says keywordInText true or false. Keyword searches only (tag pages are kept as Threads files them). On by default."
          },
          "languages": {
            "title": "Languages",
            "type": "array",
            "description": "Keep only posts whose language is one of these codes: en, es, ja, pt. Threads itself labels only Chinese, Japanese and Korean posts; every other post is classified from its text here (languageSource says which; texts under 80 characters stay unknown). Unknown posts are KEPT and marked languageUnknown true unless dropUnknownLanguage is on. The run's summary row counts the kept and the dropped unknown posts.",
            "items": {
              "type": "string"
            }
          },
          "dropUnknownLanguage": {
            "title": "Drop posts without a detected language",
            "type": "boolean",
            "description": "With a languages list: drop posts that carry no language value instead of keeping them as unknown. Off by default so nothing is dropped silently."
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only posts with at least this many likes. Default 0."
          },
          "excludeReplies": {
            "title": "Exclude replies",
            "type": "boolean",
            "description": "Drop posts that are replies to another post (search pages carry some). Off by default."
          },
          "onlyWithMedia": {
            "title": "Only posts with media",
            "type": "boolean",
            "description": "Keep only posts with an image, a video or a carousel. Off by default."
          },
          "maxPostsPerQuery": {
            "title": "Posts per search",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Posts to keep per search word or tag across its pages and windows; the search stops when it is reached. Default 100 when left out (the Console form starts at 20), at most 5,000."
          },
          "maxPosts": {
            "title": "Posts per run",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The cap of post rows for the whole run, across every search and tag. Default 1,000, at most 100,000."
          },
          "memoryName": {
            "title": "Memory name (pay once per post across runs)",
            "type": "string",
            "description": "Give a name and every later run with the same name delivers and charges only posts it has not delivered before: the way to run a scheduled keyword monitor. The memory is a named key-value store this Actor creates in your account. Leave empty for a one off run."
          },
          "resetMemory": {
            "title": "Reset the memory",
            "type": "boolean",
            "description": "Forget every post the named memory holds before this run, so every post counts as new again (and is charged again)."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify datacenter proxy by default (one exit address at a time; a run moves to a fresh exit when Threads asks it to wait, up to 4 times). Residential proxy is not needed; use it only if your runs see refusals."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}