{
  "openapi": "3.0.1",
  "info": {
    "title": "Threads Scraper: Posts, Profiles, Search & Replies",
    "description": "Scrape public Threads data: posts with likes, replies, reposts, views and media, user reposts and replies, keyword and hashtag search, profiles with followers and bio links, and full threads from post links.",
    "version": "0.2",
    "x-build-id": "RDZanR4T6F9feNIoK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/api_creators~threads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-api_creators-threads-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/api_creators~threads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-api_creators-threads-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/api_creators~threads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-api_creators-threads-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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "user",
              "user_reposts",
              "user_replies",
              "search",
              "profiles",
              "post_link",
              "profile",
              "thread"
            ],
            "type": "string",
            "description": "Choose a mode. Supply usernames for the account modes, keywords for Search or Find profiles, or post links for the two post-link modes.",
            "default": "user"
          },
          "usernames": {
            "title": "Usernames",
            "type": "array",
            "description": "Threads accounts for the user modes: `zuck`, `@zuck` or a profile link like `https://www.threads.com/@zuck`.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords or hashtags",
            "type": "array",
            "description": "Words or hashtags for search and find-profiles modes, e.g. `coffee`, `#AI` or `latte art`. In the user modes, posts that mention a keyword are tagged with it.",
            "items": {
              "type": "string"
            }
          },
          "post_links": {
            "title": "Post links",
            "type": "array",
            "description": "Threads post and share links for Post by link or Post and public replies. Standard links on threads.com and threads.net are accepted.",
            "items": {
              "type": "string"
            }
          },
          "max_posts": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Results per username, keyword, or post link. Find profiles and both post-link modes return up to 100 per input. Profile by username returns one per account.",
            "default": 50
          },
          "search_filter": {
            "title": "Sort order",
            "enum": [
              "top",
              "recent"
            ],
            "type": "string",
            "description": "Top prioritizes the keyword and the order returned by Threads. Recent sorts collected matching public results by newest first.",
            "default": "top"
          },
          "search_language": {
            "title": "Preferred language",
            "enum": [
              "english",
              "japanese",
              "chinese"
            ],
            "type": "string",
            "description": "Preferred interface language for public search. Use Detected post languages to filter post rows by language.",
            "default": "english"
          },
          "start_date": {
            "title": "Start date",
            "type": "string",
            "description": "Only posts from this date onward: `YYYY-MM-DD` or relative like `7 days` or `1 month` (UTC)."
          },
          "end_date": {
            "title": "End date",
            "type": "string",
            "description": "Only posts up to this date (inclusive): `YYYY-MM-DD` or relative like `1 day` (UTC)."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Leave on \"No proxy\" to use the built-in proxies. Choose your own proxy URLs to use those instead.",
            "default": {
              "useApifyProxy": false
            }
          },
          "include_views": {
            "title": "Look up public views",
            "type": "boolean",
            "description": "Fetch each selected post page for its public view count. Turn off for faster collection.",
            "default": true
          },
          "strict_keyword_match": {
            "title": "Require a keyword match",
            "type": "boolean",
            "description": "In Search mode, keep posts matching the original keyword in the text, topic tag, or link preview title.",
            "default": false
          },
          "languages": {
            "title": "Detected post languages",
            "type": "array",
            "description": "Optional list of detected language codes to keep, such as en or ja. Posts with no detected language are omitted when this is set.",
            "items": {
              "type": "string"
            }
          },
          "min_likes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Keep posts with at least this many likes. Zero keeps all posts.",
            "default": 0
          },
          "min_replies": {
            "title": "Minimum replies",
            "minimum": 0,
            "type": "integer",
            "description": "Keep posts with at least this many replies. Zero keeps all posts.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}