{
  "openapi": "3.0.1",
  "info": {
    "title": "Threads Search Scraper",
    "description": "Search Meta Threads by keyword for public posts or by username for profiles. Each post row has text, hashtags, mentions, likes, replies, reposts, media URLs and author data; results are de-duplicated across queries. No cookies or login.",
    "version": "0.2",
    "x-build-id": "GCLVfgy88NK8yj1kd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~threads-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-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/khadinakbar~threads-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-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/khadinakbar~threads-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-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",
        "required": [
          "queries"
        ],
        "properties": {
          "searchType": {
            "title": "Search type",
            "enum": [
              "posts",
              "users"
            ],
            "type": "string",
            "description": "What to search Meta Threads for. 'posts' searches the text of public Threads posts by keyword (e.g. 'ai agents'). 'users' searches for public Threads accounts by username keyword (e.g. 'openai'). Defaults to 'posts'. This is NOT a single-post URL scraper — it returns search-result lists.",
            "default": "posts"
          },
          "queries": {
            "title": "Search queries",
            "type": "array",
            "description": "One or more search terms. For 'posts' these are content keywords or hashtags (e.g. 'ai agents', 'climate tech'); for 'users' these are username fragments (e.g. 'openai'). Each query is searched independently and results are merged + de-duplicated. Provide at least one. NOT post URLs or profile URLs.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max results (total)",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on total results pushed across all queries, used for cost control. Each result is billed (see pricing). Defaults to 100. The actor stops once this many records are collected. Bounds: 1 and up. Free Apify plan runs return up to 25 results per run.",
            "default": 100
          },
          "maxResultsPerQuery": {
            "title": "Max results per query",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap on results taken from each query. One provider call returns roughly 5-20 posts, so for more per query turn on Deep search. Defaults to 25 (or to Max results when Deep search is on). Bounds: 1-1000."
          },
          "startDate": {
            "title": "Start date (posts only)",
            "type": "string",
            "description": "Optional earliest date for 'posts' search, format YYYY-MM-DD (e.g. '2026-01-01'). Ignored for 'users' search. Leave empty for no lower bound. With Deep search it sets the oldest day searched."
          },
          "endDate": {
            "title": "End date (posts only)",
            "type": "string",
            "description": "Optional latest date for 'posts' search, format YYYY-MM-DD (e.g. '2026-06-30'). Ignored for 'users' search. Leave empty for today. With Deep search it sets the newest day searched."
          },
          "deepSearch": {
            "title": "Deep search (posts only)",
            "type": "boolean",
            "description": "Search day by day to collect many more posts per keyword than one call returns. Needs Max results above 9. Slower and uses more provider calls, so the run stops early when new days stop adding posts. Default off.",
            "default": false
          },
          "maxDays": {
            "title": "Days to cover (Deep search)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many days back Deep search covers when no start date is set. Bounds: 1-30. Defaults to 7.",
            "default": 7
          },
          "requireKeywordInText": {
            "title": "Keyword must appear in text (posts only)",
            "type": "boolean",
            "description": "Keep only posts whose text contains at least one search word. Posts filtered out are not billed. Default off.",
            "default": false
          },
          "excludeWords": {
            "title": "Exclude words (posts only)",
            "type": "array",
            "description": "Drop posts whose text contains any of these words (e.g. 'giveaway', 'crypto'). Filtered posts are not billed.",
            "items": {
              "type": "string"
            }
          },
          "minLikes": {
            "title": "Minimum likes (posts only)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only posts with at least this many likes. Filtered posts are not billed. Default 0.",
            "default": 0
          },
          "minReplies": {
            "title": "Minimum replies (posts only)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only posts with at least this many replies. Filtered posts are not billed. Default 0.",
            "default": 0
          },
          "language": {
            "title": "Language code (posts only)",
            "type": "string",
            "description": "Keep only posts in this language, as a two-letter code (e.g. 'en', 'es'). Posts with no detected language are dropped when set."
          },
          "hasMedia": {
            "title": "Only posts with media (posts only)",
            "type": "boolean",
            "description": "Keep only posts that include an image or video. Default off.",
            "default": false
          },
          "authorUsername": {
            "title": "Only this author (posts only)",
            "type": "string",
            "description": "Keep only posts written by this Threads username (without @), e.g. 'zuck'."
          },
          "onlyNew": {
            "title": "Only new posts (monitoring)",
            "type": "boolean",
            "description": "Skip posts already returned in earlier runs that used the same Monitor name, so scheduled runs give only fresh posts. Skipped posts are not billed. Default off.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor name",
            "type": "string",
            "description": "Name of the memory used by Only new posts. Use a different name per scheduled search. Letters, numbers and dashes. Defaults to 'default'.",
            "default": "default"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}