{
  "openapi": "3.0.1",
  "info": {
    "title": "🌟 Reddit Scraper Pro",
    "description": null,
    "version": "0.0",
    "x-build-id": "MabpjsLK2csyu0aPc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/databuddy~reddit-scraper-pro/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-databuddy-reddit-scraper-pro",
        "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/databuddy~reddit-scraper-pro/runs": {
      "post": {
        "operationId": "runs-sync-databuddy-reddit-scraper-pro",
        "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/databuddy~reddit-scraper-pro/run-sync": {
      "post": {
        "operationId": "run-sync-databuddy-reddit-scraper-pro",
        "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": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Reddit communities (/r/name, with optional /hot /new /top /rising), posts, comment links, users (/user/name, /comments, /submitted), search URLs, share links (/r/x/s/…), redd.it links, r/popular and multireddits.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searches": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords to search Reddit for. Used together with Start URLs (unlike the original, both run in one go).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchCommunityName": {
            "title": "Search inside community",
            "type": "string",
            "description": "Only search inside this community, e.g. \"programming\" or \"r/programming\". Empty = all of Reddit.",
            "default": ""
          },
          "searchPosts": {
            "title": "Search for posts",
            "type": "boolean",
            "description": "Find posts matching the search terms.",
            "default": true
          },
          "searchComments": {
            "title": "Search for comments",
            "type": "boolean",
            "description": "Reddit's public data may not offer comment search; if it doesn't, you get a free row explaining it. Tip: search posts + \"Only results mentioning\" to collect matching comments inside them.",
            "default": false
          },
          "searchCommunities": {
            "title": "Search for communities",
            "type": "boolean",
            "description": "Find communities matching the search terms.",
            "default": false
          },
          "searchUsers": {
            "title": "Search for users",
            "type": "boolean",
            "description": "Find users matching the search terms.",
            "default": false
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "relevance",
              "hot",
              "top",
              "new",
              "comments",
              "rising"
            ],
            "type": "string",
            "description": "Search order, and the order for community URLs without a sort in the URL (\"relevance\" means Hot for communities). A \"Post date limit\" switches to New automatically.",
            "default": "relevance"
          },
          "time": {
            "title": "Time range",
            "enum": [
              "all",
              "hour",
              "day",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "For Top / search: only posts from this period.",
            "default": "all"
          },
          "maxItems": {
            "title": "Max results in total",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many saved (and charged) results of any type. 0 = no limit.",
            "default": 0
          },
          "maxPostCount": {
            "title": "Max posts per community / search / user",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Posts to save from each source. Reddit lists end near 1,000. 0 = no posts (e.g. community details only).",
            "default": 25
          },
          "maxComments": {
            "title": "Max comments per post",
            "minimum": 0,
            "type": "integer",
            "description": "Comments (including replies) to save per post, top-rated first. Hidden \"load more\" comments are loaded automatically. 0 = none.",
            "default": 20
          },
          "maxCommentDepth": {
            "title": "Max reply depth",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "0 = only top-level comments, 1 = plus direct replies, and so on.",
            "default": 10
          },
          "commentSort": {
            "title": "Comment order",
            "enum": [
              "top",
              "best",
              "new",
              "controversial",
              "old",
              "qa"
            ],
            "type": "string",
            "description": "Which comments come first (and so which are kept when \"Max comments\" is reached).",
            "default": "top"
          },
          "maxCommunitiesCount": {
            "title": "Max communities per search",
            "minimum": 0,
            "type": "integer",
            "description": "For community search and popular-community URLs.",
            "default": 10
          },
          "maxUserCount": {
            "title": "Max users per search",
            "minimum": 0,
            "type": "integer",
            "description": "For user search.",
            "default": 10
          },
          "skipComments": {
            "title": "Skip comments",
            "type": "boolean",
            "description": "Save posts without their comments.",
            "default": false
          },
          "skipUserPosts": {
            "title": "Skip user posts",
            "type": "boolean",
            "description": "For user URLs: save the profile only.",
            "default": false
          },
          "skipCommunity": {
            "title": "Skip community details",
            "type": "boolean",
            "description": "For community URLs: do not save the community's own row (members, description…).",
            "default": false
          },
          "postDateLimit": {
            "title": "Post date limit",
            "type": "string",
            "description": "Only posts newer than this: a date (2025-01-31) or a period (\"7 days\", \"12 hours\"). Switches listings to New and stops paging once posts get older.",
            "default": ""
          },
          "commentDateLimit": {
            "title": "Comment date limit",
            "type": "string",
            "description": "Only comments newer than this (date or period).",
            "default": ""
          },
          "keywords": {
            "title": "Only results mentioning",
            "type": "array",
            "description": "Keep only posts (title, text, link) and comments that contain any of these words or phrases — whole words, any case. Matches are listed in \"matchedKeywords\". Ideal for brand monitoring.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minUpvotes": {
            "title": "Min upvotes (posts)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip posts with fewer upvotes. 0 = off.",
            "default": 0
          },
          "minPostComments": {
            "title": "Min comments (posts)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip posts with fewer comments. 0 = off.",
            "default": 0
          },
          "flairs": {
            "title": "Only these post flairs",
            "type": "array",
            "description": "Keep only posts with one of these flairs (any case), e.g. \"Question\", \"Discussion\". Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeNSFW": {
            "title": "Include NSFW content",
            "type": "boolean",
            "description": "Turn off to leave out posts, communities and users marked 18+.",
            "default": true
          },
          "excludeStickied": {
            "title": "Leave out pinned / stickied posts",
            "type": "boolean",
            "description": "Skip moderator-pinned posts at the top of communities.",
            "default": false
          },
          "excludeDeletedComments": {
            "title": "Leave out deleted comments",
            "type": "boolean",
            "description": "Skip comments whose text was deleted or removed.",
            "default": true
          },
          "skipPreviouslyScraped": {
            "title": "Skip results saved in previous runs",
            "type": "boolean",
            "description": "Remembers saved IDs in a named key-value store — ideal for scheduled monitoring (only new posts/comments each run).",
            "default": false
          },
          "dedupeStoreName": {
            "title": "Memory store name",
            "pattern": "^[a-z0-9-]{1,63}$",
            "type": "string",
            "description": "Key-value store used by \"Skip results saved in previous runs\".",
            "default": "reddit-scraper-pro-seen"
          },
          "rssFallback": {
            "title": "RSS fallback when blocked",
            "type": "boolean",
            "description": "If Reddit blocks the full data on every route, still return posts and comments from Reddit's RSS feeds (fewer fields: no votes or comment counts). Rows say dataSource = \"rss\".",
            "default": true
          },
          "ignoreStartUrls": {
            "title": "Ignore start URLs",
            "type": "boolean",
            "description": "For Zapier/Make integrations that always send a Start URLs field: ignore it and use only Search terms.",
            "default": false
          },
          "proxyFallback": {
            "title": "Automatic proxy fallback",
            "type": "boolean",
            "description": "If Reddit keeps blocking the chosen proxy, switch automatically to Apify residential, then datacenter proxy, then the server IP.",
            "default": true
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Reddit blocks many datacenter IPs. Residential works best.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}