{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper API - Posts, Comments & Monitoring",
    "description": "Scrape public Reddit posts, search, subreddits, media, and nested comments or monitor only newly observed posts. Anonymous read-only OAuth; no browser, proxy, login, cookies, or API key.",
    "version": "1.0",
    "x-build-id": "1s0hU4phFcRHnueke"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/thirdwatch~reddit-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-thirdwatch-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/thirdwatch~reddit-scraper/runs": {
      "post": {
        "operationId": "runs-sync-thirdwatch-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/thirdwatch~reddit-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-thirdwatch-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": {
          "queries": {
            "title": "Search queries or subreddits",
            "maxItems": 50,
            "type": "array",
            "description": "Plain text searches all Reddit. Use r/python for a subreddit listing or r/python: asyncio for search within one subreddit.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Reddit listing, search, or post URLs (optional)",
            "maxItems": 50,
            "type": "array",
            "description": "Existing public Reddit URLs. Subreddit/search pages are paginated; post URLs are extracted directly.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "postUrls": {
            "title": "Specific Reddit post URLs (optional)",
            "maxItems": 100,
            "type": "array",
            "description": "Fetch exact public Reddit posts and, optionally, their comment threads.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "hot",
              "new",
              "top",
              "rising",
              "relevance"
            ],
            "type": "string",
            "description": "How subreddit and search results are ordered.",
            "default": "hot"
          },
          "timeFilter": {
            "title": "Time filter",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Time range for top and relevance searches.",
            "default": "all"
          },
          "maxResults": {
            "title": "Maximum posts per query",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum unique posts returned for each query or listing URL. Pagination is automatic in batches of up to 100. Persistent monitors distribute a 2,000-observation safety budget across listing targets.",
            "default": 100
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Embed public top and nested comments in each post row. Comment-enabled listing runs are capped at 100 posts total across all queries to respect Reddit and the run timeout.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Maximum comments per post",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum public comments embedded in each post row when comments are enabled.",
            "default": 10
          },
          "maxCommentDepth": {
            "title": "Maximum comment depth",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Zero keeps top-level comments only; higher values include nested replies up to that depth.",
            "default": 1
          },
          "minScore": {
            "title": "Minimum post score",
            "minimum": -100000,
            "maximum": 10000000,
            "type": "integer",
            "description": "Only write posts at or above this visible Reddit score.",
            "default": 0
          },
          "skipPinnedPosts": {
            "title": "Skip pinned posts",
            "type": "boolean",
            "description": "Exclude moderator-pinned or stickied posts from results.",
            "default": false
          },
          "newerThan": {
            "title": "Only posts newer than (optional)",
            "type": "string",
            "description": "ISO 8601 timestamp or date for one-off incremental exports, for example 2026-07-01 or 2026-07-01T00:00:00Z. Persistent monitors usually leave this empty."
          },
          "monitorMode": {
            "title": "Output mode",
            "enum": [
              "all",
              "new-posts"
            ],
            "type": "string",
            "description": "Return every current post, or persist a baseline and return only posts not seen by this watch. An unchanged new-posts run writes no billable result rows.",
            "default": "all"
          },
          "monitorStoreName": {
            "title": "Monitor name (optional)",
            "maxLength": 200,
            "type": "string",
            "description": "Stable identity for one scheduled watch. Reuse the same name and input on every run; use a different name for each independent monitor."
          },
          "maxConcurrency": {
            "title": "Concurrent detail requests",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Parallel parsing tasks for bodies/comments. Actual Reddit requests remain globally rate-limited.",
            "default": 3
          },
          "requestDelaySecs": {
            "title": "Delay between Reddit requests",
            "minimum": 0.6,
            "maximum": 3,
            "type": "number",
            "description": "Minimum delay between anonymous Reddit API requests. Keep at 0.65 seconds unless you need a gentler crawl.",
            "default": 0.65
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}