{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper: Posts, Comments & Subreddits (No login)",
    "description": "Scrape Reddit posts and comments from subreddits, search, post URLs and user profiles. No login, no API key. Real score and comment count, clean text, date and keyword filters, parent IDs for comment threads. Free not-found and error rows.",
    "version": "0.1",
    "x-build-id": "rNLeNoABEqenhGm3e"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cliqtomedia~reddit-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cliqtomedia-reddit-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/cliqtomedia~reddit-scraper/runs": {
      "post": {
        "operationId": "runs-sync-cliqtomedia-reddit-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/cliqtomedia~reddit-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-cliqtomedia-reddit-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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "subreddit",
              "search",
              "post",
              "user"
            ],
            "type": "string",
            "description": "subreddit: posts from each subreddit in Subreddits. search: posts for each query in Search queries. post: one row per post URL, plus its comments. user: posts submitted by each user in Usernames.",
            "default": "subreddit"
          },
          "subreddits": {
            "title": "Subreddits",
            "maxItems": 50,
            "type": "array",
            "description": "Subreddit mode: up to 50 subreddit names (apify, r/apify) or URLs (https://www.reddit.com/r/apify/). Private, banned or quarantined subreddits are not read.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search queries",
            "maxItems": 50,
            "type": "array",
            "description": "Search mode: up to 50 keywords or phrases, searched across all public subreddits (for example: web scraping).",
            "items": {
              "type": "string"
            }
          },
          "postUrls": {
            "title": "Post URLs",
            "maxItems": 50,
            "type": "array",
            "description": "Post mode: up to 50 Reddit post URLs (https://www.reddit.com/r/apify/comments/1x64f49/...) or post IDs (1x64f49). Share links (/s/...) are not supported; open them and copy the full URL.",
            "items": {
              "type": "string"
            }
          },
          "usernames": {
            "title": "Usernames",
            "maxItems": 50,
            "type": "array",
            "description": "User mode: up to 50 Reddit usernames (spez, u/spez) or profile URLs. Only posts are collected, not the user's comments.",
            "items": {
              "type": "string"
            }
          },
          "maxPosts": {
            "title": "Max posts per target",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Max posts for each subreddit, search query or user. Reddit itself may show fewer (for example, top posts of a quiet week). Ignored in post mode.",
            "default": 10
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "0 = posts only. Otherwise up to this many comments (with replies) for each post. In post mode, set it above 0 to get the comments. Each comment is one row and one paid result.",
            "default": 0
          },
          "sort": {
            "title": "Post sort",
            "enum": [
              "new",
              "hot",
              "top",
              "rising",
              "relevance",
              "comments"
            ],
            "type": "string",
            "description": "Order of posts. Subreddits: new, hot, top, rising. Search: relevance, new, top, comments. Users: new, hot, top. Another choice falls back to the nearest one (shown in the run summary).",
            "default": "new"
          },
          "timeFilter": {
            "title": "Time range (top and search)",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Time range for Top sort and for search. Other sorts ignore it.",
            "default": "all"
          },
          "commentSort": {
            "title": "Comment sort",
            "enum": [
              "top",
              "new",
              "best",
              "controversial",
              "old"
            ],
            "type": "string",
            "description": "Order of comments when Max comments per post is above 0.",
            "default": "top"
          },
          "postedAfter": {
            "title": "Posted on or after",
            "type": "string",
            "description": "Optional. Keep only posts created on or after this date (YYYY-MM-DD, UTC). With sort New the listing stops at the first older page. Ignored in post mode. Dropped posts are free."
          },
          "postedBefore": {
            "title": "Posted before",
            "type": "string",
            "description": "Optional. Keep only posts created before this date (YYYY-MM-DD, UTC; the date itself is excluded). Ignored in post mode."
          },
          "keywords": {
            "title": "Keywords in title or text",
            "maxItems": 20,
            "type": "array",
            "description": "Optional. Keep only posts whose title or text contains at least one of these words (case-insensitive). In search mode only the title is checked. Ignored in post mode. A run drops at most 250 posts for free (plus 10 per saved post); then it stops reading listings.",
            "items": {
              "type": "string"
            }
          },
          "proxy": {
            "title": "Proxy",
            "type": "object",
            "description": "Reddit blocks datacenter IPs, so residential Apify Proxy (US) is the default. Change only if you have your own residential proxies.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}