{
  "openapi": "3.0.1",
  "info": {
    "title": "Threads Scraper: Public Posts from Profiles and Post URLs",
    "description": "Scrape public Threads posts from profiles and single post URLs: text, date, likes, replies, reposts, quotes, media and author. No login. $2.00 per 1,000 posts, pay per event.",
    "version": "0.1",
    "x-build-id": "34kIV327v7u5EliK3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/redfoxscout~threads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-redfoxscout-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/redfoxscout~threads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-redfoxscout-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/redfoxscout~threads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-redfoxscout-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",
        "properties": {
          "targets": {
            "title": "Profiles or post URLs",
            "type": "array",
            "description": "Threads usernames, profile URLs or post URLs, one per line, e.g. zuck, https://www.threads.com/@nasa or https://www.threads.com/@zuck/post/Dd1MqfcG0aH.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Keywords or hashtags to search",
            "type": "array",
            "description": "Threads searches, one per line: a word or a hashtag, e.g. coffee or #espresso. Logged out, Threads shows about 13 to 25 top posts per search; with session cookies, more pages.",
            "items": {
              "type": "string"
            }
          },
          "includeProfile": {
            "title": "Include profile details",
            "type": "boolean",
            "description": "Also output one profile row per profile username: full name, verified badge, follower count, bio as shown, bio emails and phone numbers, bio links, profile picture URL and private flag. Each profile row is charged like one post.",
            "default": false
          },
          "includeReplies": {
            "title": "Include replies under post URLs",
            "type": "boolean",
            "description": "For post URLs, also output the replies Threads shows under the post, with the post's URL in parentPostUrl. Each reply is charged like one post.",
            "default": false
          },
          "maxReplies": {
            "title": "Max replies per post URL",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Replies read for each post URL when replies are included. Threads shows 10 replies at a time, so more pages are read as needed.",
            "default": 20
          },
          "includeSelfReplies": {
            "title": "Include the author's own replies",
            "type": "boolean",
            "description": "Also keep the author's follow-up replies in their own threads, e.g. a multi-part post; profiles only.",
            "default": false
          },
          "postedAfter": {
            "title": "Posted after (optional)",
            "type": "string",
            "description": "Profiles only: skip posts older than this date, e.g. 2026-09-01."
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "A name for this watch, e.g. competitors-weekly. Runs with the same name remember which posts they returned for each profile, in a key-value store in your account."
          },
          "onlyNewPosts": {
            "title": "Only new posts since the last run",
            "type": "boolean",
            "description": "Profiles only. Return just the posts that earlier runs with the same monitor name did not return. Needs a monitor name. Schedule the run to keep a feed of new posts.",
            "default": false
          },
          "maxItems": {
            "title": "Max results per search",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Stop each search after this many rows (posts, replies and profile rows).",
            "default": 50
          },
          "sessionCookies": {
            "title": "Session cookies (optional)",
            "type": "string",
            "description": "Cookies from your own logged-in Threads browser session: a Cookie header (name=value; name2=value2) or a JSON array exported by a cookie-editor extension. Used for keyword searches (Top or Recent, more pages) and view counts; if Threads refuses them, the run continues logged out. Stored encrypted by Apify."
          },
          "searchSort": {
            "title": "Search sort (with session cookies)",
            "enum": [
              "top",
              "recent"
            ],
            "type": "string",
            "description": "Keyword searches with session cookies: Top, or Recent (newest first). Without cookies, searches return the logged-out top posts.",
            "default": "top"
          },
          "maxConcurrency": {
            "title": "Searches in parallel",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many searches run at once.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}