{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper",
    "description": "Scrape Reddit posts, comments, users, no login or API key. Search or paste URLs, filter by keyword/date, export to JSON/CSV/Excel or push to Notion, Slack & more.",
    "version": "1.0",
    "x-build-id": "n4UEce6qoizf9YVrU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/techforce.global~reddit-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-techforce.global-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/techforce.global~reddit-scraper/runs": {
      "post": {
        "operationId": "runs-sync-techforce.global-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/techforce.global~reddit-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-techforce.global-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": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Direct Reddit URLs to scrape. Supports subreddits (r/...), posts (/comments/...), user profiles (user/...), search result pages, and community lists.",
            "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 on Reddit. Each term runs a search according to the 'Search for' setting below.",
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "Search for",
            "enum": [
              "posts",
              "comments",
              "communities",
              "users"
            ],
            "type": "string",
            "description": "What each search term should return.",
            "default": "posts"
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "hot",
              "top",
              "new",
              "rising",
              "comments"
            ],
            "type": "string",
            "description": "How to sort posts/search results.",
            "default": "new"
          },
          "time": {
            "title": "Time range",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Time window used when sorting by 'top' or 'relevance'.",
            "default": "all"
          },
          "commentSort": {
            "title": "Comment sort",
            "enum": [
              "confidence",
              "top",
              "new",
              "controversial",
              "old",
              "qa"
            ],
            "type": "string",
            "description": "How to sort comments within a post.",
            "default": "top"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "type": "integer",
            "description": "Total maximum number of dataset items to push (0 = unlimited). Hard safety cap across the whole run.",
            "default": 100
          },
          "maxPostCount": {
            "title": "Max posts per source",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum posts to scrape per subreddit / search / user (0 = unlimited).",
            "default": 50
          },
          "maxComments": {
            "title": "Max comments per post",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum comments to extract per post (0 = skip comments, only post data).",
            "default": 20
          },
          "maxCommentDepth": {
            "title": "Max comment depth",
            "minimum": 0,
            "type": "integer",
            "description": "How deep to follow reply threads (1 = top-level only, 0 = unlimited).",
            "default": 3
          },
          "maxCommunitiesCount": {
            "title": "Max communities",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum communities (subreddits) to scrape per source (0 = unlimited).",
            "default": 10
          },
          "maxUserCount": {
            "title": "Max users",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum users to scrape per source (0 = unlimited).",
            "default": 10
          },
          "skipComments": {
            "title": "Skip comments",
            "type": "boolean",
            "description": "Do not scrape comments for posts (faster and cheaper).",
            "default": false
          },
          "skipUserPosts": {
            "title": "Skip user posts",
            "type": "boolean",
            "description": "When scraping a user, skip their submitted posts/comments and only return the profile.",
            "default": false
          },
          "skipCommunityInfo": {
            "title": "Skip community info",
            "type": "boolean",
            "description": "When scraping a subreddit, skip the community 'about' metadata item.",
            "default": false
          },
          "includeNSFW": {
            "title": "Include NSFW / 18+ content",
            "type": "boolean",
            "description": "Include content marked NSFW (over_18). When off, NSFW items are filtered out.",
            "default": true
          },
          "keywords": {
            "title": "Keyword filter",
            "type": "array",
            "description": "Only keep items whose title/body/text contains at least one of these keywords (case-insensitive). Leave empty to keep everything.",
            "items": {
              "type": "string"
            }
          },
          "postDateFrom": {
            "title": "Posted after",
            "type": "string",
            "description": "Only keep items created on/after this date. Accepts YYYY-MM-DD or relative like '7 days', '3 months'."
          },
          "postDateTo": {
            "title": "Posted before",
            "type": "string",
            "description": "Only keep items created on/before this date (YYYY-MM-DD)."
          },
          "extractMedia": {
            "title": "Extract media",
            "type": "boolean",
            "description": "Extract image/video/gallery URLs, thumbnails, and external links from posts.",
            "default": true
          },
          "dedupItems": {
            "title": "Deduplicate items",
            "type": "boolean",
            "description": "Automatically drop duplicate posts/comments/users/communities within a run.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy used for requests. Reddit rate-limits by IP, so residential/rotating proxies are strongly recommended for larger runs.",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum parallel requests. Lower this if you hit rate limits.",
            "default": 10
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "minimum": 0,
            "type": "integer",
            "description": "How many times to retry a failed/blocked request.",
            "default": 5
          },
          "debugMode": {
            "title": "Debug mode",
            "type": "boolean",
            "description": "Enable verbose debug logging.",
            "default": false
          },
          "mcpConnector": {
            "title": "Deliver to (MCP connector)",
            "type": "string",
            "description": "Optionally deliver the scraped Reddit items into a connector you have authorized — Notion, Slack, Linear, Airtable, Jira, GitHub, or any MCP-compatible connector. Leave empty to only save the results to the dataset."
          },
          "deliveryMode": {
            "title": "Delivery mode",
            "enum": [
              "perItem",
              "summary",
              "none"
            ],
            "type": "string",
            "description": "How to deliver to the connector: 'perItem' (one call per scraped post/comment/user/community), 'summary' (a single call containing a digest of everything scraped), or 'none' (save to dataset only).",
            "default": "perItem"
          },
          "mcpTool": {
            "title": "Connector tool name",
            "type": "string",
            "description": "Name of the tool to call on the connector (e.g. 'create_page' for Notion, 'send_message' for Slack, 'create_issue' for Jira/GitHub). If unsure, run once with a connector selected — the log lists the connector's available tools.",
            "default": ""
          },
          "mcpArguments": {
            "title": "Connector tool arguments",
            "type": "object",
            "description": "Arguments passed to the connector tool. String values support {placeholders}. In 'perItem' mode every field of the item is a placeholder — common ones: {type}, {id}, {title}, {text}, {body}, {author}, {subreddit}, {url}/{permalink}, {score}, {upVotes}, {upvoteRatio}, {numberOfComments}, {createdAt}, {username}, {name}, {numberOfMembers}, plus {message} (the rendered template below). In 'summary' mode: {itemCount}, {postCount}, {commentCount}, {userCount}, {communityCount}, {items} (a formatted digest) and {message}. Example for Slack: {\"channel\": \"#reddit\", \"text\": \"{message}\"}.",
            "default": {}
          },
          "mcpMessageTemplate": {
            "title": "Message template",
            "type": "string",
            "description": "Optional template rendered and exposed as the {message} placeholder in the tool arguments. Per-item example: '[{subreddit}] {title}\\n{url}\\nScore {score}, {numberOfComments} comments'. Summary example: 'Scraped {itemCount} Reddit items ({postCount} posts, {commentCount} comments):\\n\\n{items}'.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}