{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit User & Subreddit Scraper: Posts, Comments, Profiles",
    "description": "Enter Reddit usernames or subreddits and get each user's posts and comment history, plus subreddit info, rules, newest posts and comments. Free profile rows with archived stats (can be over a year old; see statsUpdatedAt). No login. Not affiliated with Reddit.",
    "version": "0.0",
    "x-build-id": "pMOFPTVINI7YsWdm0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kizukidata~reddit-user-subreddit-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kizukidata-reddit-user-subreddit-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/kizukidata~reddit-user-subreddit-scraper/runs": {
      "post": {
        "operationId": "runs-sync-kizukidata-reddit-user-subreddit-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/kizukidata~reddit-user-subreddit-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-kizukidata-reddit-user-subreddit-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": {
          "usernames": {
            "title": "Usernames",
            "type": "array",
            "description": "Reddit usernames (spez, u/spez) or profile URLs, up to 50. Empty input with no subreddits reads u/spez and r/webscraping as a sample.",
            "items": {
              "type": "string"
            }
          },
          "subreddits": {
            "title": "Subreddits",
            "type": "array",
            "description": "Subreddit names (webscraping, r/python) or URLs, up to 50.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Profile or subreddit URLs",
            "type": "array",
            "description": "Mixed Reddit profile and subreddit URLs, routed by type (up to 100). Post links are skipped: use Reddit Scraper for single posts.",
            "items": {
              "type": "string"
            }
          },
          "includeProfile": {
            "title": "Include user profile row",
            "type": "boolean",
            "description": "One free row per user: archived post and comment counts and score sums (close to karma; as of statsUpdatedAt, which can be more than a year old), first and last activity, and the 10 subreddits the user is most active in.",
            "default": true
          },
          "maxPostsPerSource": {
            "title": "Posts per user or subreddit",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Newest posts returned for each user (posts they submitted) and each subreddit. 0 skips posts.",
            "default": 5
          },
          "maxCommentsPerUser": {
            "title": "Comments per user",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Newest comments each user wrote, with the post they replied on. 0 skips the comment history.",
            "default": 5
          },
          "includeSubredditInfo": {
            "title": "Include subreddit info row",
            "type": "boolean",
            "description": "One row per subreddit: title, description, subscribers, active users, NSFW flag and community rules.",
            "default": true
          },
          "maxCommentsPerSubreddit": {
            "title": "Comments per subreddit",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Newest comments posted anywhere in each subreddit. 0 (default) skips them.",
            "default": 0
          },
          "queries": {
            "title": "Keywords (filter)",
            "type": "array",
            "description": "Keep only posts and comments that contain one of these phrases (2-120 characters, up to 10; supports \"exact phrase\", OR, -exclude). Filters inside the users and subreddits above; it is not a Reddit-wide search.",
            "items": {
              "type": "string"
            }
          },
          "sort": {
            "title": "Post order",
            "enum": [
              "new",
              "top",
              "comments"
            ],
            "type": "string",
            "description": "Order of the posts read for each user or subreddit: new (default), top (score) or comments (comment count). Posts are the newest ones first, then re-ordered; not an all-time top list.",
            "default": "new"
          },
          "after": {
            "title": "Posted after",
            "type": "string",
            "description": "Oldest post or comment time: ISO date (2026-11-01), epoch seconds, or relative (24h, 7d, 30d). Empty means no limit.",
            "default": ""
          },
          "before": {
            "title": "Posted before",
            "type": "string",
            "description": "Newest post or comment time: ISO date, epoch seconds, or relative (7d). Empty means now.",
            "default": ""
          },
          "includeNsfw": {
            "title": "Include NSFW",
            "type": "boolean",
            "description": "Include posts and comments marked NSFW. Off by default.",
            "default": false
          },
          "includeRemoved": {
            "title": "Include removed posts and comments",
            "type": "boolean",
            "description": "Also return posts and comments that were removed or deleted (a removed post's removedBy says who). Off by default, so you get and pay only for what people can still see.",
            "default": false
          },
          "onlyNewItems": {
            "title": "Only new posts and comments",
            "type": "boolean",
            "description": "For schedules: skip posts and comments returned by earlier runs with the same users, subreddits and filters (90-day memory). Profile and subreddit rows are returned on every run.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum charged rows",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Max rows charged per run, across all users and subreddits (1-5000, default 20). Rows with an error are free and do not count.",
            "default": 20
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. Default uses no proxy. Residential proxies are not available.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}