{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper: Posts, Comments & Change Monitor",
    "description": "Scrape Reddit posts, search results, subreddits, public user activity, and nested comments without a Reddit account or API key. Export stable IDs with clear coverage, or rerun the same scope to receive NEW, UPDATED, and safely confirmed ENDED changes.",
    "version": "0.10",
    "x-build-id": "8gxPxKKSHGhKcEkwH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/luminar~reddit-scraper-changefeed-private-v1/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-luminar-reddit-scraper-changefeed-private-v1",
        "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/luminar~reddit-scraper-changefeed-private-v1/runs": {
      "post": {
        "operationId": "runs-sync-luminar-reddit-scraper-changefeed-private-v1",
        "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/luminar~reddit-scraper-changefeed-private-v1/run-sync": {
      "post": {
        "operationId": "run-sync-luminar-reddit-scraper-changefeed-private-v1",
        "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": "Enter community names without r/, for example apify. Use this for recent posts from one or more communities. Ignored when Search queries or Start URLs are provided.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Search public Reddit content for each phrase. When provided, Subreddits are ignored unless the subreddit is part of a Start URL.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Reddit URLs",
            "type": "array",
            "description": "Add public Reddit thread, subreddit, search, or user-activity URLs. When any URL is provided, Search queries and Subreddits are ignored.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxItemsPerTarget": {
            "title": "Maximum posts per target",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Stops after this many posts for each subreddit, search, or user target. A direct thread returns at most one post plus any requested comments.",
            "default": 25
          },
          "recordMode": {
            "title": "Records to return",
            "enum": [
              "posts",
              "comments",
              "postsAndComments"
            ],
            "type": "string",
            "description": "Choose posts, comments, or both. Selecting comments adds thread requests and can increase the number of paid rows. Comments keep their post and parent relationships.",
            "default": "posts"
          },
          "maxCommentsPerPost": {
            "title": "Maximum comments per post",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Used only for Comments only or Posts and comments. Stops each thread at this many comment rows and reports CAPPED if more may remain.",
            "default": 100
          },
          "maxDepth": {
            "title": "Maximum comment depth",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Used only when comments are requested. Depth 0 is a top-level comment; depth 1 is its direct reply.",
            "default": 10
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "new",
              "relevance",
              "hot",
              "top",
              "rising",
              "comments"
            ],
            "type": "string",
            "description": "Applies to supported listing and search targets. For direct-thread comments, New and Top are preserved; other choices use Reddit Best and the run reports that mapping.",
            "default": "new"
          },
          "timeWindow": {
            "title": "Time window",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Applied only where Reddit supports a time window, mainly Search and Top. It has no effect on unsupported target types.",
            "default": "week"
          },
          "excludeNsfw": {
            "title": "Exclude NSFW posts",
            "type": "boolean",
            "description": "Removes posts publicly marked over-18 when Reddit exposes that flag for the selected target.",
            "default": true
          },
          "excludeFlairs": {
            "title": "Exclude post flairs",
            "type": "array",
            "description": "Remove posts whose exposed flair exactly matches one of these labels, ignoring letter case.",
            "items": {
              "type": "string"
            }
          },
          "includeMediaMetadata": {
            "title": "Include media and link metadata",
            "type": "boolean",
            "description": "Keeps media and outbound-link metadata already present in Reddit's response. The Actor does not download media files.",
            "default": true
          },
          "stateMode": {
            "title": "Output mode",
            "enum": [
              "current",
              "changes"
            ],
            "type": "string",
            "description": "Current returns every observed row. Changes compares with the previous successful run of the same target scope and namespace. The first Changes run seeds state and returns observed rows as NEW.",
            "default": "current"
          },
          "stateNamespace": {
            "title": "Monitoring namespace",
            "pattern": "^[a-zA-Z0-9_-]{1,40}$",
            "type": "string",
            "description": "Keep the same value for consecutive runs of one monitor. Use a different short name when the same Actor maintains an independent monitor.",
            "default": "default"
          },
          "includeUnchanged": {
            "title": "Include unchanged rows",
            "type": "boolean",
            "description": "Used only in Changes mode. Off keeps recurring datasets small. When enabled, UNCHANGED rows are delivered without a post or comment result charge.",
            "default": false
          },
          "maxPagesPerTarget": {
            "title": "Maximum listing pages per target",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Stops pagination at this many source pages. If another page remains, coverage is CAPPED instead of COMPLETE.",
            "default": 10
          },
          "maxRequests": {
            "title": "Maximum source requests",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Run-wide ceiling across listings, threads, reply expansion, and bounded fallbacks. Lower values can produce CAPPED or PARTIAL coverage.",
            "default": 80
          },
          "maxRuntimeSecs": {
            "title": "Maximum source runtime",
            "minimum": 30,
            "maximum": 3600,
            "type": "integer",
            "description": "Stops additional source work after this many seconds. A stopped target is reported honestly in the coverage summary.",
            "default": 480
          },
          "maxCostUsd": {
            "title": "Maximum projected charge",
            "minimum": 0,
            "maximum": 50,
            "type": "number",
            "description": "Buyer-charge guard for this run. The Actor reserves enough event capacity before starting broad source work and stops before exceeding this limit.",
            "default": 1
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}