{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper: Posts, Comments & Search",
    "description": "Scrape public Reddit posts, comments and search results with no login or API key. Paste subreddits, URLs, post IDs or old RSS links. Pay only for what is saved: $1.50 per 1,000 posts, $0.50 per 1,000 comments, no start fee. Exact limits. Schedules return only new posts.",
    "version": "0.1",
    "x-build-id": "8rDy6hfhsuSa0QHoC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kumo-data~reddit-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kumo-data-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/kumo-data~reddit-scraper/runs": {
      "post": {
        "operationId": "runs-sync-kumo-data-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/kumo-data~reddit-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-kumo-data-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": {
          "targets": {
            "title": "Targets",
            "uniqueItems": true,
            "type": "array",
            "description": "Subreddits, posts or search pages, one per line. Any form works: `python`, `r/python`, `https://www.reddit.com/r/python/top/?t=week`, an RSS URL `https://www.reddit.com/r/python/new/.rss`, a post URL, `https://redd.it/1xm7oif`, a bare post ID `1xm7oif`, a search URL. Sort and time window inside a URL win over the fields below for that target. Private and quarantined communities and user profiles are not available without login; such targets are reported in the Problems view, never charged. Posts marked 18+ are never collected.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search queries",
            "uniqueItems": true,
            "type": "array",
            "description": "Each query is a separate search. Reddit search operators pass through: `\"exact phrase\"`, `OR`, `NOT`, `title:`, `selftext:`, `author:`, `flair:`, `self:yes`, `subreddit:`.",
            "items": {
              "type": "string"
            }
          },
          "searchIn": {
            "title": "Search only in these subreddits",
            "uniqueItems": true,
            "type": "array",
            "description": "Restrict every search query to these communities (`python`, `r/python` or a URL). Each query runs in each community. Empty: search all of Reddit.",
            "items": {
              "type": "string"
            }
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "new",
              "hot",
              "top",
              "rising",
              "controversial",
              "relevance",
              "comments"
            ],
            "type": "string",
            "description": "Reading order for feeds and searches. A sort that does not apply to a target falls back to `new`; the fallback is reported in `inputWarnings`.",
            "default": "new"
          },
          "timeWindow": {
            "title": "Time window",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Reddit's own time filter. Applies to `top`, `controversial` and searches only. For an exact range use the date fields below.",
            "default": "all"
          },
          "postedAfter": {
            "title": "Posted after",
            "pattern": "^\\s*(\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}(:\\d{2})?(Z|[+-]\\d{2}:\\d{2})?)?|\\d+\\s*(m|h|d|w|minutes?|hours?|days?|weeks?|months?))\\s*$",
            "type": "string",
            "description": "Keep posts created at or after this moment. A date `2026-10-01`, a date-time `2026-10-01T12:00:00Z`, or a relative value counted from the run start: `30 minutes`, `6 hours`, `1 day`, `2 weeks`, `3 months` (short forms `30m`, `6h`, `1d`, `2w`). With sort `new` the Actor stops reading at the first older post, so you pay only for posts in the window."
          },
          "postedBefore": {
            "title": "Posted before",
            "pattern": "^\\s*(\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}(:\\d{2})?(Z|[+-]\\d{2}:\\d{2})?)?|\\d+\\s*(m|h|d|w|minutes?|hours?|days?|weeks?|months?))\\s*$",
            "type": "string",
            "description": "Keep posts created before this moment (exclusive). Same formats as Posted after."
          },
          "newSinceLastRun": {
            "title": "Only new since the last run",
            "type": "boolean",
            "description": "Return only posts that earlier runs with the same targets have not returned. Made for schedules and 'new item' triggers: no duplicates, no gaps, no date math. State is kept in the key-value store `reddit-scraper-state` in your account. The first run behaves normally.",
            "default": false
          },
          "maxPostsPerTarget": {
            "title": "Max posts per target",
            "minimum": 0,
            "type": "integer",
            "description": "Posts to take from each subreddit feed or search. `0` reads to the end of what Reddit serves. Not used for post URLs.",
            "default": 100
          },
          "maxTotalPosts": {
            "title": "Max posts per run",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on posts across all targets. Exact: the Actor never saves or charges a post beyond it. `0` means no cap. The platform's 'Maximum charge per run' also stops the run cleanly.",
            "default": 0
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Collect comments for every post. Opens each post page, so the post text becomes complete too.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 0,
            "type": "integer",
            "description": "Comments to take from each post, in the order a reader sees them with the chosen sort. `0` means all comments.",
            "default": 50
          },
          "commentSort": {
            "title": "Comment sort",
            "enum": [
              "best",
              "top",
              "new",
              "controversial",
              "old",
              "qa"
            ],
            "type": "string",
            "description": "Reddit's comment ordering. It decides which comments come first when a limit cuts the thread.",
            "default": "best"
          },
          "maxCommentDepth": {
            "title": "Max comment depth",
            "minimum": 0,
            "type": "integer",
            "description": "`0` keeps only top-level comments: the fastest and cheapest mode. `1` adds direct replies, and so on. Empty: no limit. Matches the `depth` field of comment items."
          },
          "includeStickied": {
            "title": "Include stickied posts",
            "type": "boolean",
            "description": "Keep moderator-pinned posts in feeds. Off by default: pinned announcements are often years old and pollute 'newest posts'. Dropped posts are not charged.",
            "default": false
          },
          "filterKeywords": {
            "title": "Keep only posts containing",
            "uniqueItems": true,
            "type": "array",
            "description": "Words or phrases that must appear in the title, text or flair (case-insensitive). Use it when Reddit search returns loosely related posts. Dropped posts are not charged.",
            "items": {
              "type": "string"
            }
          },
          "filterKeywordMode": {
            "title": "Keyword match",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "`any`: one keyword is enough. `all`: every keyword must appear.",
            "default": "any"
          },
          "fullText": {
            "title": "Full post text",
            "type": "boolean",
            "description": "Open every post page to get the complete text and page-only fields (edit time, gallery media). Slower. Implied by Include comments. Off: text comes from the feed and `bodyIsPreview` is true.",
            "default": false
          },
          "outputFormat": {
            "title": "Field names",
            "enum": [
              "default",
              "trudax",
              "rss"
            ],
            "type": "string",
            "description": "Shape of post and comment items. `trudax`: drop-in for workflows built on trudax/reddit-scraper-lite. `rss`: the items n8n's RSS Read node made of Reddit RSS feeds, which Reddit shuts down on 2026-11-13 (same keys and dates; text equivalent). Target items and the SUMMARY record always use the default shape.",
            "default": "default"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}