{
  "openapi": "3.0.1",
  "info": {
    "title": "Threads Replies Scraper: Comments & Nested Replies",
    "description": "Scrape Threads replies and comments from any post or the latest posts of a profile. Get text, date, likes, author with stable user ID, reply depth and flags for replies by the post author. Nested replies, newest-first monitoring, no login. Export to JSON, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "hT7godu6ACLOjGGWo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/wiseus-labs~threads-replies-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-wiseus-labs-threads-replies-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/wiseus-labs~threads-replies-scraper/runs": {
      "post": {
        "operationId": "runs-sync-wiseus-labs-threads-replies-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/wiseus-labs~threads-replies-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-wiseus-labs-threads-replies-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": {
          "postUrls": {
            "title": "🔗 Post URLs",
            "type": "array",
            "description": "Threads post links, one per line. For example: https://www.threads.com/@nasa/post/DfaRKFSlI4A. Links from threads.net, links with extra parts (?xmt=..., /media), short /t/CODE links and bare post codes work too. A link to a reply scrapes the replies under that reply. Duplicates are removed.",
            "items": {
              "type": "string"
            }
          },
          "profiles": {
            "title": "👤 Profiles",
            "type": "array",
            "description": "Threads profiles, one per line: nasa, @nasa or https://www.threads.com/@nasa. The replies under each profile's latest posts are scraped (see Latest posts per profile). Posts without replies cost nothing extra.",
            "items": {
              "type": "string"
            }
          },
          "postsPerProfile": {
            "title": "Latest posts per profile",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many of each profile's latest posts to take, newest first. For example: 5. A pinned post counts only when it is among the latest by date.",
            "default": 5
          },
          "sortOrder": {
            "title": "🧭 Sort replies by",
            "enum": [
              "top",
              "newest"
            ],
            "type": "string",
            "description": "Top: the most relevant replies first, as on the post page. Newest first: the latest replies first; together with Replies posted after it stops at the first older reply, so a scheduled run picks up only new replies.",
            "default": "top"
          },
          "includeNestedReplies": {
            "title": "🌳 Include nested replies",
            "type": "boolean",
            "description": "Also save replies to replies. Each nested reply comes right after the reply it answers, with its depth and parent ID, so the table reads like the conversation. Off by default.",
            "default": false
          },
          "maxNestedRepliesPerReply": {
            "title": "Max nested replies per reply",
            "minimum": 0,
            "type": "integer",
            "description": "How many nested replies to save under each direct reply, all deeper levels together. For example: 20. Applies only when Include nested replies is on. 0 means all.",
            "default": 20
          },
          "includeOriginalPost": {
            "title": "📝 Include the original post",
            "type": "boolean",
            "description": "Save the post itself as the first row of each conversation (text, author, likes, reply count), also when it has no replies. Turn it off for scheduled runs that need only new replies.",
            "default": true
          },
          "dateFrom": {
            "title": "📅 Replies posted after",
            "pattern": "^(|\\d{4}-\\d{2}-\\d{2}.*|\\s*\\d+\\s*(minute|minutes|min|mins|hour|hours|hr|hrs|h|day|days|d|week|weeks|w|month|months|year|years|y)\\s*(ago)?\\s*)$",
            "type": "string",
            "description": "Only replies published on or after this date. Pick a date (YYYY-MM-DD, UTC) or a relative time such as 1 day. Through the API you can also use hours, for example 6 hours. For monitoring, schedule a daily run with 1 day here and Sort replies by Newest first."
          },
          "minLikes": {
            "title": "Min likes",
            "minimum": 0,
            "type": "integer",
            "description": "Only replies with at least this many likes. For example: 10. Does not apply to the original post row. A reply removed by this filter takes its nested replies with it."
          },
          "maxRepliesPerPost": {
            "title": "Max replies per post",
            "minimum": 0,
            "type": "integer",
            "description": "How many direct replies to save from each post. For example: 100. Nested replies are limited separately. 0 means all replies Threads shows.",
            "default": 100
          },
          "maxItems": {
            "title": "Max results in total",
            "minimum": 0,
            "type": "integer",
            "description": "Stop the whole run after this many saved rows (replies and original posts) across all inputs. For example: 1000. Empty or 0 means no limit."
          },
          "maxConcurrency": {
            "title": "Posts in parallel",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many posts are scraped at the same time. For example: 5.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}