{
  "openapi": "3.0.1",
  "info": {
    "title": "Threads Search Post Scraper",
    "description": "Search public Threads posts by keyword or hashtag, or look up posts by URL or numeric ID. Get normalized text, author, publication time, engagement, media, links, conversation data, and public replies from targeted posts in an Apify dataset.",
    "version": "1.0",
    "x-build-id": "2uBRgUVd4OJUwt1mG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/maximedupre~threads-search-post-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-maximedupre-threads-search-post-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/maximedupre~threads-search-post-scraper/runs": {
      "post": {
        "operationId": "runs-sync-maximedupre-threads-search-post-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/maximedupre~threads-search-post-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-maximedupre-threads-search-post-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": [
          "findPostsBy"
        ],
        "properties": {
          "findPostsBy": {
            "title": "Find posts by",
            "enum": [
              "keyword",
              "hashtag",
              "post"
            ],
            "type": "string",
            "description": "Choose how to find public Threads posts. Keyword and Hashtag searches accept lists. Post URL or numeric ID looks up the submitted posts."
          },
          "keywords": {
            "title": "Keywords",
            "minItems": 1,
            "type": "array",
            "description": "Use this field when Find posts by is Keyword. Enter one or more words or phrases to search. The same sort and post limit apply to all submitted keywords. Values in the other choice sections are ignored.",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "default": [
              "AI"
            ]
          },
          "hashtags": {
            "title": "Hashtags",
            "minItems": 1,
            "type": "array",
            "description": "Use this field when Find posts by is Hashtag. Enter one or more hashtags with or without the # sign. The same sort and post limit apply to all submitted hashtags. Values in the other choice sections are ignored.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "postTargets": {
            "title": "Post URLs or numeric IDs",
            "minItems": 1,
            "type": "array",
            "description": "Use this field when Find posts by is Post URL or numeric ID. Enter one or more public Threads post URLs with the handle and post code, such as https://www.threads.com/@user/post/CODE, or numeric post IDs. The run uses one shared post limit for all submitted targets. Values in the other choice sections are ignored.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "sortOrder": {
            "title": "Sort search results",
            "enum": [
              "recent",
              "top"
            ],
            "type": "string",
            "description": "For Keyword and Hashtag, choose Recent first or Relevance or top. Post URL or numeric ID ignores this field.",
            "default": "recent"
          },
          "publicationDate": {
            "title": "Publication date filter",
            "required": [],
            "type": "object",
            "description": "For Keyword and Hashtag, narrow returned posts by publication time. Use From and To for a UTC calendar date range, or use Recent days for a recent window. Post URL or numeric ID ignores this field.",
            "properties": {
              "fromDate": {
                "title": "From",
                "type": "string",
                "description": "First publication date to include. Use a UTC calendar date.",
                "editor": "datepicker",
                "dateType": "absolute"
              },
              "toDate": {
                "title": "To",
                "type": "string",
                "description": "Last publication date to include. Use a UTC calendar date.",
                "editor": "datepicker",
                "dateType": "absolute"
              },
              "recentDays": {
                "title": "Recent days",
                "type": "integer",
                "description": "Include posts published in this many days before the run. Use a positive whole number.",
                "minimum": 1
              }
            }
          },
          "author": {
            "title": "Author filter",
            "minLength": 1,
            "type": "string",
            "description": "For Keyword and Hashtag, narrow returned posts to a public Threads author. Enter the username with or without @. Post URL or numeric ID ignores this field."
          },
          "maxItems": {
            "title": "Maximum posts",
            "minimum": 1,
            "type": "integer",
            "description": "Optional limit for the run. Stop after this many returned posts. Leave it empty to return all available results until the source is exhausted."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}