{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Post Comments Scraper — Thread, Depth, Karma",
    "description": "Every comment of any public Reddit post, not just the first page: the actor walks Reddit's own more-comments loaders down the thread. Every row carries score, depth, parent, text, author, exact time and permalink. Pick the thread order, cap the depth, add author karma. No login, pay per comment.",
    "version": "0.3",
    "x-build-id": "N7x3iHV6tgwdG7PdH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/foxlabs~reddit-post-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-foxlabs-reddit-post-comments-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/foxlabs~reddit-post-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-foxlabs-reddit-post-comments-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/foxlabs~reddit-post-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-foxlabs-reddit-post-comments-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": [
          "postUrls"
        ],
        "properties": {
          "postUrls": {
            "title": "Posts",
            "type": "array",
            "description": "One post per line: its address (https://www.reddit.com/r/python/comments/1x2jj5d/…, old.reddit.com or redd.it/1x2jj5d), its full name (t3_1x2jj5d) or its id (1x2jj5d). Share links (…/s/…) are not accepted. A post written twice is read once.",
            "items": {
              "type": "string"
            }
          },
          "maxCommentsPerPost": {
            "title": "Maximum comments per post",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "How many comments to deliver for each post, in the thread's order. The post's page carries its first 25; the Actor then walks Reddit's own \"more comments\" loaders (4–100 comments a request) until this number is reached or the thread ends. Measured: 1,500 comments of a 3,503-comment thread, score, depth and parent filled on every row.",
            "default": 500
          },
          "maxComments": {
            "title": "Maximum comments in total",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "The run stops when this many comment rows have been delivered. You are charged only for delivered rows.",
            "default": 100000
          },
          "commentSort": {
            "title": "Thread order",
            "enum": [
              "confidence",
              "top",
              "new",
              "controversial",
              "old",
              "qa"
            ],
            "type": "string",
            "description": "The order Reddit arranges the thread in: best (Reddit's default), top (highest score), new, controversial, old, Q&A.",
            "default": "confidence"
          },
          "includePost": {
            "title": "Deliver the post itself too",
            "type": "boolean",
            "description": "On (default): the post's own row (type \"post\": title, text, score, upvote ratio, comment count, media, …) comes first, charged as a post. Off: comments only.",
            "default": true
          },
          "minCommentScore": {
            "title": "Minimum comment score (optional)",
            "minimum": -1000000,
            "maximum": 10000000,
            "type": "integer",
            "description": "Deliver only comments whose score is at least this (negative numbers allowed). Every comment carries a score, so this applies to the whole thread. Leave empty for every comment."
          },
          "maxDepth": {
            "title": "Maximum depth (optional)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Deliver only comments up to this depth: 0 = top-level comments only, 1 = their direct replies too, and so on. The walk stops there as well, so the budget is not spent on replies you filter out. Leave empty for the whole tree (Reddit's own tree folds at ten levels)."
          },
          "includeAuthorInfo": {
            "title": "Add each author's karma and account age",
            "type": "boolean",
            "description": "One request per 100 authors adds each comment's author record (link and comment karma, account creation date, avatar) as authorInfo. A deleted author gets null.",
            "default": false
          },
          "hideAuthors": {
            "title": "Replace author names with codes",
            "type": "boolean",
            "description": "Off (default): rows carry Reddit's public user names. On: each author is replaced by a stable 16-character code (the same author gets the same code in every run of your account), so you can count and link comments by author without storing names.",
            "default": false
          },
          "onlyNewComments": {
            "title": "Only comments not delivered before",
            "type": "boolean",
            "description": "Remember delivered comments under the list name below and skip them in later runs. Schedule the same posts and each run brings only the comments it has not delivered before — a thread watcher.",
            "default": false
          },
          "listName": {
            "title": "List name",
            "pattern": "^[A-Za-z0-9]([A-Za-z0-9-]{0,38}[A-Za-z0-9])?$",
            "type": "string",
            "description": "Name of the memory used by \"Only comments not delivered before\" (looked at only when that is on). Letters, digits and hyphens (a hyphen not first or last), up to 40 characters; capitals are read as lower case.",
            "default": "default"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Nothing to change for normal use: the Actor reads Reddit through Apify Proxy residential addresses, the only kind Reddit hands its guest token to (measured: residential 7 of 7 sessions, datacenter 0 of 8). Set a proxy here to send every request through it instead; a setting the platform refuses ends the run before anything is read."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}