{
  "openapi": "3.0.1",
  "info": {
    "title": "Threads Posts Scraper & Keyword Search, No Login",
    "description": "Threads posts scraper and keyword search: export posts of public accounts, paging back through their history, and search by keyword or hashtag, Top and Recent, to CSV, Excel or JSON. Likes, replies, reposts, date, language, media, author. Free filters, $0.15 per 1,000 posts, no start fee.",
    "version": "0.1",
    "x-build-id": "JWv0uI5H6AQ5EwsDA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/firsthand~threads-posts-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-firsthand-threads-posts-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/firsthand~threads-posts-scraper/runs": {
      "post": {
        "operationId": "runs-sync-firsthand-threads-posts-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/firsthand~threads-posts-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-firsthand-threads-posts-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": {
          "usernames": {
            "title": "Threads usernames",
            "type": "array",
            "description": "Public Threads accounts: zuck, @zuck or https://www.threads.com/@zuck, one per line. Each account gives its latest posts.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search keywords or hashtags",
            "type": "array",
            "description": "Words, phrases or #hashtags to search on Threads, one per line (for example: ai agents, #running). A Threads search link also works.",
            "items": {
              "type": "string"
            }
          },
          "searchSort": {
            "title": "Search results",
            "enum": [
              "both",
              "top",
              "recent"
            ],
            "type": "string",
            "description": "Which Threads search tab to read for each wording. Empty means both: Top and Recent together give more unique posts."
          },
          "expandQueries": {
            "title": "Search several wordings",
            "type": "boolean",
            "description": "Also search the hashtag form (#aiagents), the word without # and the singular or plural. A phrase that Threads leaves empty is searched word by word. Empty means on. Duplicates are removed and never charged."
          },
          "maxItems": {
            "title": "Max posts for the whole run",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many posts in total. This is your cost cap: you pay only for delivered posts."
          },
          "maxPostsPerSource": {
            "title": "Max posts per username or keyword",
            "minimum": 1,
            "type": "integer",
            "description": "Optional cap for each username and each search keyword, so one source does not use up the whole run."
          },
          "postedAfter": {
            "title": "Posted after",
            "type": "string",
            "description": "Only posts newer than this: a date (2026-10-01) or a period (7 days, 3 months)."
          },
          "postedBefore": {
            "title": "Posted before",
            "type": "string",
            "description": "Only posts older than this: a date (2026-11-01) or a period (1 day)."
          },
          "minLikes": {
            "title": "Min likes",
            "minimum": 0,
            "type": "integer",
            "description": "Skip posts with fewer likes. 1 removes the zero-engagement posts that keyword search often returns."
          },
          "minReplies": {
            "title": "Min replies",
            "minimum": 0,
            "type": "integer",
            "description": "Skip posts with fewer replies."
          },
          "minReposts": {
            "title": "Min reposts",
            "minimum": 0,
            "type": "integer",
            "description": "Skip posts with fewer reposts."
          },
          "languages": {
            "title": "Languages",
            "type": "array",
            "description": "Keep only posts in these languages, two-letter codes (en, es, ja). Threads labels many posts; for the rest the language is read from the text, and a post with no clear language is skipped when this filter is on.",
            "items": {
              "type": "string"
            }
          },
          "strictKeywordMatch": {
            "title": "Only posts that contain the keyword",
            "type": "boolean",
            "description": "Search: keep only posts whose text contains every word of the keyword. Threads search also returns related posts without it."
          },
          "includeReposts": {
            "title": "Include reposts",
            "type": "boolean",
            "description": "Account posts: also deliver reposts of other people's posts (marked isRepost). Off by 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}