{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Search Scraper — Posts by Keyword, Score & Date",
    "description": "Search Reddit by keyword — site-wide or inside chosen subreddits — and get posts with real score, upvote ratio, comment count, author, flair, selftext and timestamps from Reddit's own JSON. Sort by relevance, new or top; date window; strict keyword match; optional top comments. No login, no API key.",
    "version": "0.1",
    "x-build-id": "6wWFTnLEaVdmgIiqb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapersdelight~reddit-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapersdelight-reddit-search-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/scrapersdelight~reddit-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapersdelight-reddit-search-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/scrapersdelight~reddit-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapersdelight-reddit-search-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": {
          "queries": {
            "title": "Search queries",
            "type": "array",
            "description": "One keyword phrase per line, exactly as you would type it into Reddit's search box. Reddit's own search operators work: quotes for an exact phrase (\"price increase\"), OR between alternatives (refund OR chargeback), a minus to exclude (-meme), and field prefixes such as title:, author:, subreddit:, flair:, self:yes. Each query is searched separately; results are de-duplicated across all of them, so a post matching two queries is returned and billed once. Leave empty to run the documented sample (\"web scraping\").",
            "default": [
              "web scraping"
            ],
            "items": {
              "type": "string"
            }
          },
          "subreddits": {
            "title": "Restrict to subreddits (optional)",
            "type": "array",
            "description": "Leave empty to search all of Reddit. Add subreddit names (programming, r/webscraping, or a full https://www.reddit.com/r/… URL) to run every query INSIDE each listed subreddit instead — 2 queries × 3 subreddits = 6 searches. Reddit caps one search listing at roughly 250 results, so fanning out across subreddits is how you get past that ceiling for a broad keyword.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "sort": {
            "title": "Sort results by",
            "enum": [
              "relevance",
              "new",
              "top",
              "hot",
              "comments"
            ],
            "type": "string",
            "description": "Reddit's own search orderings. Relevance is Reddit's ranking for the keyword; Top is by score inside the time range; New is newest first (combine with a date window to monitor a keyword); Comments is the most-discussed first.",
            "default": "relevance"
          },
          "time": {
            "title": "Time range",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Reddit's server-side time filter — the posts Reddit itself returns for the search. For a precise window on top of this, use the date fields below.",
            "default": "all"
          },
          "dateFrom": {
            "title": "Posted on or after (optional)",
            "type": "string",
            "description": "YYYY-MM-DD (UTC), e.g. 2026-01-01, or a full ISO-8601 timestamp. Only posts created on or after this moment are kept. Reddit's search has no exact-date operator of its own, so this is applied to the created_utc of every result; pair it with sort = New and the Actor stops paging as soon as a whole page is older than this date.",
            "default": ""
          },
          "dateTo": {
            "title": "Posted on or before (optional)",
            "type": "string",
            "description": "YYYY-MM-DD (UTC) or ISO-8601. A bare date means the end of that day (23:59:59 UTC). Only posts created on or before this moment are kept.",
            "default": ""
          },
          "strictSearch": {
            "title": "Strict keyword match",
            "type": "boolean",
            "description": "Reddit's search is fuzzy — it returns posts that mention none of your words. Turn this on to keep only posts whose title + selftext contain EVERY word of the query (case-insensitive; quotes and common stop-words are ignored). Expect fewer rows — often half — but all of them on-topic.",
            "default": false
          },
          "includeNsfw": {
            "title": "Include NSFW (over-18) posts",
            "type": "boolean",
            "description": "Uncheck to ask Reddit to exclude over-18 results and to drop any that slip through.",
            "default": true
          },
          "includeTopComments": {
            "title": "Also fetch the top comments of each post",
            "type": "boolean",
            "description": "Reads each post's comment thread (sorted by Top) and nests up to the number below into topComments[] — id, author, body, score, created time, depth, permalink. Adds one Reddit request per post, so a 100-post run takes roughly twice as long.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Cap on comments nested into each post (top-level comments and their direct replies, in Top order). Only used when the checkbox above is on. 1–100.",
            "default": 10
          },
          "maxItems": {
            "title": "Max posts (total)",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many unique posts across all searches. Your hard cost cap: 100 = $0.20, 1,000 = $2.00. Duplicates and filtered-out posts never count. 0 = no limit (bounded only by Reddit's ~250-per-search ceiling, your query × subreddit fan-out, and the run timeout).",
            "default": 100
          },
          "maxItemsPerQuery": {
            "title": "Max posts per search",
            "minimum": 0,
            "type": "integer",
            "description": "Cap for each query × subreddit search, so one broad query cannot eat the whole budget before the others run. Reddit itself stops paging a single search at roughly 250 results. 0 = no per-search limit.",
            "default": 100
          },
          "allowRssFallback": {
            "title": "Allow the RSS fallback rung",
            "type": "boolean",
            "description": "If the browser session cannot be opened at all (proxy outage, Reddit interstitial not clearing), fall back to Reddit's Atom search feed for that search. Those rows are marked transport: \"rss\" and carry title, author, subreddit, selftext, permalink and created time — but NO score, upvote ratio or comment count (null, never a fake 0). Uncheck if you would rather get zero rows than rows without scores.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "RESIDENTIAL is required for the browser rung. Measured on the sibling Reddit actor 2026-07-30: residential cleared Reddit's browser challenge 20/20, datacenter got stuck on the ?js_challenge interstitial (4/20); raw HTTP to /search.json is 403 on every IP tier (2026-08-22). The default is already correct — do not switch it to datacenter.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "requestDelayMs": {
            "title": "Delay between Reddit requests (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Pacing between in-page JSON calls. Lower is faster but more likely to be throttled by Reddit.",
            "default": 700
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}