{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Comments Scraper",
    "description": "Export every comment of Reddit posts, nested replies included, as flat rows with depth, parent id, score and author. Paste post URLs or pick subreddits. Keyword and score filters, buying-intent tags, monitor mode for new comments. No proxy or API key. Pay only for results.",
    "version": "1.0",
    "x-build-id": "rhGRNXOnNhngevAdu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/axlymxp~reddit-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-axlymxp-reddit-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/axlymxp~reddit-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-axlymxp-reddit-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/axlymxp~reddit-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-axlymxp-reddit-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",
        "properties": {
          "postUrls": {
            "title": "Post URLs",
            "type": "array",
            "description": "Reddit post links (https://www.reddit.com/r/<sub>/comments/<id>/...), short links (redd.it/<id>) or bare post ids. Every comment of each post is returned, replies included.",
            "items": {
              "type": "string"
            }
          },
          "subreddits": {
            "title": "Subreddits (optional)",
            "type": "array",
            "description": "Instead of (or besides) post URLs: scrape the comment threads of the top or newest posts of these subreddits, e.g. 'webscraping' or 'r/SaaS'.",
            "items": {
              "type": "string"
            }
          },
          "listingSort": {
            "title": "Which subreddit posts",
            "enum": [
              "top",
              "hot",
              "new",
              "rising",
              "controversial"
            ],
            "type": "string",
            "description": "Only used with 'Subreddits'.",
            "default": "top"
          },
          "timeFilter": {
            "title": "Time filter",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Time window for 'Top' and 'Controversial' subreddit posts.",
            "default": "week"
          },
          "maxPostsPerSubreddit": {
            "title": "Max posts per subreddit",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many posts per subreddit to read comments from.",
            "default": 10
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Upper limit per post. 'Load more' links and collapsed replies are expanded until this many comments are collected or the thread is exhausted.",
            "default": 500
          },
          "commentSort": {
            "title": "Comment sort",
            "enum": [
              "confidence",
              "top",
              "new",
              "controversial",
              "old",
              "qa"
            ],
            "type": "string",
            "description": "Which comments come first when a post has more than the cap.",
            "default": "confidence"
          },
          "minCommentScore": {
            "title": "Minimum comment score",
            "type": "integer",
            "description": "Skip comments with fewer upvotes than this (skipped comments are not charged). Leave empty to keep all."
          },
          "commentKeywords": {
            "title": "Only comments containing",
            "type": "array",
            "description": "Keep only comments whose text contains at least one of these words or phrases (case-insensitive). Leave empty to keep all.",
            "items": {
              "type": "string"
            }
          },
          "includePostRows": {
            "title": "Include a row for each post",
            "type": "boolean",
            "description": "Adds one 'post' row (title, text, score, comment count) per thread before its comments.",
            "default": true
          },
          "intentKeywords": {
            "title": "Intent keywords",
            "type": "array",
            "description": "Phrases that mark a buyer, seeker or complaint. Every post and comment gets an `intent_matches` list of the phrases it contains (case-insensitive, whole words). Clear the list to disable.",
            "default": [
              "looking for",
              "recommend",
              "recommendation",
              "alternative to",
              "alternatives to",
              "best tool",
              "best way to",
              "any suggestions",
              "suggestions?",
              "how do i",
              "how do you",
              "what do you use",
              "is there a",
              "is there any",
              "worth it",
              "pricing",
              "too expensive",
              "switch from",
              "switching from",
              "need help",
              "anyone know",
              "does anyone",
              "hire",
              "hiring",
              "freelancer",
              "for hire",
              "frustrated",
              "hate that",
              "wish there was"
            ],
            "items": {
              "type": "string"
            }
          },
          "enrichAuthors": {
            "title": "Enrich authors",
            "type": "boolean",
            "description": "Add `author_karma`, `author_created_at` and `author_is_verified` to every post and comment (one extra API call per distinct author, up to 300 per run). Useful for ranking leads by account age and activity.",
            "default": false
          },
          "onlyNewSinceLastRun": {
            "title": "Only new since last run (monitor mode)",
            "type": "boolean",
            "description": "Monitor mode: skip comments that an earlier run with the same input already returned, so a scheduled run only delivers new comments.",
            "default": false
          },
          "postedAfter": {
            "title": "Posted after",
            "type": "string",
            "description": "Subreddit mode: only posts created on or after this date (YYYY-MM-DD)."
          },
          "postedBefore": {
            "title": "Posted before",
            "type": "string",
            "description": "Subreddit mode: only posts created on or before this date (YYYY-MM-DD)."
          },
          "includeNsfw": {
            "title": "Include NSFW",
            "type": "boolean",
            "description": "Keep posts marked over-18.",
            "default": false
          },
          "maxItems": {
            "title": "Max rows in total",
            "minimum": 1,
            "maximum": 200000,
            "type": "integer",
            "description": "Stops the run after this many rows (posts + comments).",
            "default": 1000
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Without a proxy the actor runs at Reddit's limit of about 500 API calls per 10 minutes per IP and waits when it is reached. Enable Apify Proxy for runs over many large threads: the actor switches to a fresh IP instead of waiting."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}