{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper: Deleted & Removed, Mods, Hidden Profiles",
    "description": "Reddit posts and comments, including deleted and removed ones: who removed them, the original text when it was archived in time, and the moderators' public removal notice when there is one. Full moderator list, subreddit rules and settings, hidden profiles. No login. $0.002 per item.",
    "version": "1.0",
    "x-build-id": "UXKnwnOc5mkaQVXpt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pomlabs~reddit-posts-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pomlabs-reddit-posts-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/pomlabs~reddit-posts-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-pomlabs-reddit-posts-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/pomlabs~reddit-posts-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-pomlabs-reddit-posts-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": {
          "startUrls": {
            "title": "Reddit URLs",
            "type": "array",
            "description": "Subreddit URLs (or r/name), post URLs and user profile URLs. Mix freely. Leave empty to only search.",
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Search Reddit (keywords)",
            "type": "string",
            "description": "Optional. Searches all of Reddit by relevance (up to 25 posts per search) and returns matching posts (and their comments if enabled)."
          },
          "keyword": {
            "title": "Keyword inside subreddits",
            "type": "string",
            "description": "Optional. Only posts of the subreddits above whose title or text contains these words (last 12 months unless you set a start date)."
          },
          "sort": {
            "title": "Order",
            "enum": [
              "newest",
              "oldest"
            ],
            "type": "string",
            "description": "Order of posts read from subreddits and users (by post date).",
            "default": "newest"
          },
          "dateFrom": {
            "title": "From date",
            "type": "string",
            "description": "Optional. Only posts and comments created on or after this date (YYYY-MM-DD). Reddit history goes back to 2005."
          },
          "dateTo": {
            "title": "To date",
            "type": "string",
            "description": "Optional. Only posts and comments created before this date (YYYY-MM-DD)."
          },
          "maxItems": {
            "title": "Maximum items",
            "minimum": 1,
            "type": "integer",
            "description": "Total posts + comments to return across all sources. You are charged per item delivered.",
            "default": 100
          },
          "maxPostsPerSource": {
            "title": "Maximum posts per source",
            "minimum": 1,
            "type": "integer",
            "description": "Posts per subreddit, user or search.",
            "default": 100
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Also return the comments of each post as separate items (with depth and parent).",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Maximum comments per post",
            "minimum": 1,
            "type": "integer",
            "description": "Optional cap on comments (top-level + replies) per post."
          },
          "maxCommentDepth": {
            "title": "Maximum comment depth",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. 0 = only top-level comments, 1 = plus direct replies, and so on."
          },
          "removedFilter": {
            "title": "Removed / deleted filter",
            "enum": [
              "all",
              "removed",
              "deletedByAuthor",
              "removedByModerator",
              "removedByReddit",
              "notRemoved"
            ],
            "type": "string",
            "description": "Every post and comment says whether it was removed, by whom, and if the original text and author were kept. Use this to return only one kind. Removed items are rare, so with a filter the scraper looks through up to 100x 'Maximum posts per source' newest items (max 10,000) to find them.",
            "default": "all"
          },
          "includeRemovalNotice": {
            "title": "Removal notice (the moderators' reason)",
            "type": "boolean",
            "description": "When a moderator replied to a removed post or comment with the reason (the `<subreddit>-ModTeam` message, AutoModerator or a moderator's own reply), the item carries it in `removalNoticeText`, `removalNoticeBy` and `removalNoticeAt`. No extra charge. Turn off to skip the lookup.",
            "default": true
          },
          "includeEditedText": {
            "title": "Edited comments and posts: text before and after",
            "type": "boolean",
            "description": "Every item already says if it was edited (isEdited, editedAt). When the edit happened after the archive captured the item (editedAfterCapture), the text you get is the one from BEFORE the edit. Turn this on to also get the current text on Reddit (textAfterEdit), so you see what changed. Up to 200 edited items per run.",
            "default": false
          },
          "latestComments": {
            "title": "Newest comments of the subreddit / user",
            "type": "boolean",
            "description": "Also return the newest comments of each subreddit (across all its posts) and of each user, newest first, as separate items. For users this includes comments on hidden profiles and comments that were later deleted.",
            "default": false
          },
          "includeSubredditReport": {
            "title": "Subreddit report (rules, settings, moderators, bots, rankings, removal rates and reasons)",
            "type": "boolean",
            "description": "One extra item per subreddit: rules, settings (restricted posting, allowed post types, NSFW, quarantine, flair), post requirements (banned domains, title rules), the full moderator list, bots, wiki pages, top commenters and top posters, the share of posts and comments removed, split by who removed them, how many removals came with a moderator notice, the most used notices, and how many cite low karma or a new account. $0.02 per report.",
            "default": false
          },
          "includeModerators": {
            "title": "Full moderator list only",
            "type": "boolean",
            "description": "One extra item per subreddit (`submissionType`: `subreddit_moderators`) with Reddit's full moderator list: username, moderator since, permissions and flair. Reddit shows this list only to logged-in users; you do not need an account. Charged as one item ($0.002). Already included in the subreddit report.",
            "default": false
          },
          "includeUserReport": {
            "title": "User report (totals, subreddits, removal rates)",
            "type": "boolean",
            "description": "One extra item per user: karma and totals in the archive, first and last activity, the subreddits the user posted or commented in (with counts), and how many of their posts and comments were removed and by whom. Works for hidden profiles. $0.02 per report.",
            "default": false
          },
          "reportDays": {
            "title": "Report window (days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Window for the top commenters and top posters of the subreddit report. On very large subreddits the window is shortened automatically and the report says which window was used.",
            "default": 30
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}