{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper - Extract Posts, Comments & User Data",
    "description": "Scrape Reddit posts, comments, communities & users without authentication. Search or use direct URLs. Includes residential proxies. $15/month unlimited access.",
    "version": "0.0",
    "x-build-id": "U2mmOzjNhJB0lBakN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mikolabs~reddit-scraper-extract-posts-comments-user-data/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mikolabs-reddit-scraper-extract-posts-comments-user-data",
        "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/mikolabs~reddit-scraper-extract-posts-comments-user-data/runs": {
      "post": {
        "operationId": "runs-sync-mikolabs-reddit-scraper-extract-posts-comments-user-data",
        "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/mikolabs~reddit-scraper-extract-posts-comments-user-data/run-sync": {
      "post": {
        "operationId": "run-sync-mikolabs-reddit-scraper-extract-posts-comments-user-data",
        "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": "Provide direct Reddit post URLs you want to scrape. If using search instead, clear this field.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "skipComments": {
            "title": "Skip comments",
            "type": "boolean",
            "description": "When enabled, comments will not be scraped from posts.",
            "default": false
          },
          "skipUserPosts": {
            "title": "Skip user posts",
            "type": "boolean",
            "description": "Skip scraping posts made by Reddit users when scraping user profiles.",
            "default": false
          },
          "skipCommunity": {
            "title": "Skip community details",
            "type": "boolean",
            "description": "Skip scraping community information, but still scrape posts if included.",
            "default": false
          },
          "searches": {
            "title": "Search terms",
            "type": "array",
            "description": "Enter keywords to search Reddit for posts, users, communities, or comments.",
            "items": {
              "type": "string"
            }
          },
          "ignoreStartUrls": {
            "title": "Ignore start URLs",
            "type": "boolean",
            "description": "Force search mode even if Start URLs are provided. Useful for Zapier integrations.",
            "default": false
          },
          "searchPosts": {
            "title": "Search for posts",
            "type": "boolean",
            "description": "Search will include scraping Reddit posts.",
            "default": true
          },
          "searchComments": {
            "title": "Search for comments",
            "type": "boolean",
            "description": "Search will include scraping Reddit comments.",
            "default": false
          },
          "searchCommunities": {
            "title": "Search for communities",
            "type": "boolean",
            "description": "Search will include scraping Reddit communities.",
            "default": false
          },
          "searchUsers": {
            "title": "Search for users",
            "type": "boolean",
            "description": "Search will include scraping Reddit users.",
            "default": false
          },
          "sort": {
            "title": "Sort search results",
            "enum": [
              "relevance",
              "hot",
              "top",
              "new",
              "rising",
              "comments"
            ],
            "type": "string",
            "description": "Sorting strategy when searching Reddit.",
            "default": "new"
          },
          "time": {
            "title": "Filter by date (Posts only)",
            "enum": [
              "all",
              "hour",
              "day",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Limit search results to a specific timeframe.",
            "default": "all"
          },
          "includeNSFW": {
            "title": "Include NSFW content",
            "type": "boolean",
            "description": "Include Reddit posts marked as NSFW in results.",
            "default": true
          },
          "maxItems": {
            "title": "Maximum number of items",
            "type": "integer",
            "description": "Maximum number of total scraped dataset items.",
            "default": 10
          },
          "maxPostCount": {
            "title": "Limit posts per page",
            "type": "integer",
            "description": "Maximum number of posts to extract per source URL.",
            "default": 10
          },
          "postDateLimit": {
            "title": "Post date limit",
            "type": "string",
            "description": "Scrape only posts published after this date (YYYY-MM-DD).",
            "default": ""
          },
          "maxComments": {
            "title": "Limit comments per page",
            "type": "integer",
            "description": "Maximum number of comments to scrape for each post.",
            "default": 10
          },
          "maxCommunitiesCount": {
            "title": "Limit community pages scraped",
            "type": "integer",
            "description": "Maximum number of community listing pages to scrape.",
            "default": 2
          },
          "maxUserCount": {
            "title": "Limit user pages scraped",
            "type": "integer",
            "description": "Maximum number of user listing pages to scrape.",
            "default": 2
          },
          "scrollTimeout": {
            "title": "Page scroll timeout (seconds)",
            "type": "integer",
            "description": "Maximum time spent scrolling to load more posts.",
            "default": 40
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Configure proxy settings for Reddit access.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "debugMode": {
            "title": "Debug Mode",
            "type": "boolean",
            "description": "Enable verbose logs for debugging purposes.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}