{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper",
    "description": "[💰 $1.99 / 1K posts · $0.99 / 1K comments] Scrape Reddit posts and full comment threads by subreddit, keyword, user or link: score, upvote ratio, flair, media, every reply with depth and parent. 100 posts in 4 s. Newest first, filters, monitor. No account, no proxy. Export JSON, CSV or Excel.",
    "version": "0.0",
    "x-build-id": "7a5EuhaePbYdvUHFB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sleepmodesystems~reddit-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sleepmodesystems-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/sleepmodesystems~reddit-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sleepmodesystems-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/sleepmodesystems~reddit-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sleepmodesystems-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",
        "properties": {
          "subreddits": {
            "title": "Subreddits",
            "type": "array",
            "description": "Subreddit names or links, one per line: <code>AskReddit</code>, <code>r/golang</code>, <code>https://www.reddit.com/r/technology/</code>. Each gives its posts in the order below.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searches": {
            "title": "Search words",
            "type": "array",
            "description": "Words to search Reddit for, one search per line: <code>notion alternative</code>, <code>\"machine learning\" jobs</code>, <code>東京 ラーメン</code>. Each gives the matching posts.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchInSubreddit": {
            "title": "Search inside one subreddit",
            "type": "string",
            "description": "Optional: search only this subreddit, for example <code>golang</code>. Leave empty to search all of Reddit.",
            "default": ""
          },
          "users": {
            "title": "Users",
            "type": "array",
            "description": "Usernames or profile links, one per line: <code>spez</code>, <code>u/GallowBoob</code>, <code>https://www.reddit.com/user/spez/</code>. Each gives the posts that user submitted.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Reddit links",
            "type": "array",
            "description": "Any Reddit links, one per line, read as what they point to: a post (<code>https://www.reddit.com/r/golang/comments/1xxnlpb/</code>, <code>https://redd.it/1xxnlpb</code>, a share link from the app) gives that post and its comments; a subreddit, user or search link gives its posts.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "sort": {
            "title": "Order",
            "enum": [
              "hot",
              "new",
              "top",
              "rising",
              "controversial",
              "relevance",
              "comments"
            ],
            "type": "string",
            "description": "<b>Hot</b> is Reddit's front page order, <b>New</b> the newest first, <b>Top</b> the highest score in the time range. Searches use <b>Relevance</b>, <b>New</b>, <b>Top</b> or <b>Most comments</b>; Hot, Rising and Controversial read as Relevance for a search.",
            "default": "hot"
          },
          "time": {
            "title": "Time range",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "For <b>Top</b>, <b>Controversial</b> and <b>Most comments</b>: rank within this window.",
            "default": "all"
          },
          "maxPostsPerSource": {
            "title": "Posts per subreddit, search or user",
            "minimum": 1,
            "type": "integer",
            "description": "How many posts each subreddit, search and user gives. Empty: as many as Reddit lists (about 1,000 for hot and new, 500 for top). 100 posts from a subreddit take about 4 seconds."
          },
          "postedAfter": {
            "title": "Only posts newer than",
            "type": "string",
            "description": "A date like <code>2026-11-10</code>, or how long ago: <code>24 hours</code>, <code>7 days</code>, <code>2 months</code>. With <b>New</b>, the read stops at the first older post, so a daily run reads only what is new."
          },
          "includeComments": {
            "title": "Comments",
            "type": "boolean",
            "description": "Add each post's comments to the dataset, right after the post: a 1,800-comment thread comes back complete in about 40 seconds.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Comments per post",
            "minimum": 1,
            "type": "integer",
            "description": "Stop each thread after this many comments, best first. Empty: every comment."
          },
          "maxCommentDepth": {
            "title": "Reply depth",
            "minimum": 0,
            "type": "integer",
            "description": "Keep comments down to this level of replies: <code>0</code> top-level comments only, <code>1</code> with their direct replies. Empty: the whole tree."
          },
          "commentedAfter": {
            "title": "Only comments newer than",
            "type": "string",
            "description": "A date like <code>2026-11-10</code>, or how long ago like <code>7 days</code>."
          },
          "minScore": {
            "title": "Minimum score",
            "minimum": 0,
            "type": "integer",
            "description": "Only posts with at least this score (upvotes minus downvotes), for example <code>100</code>."
          },
          "minComments": {
            "title": "Minimum comments",
            "minimum": 0,
            "type": "integer",
            "description": "Only posts with at least this many comments, for example <code>20</code>."
          },
          "filterKeywords": {
            "title": "Must contain",
            "type": "array",
            "description": "Only posts whose title or text contains one of these words (or all of them, below): <code>pricing</code>, <code>alternative</code>.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "filterKeywordMode": {
            "title": "Words to match",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "Keep a post when it contains any of the words, or only when it contains all of them.",
            "default": "any"
          },
          "flairFilter": {
            "title": "Flair",
            "type": "array",
            "description": "Only posts with one of these flairs, any case: <code>Discussion</code>, <code>Help</code>.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeNsfw": {
            "title": "Include NSFW (18+)",
            "type": "boolean",
            "description": "Include posts marked 18+. Turn off to leave them out.",
            "default": true
          },
          "onlyNew": {
            "title": "Only new since the last run",
            "type": "boolean",
            "description": "Return only posts and comments an earlier run of this monitor did not deliver; the rest are not charged. Each run watches the same window (the first posts of each subreddit or search).",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "A name for this monitor, for example <code>brand-acme</code>, so several monitors of the same input stay apart. Empty: the input itself is the name.",
            "default": ""
          },
          "postedBefore": {
            "title": "Only posts older than",
            "type": "string",
            "description": "A date like <code>2026-11-10</code>, or how long ago like <code>30 days</code>."
          },
          "commentedBefore": {
            "title": "Only comments older than",
            "type": "string",
            "description": "A date like <code>2026-11-10</code>, or how long ago like <code>30 days</code>."
          },
          "authorFilter": {
            "title": "Authors",
            "type": "array",
            "description": "Only posts by these usernames: <code>spez</code>.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "domainFilter": {
            "title": "Link domains",
            "type": "array",
            "description": "Only link posts to these sites: <code>youtube.com</code>, <code>github.com</code>.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "deduplicate": {
            "title": "Each post once",
            "type": "boolean",
            "description": "When subreddits, searches and users overlap, give a post that appeared earlier in the run only once.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum rows",
            "minimum": 1,
            "type": "integer",
            "description": "Stop the whole run after this many rows, posts and comments together. Empty: no limit beyond the ones above."
          },
          "minItems": {
            "title": "Minimum rows",
            "minimum": 0,
            "type": "integer",
            "description": "Fail the run when fewer rows come back (for monitoring). <code>0</code>: never fail for a small result.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}