{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper - Posts, Comments & Subreddits | 10 Results/1s",
    "description": "Lightning-fast Reddit scraping at 10 items in just 1 sec. Extract posts, comments, user profiles, subreddit feeds, and trending communities into structured JSON for research, monitoring, sentiment analysis, competitive intelligence, and lead generation",
    "version": "0.0",
    "x-build-id": "T4SO3L1ZPSIUDawGo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mikolabs~reddit-scraper-posts-comments-subreddits-10-results-1s/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mikolabs-reddit-scraper-posts-comments-subreddits-10-results-1s",
        "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-posts-comments-subreddits-10-results-1s/runs": {
      "post": {
        "operationId": "runs-sync-mikolabs-reddit-scraper-posts-comments-subreddits-10-results-1s",
        "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-posts-comments-subreddits-10-results-1s/run-sync": {
      "post": {
        "operationId": "run-sync-mikolabs-reddit-scraper-posts-comments-subreddits-10-results-1s",
        "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": {
          "mode": {
            "title": "Scraping Mode",
            "enum": [
              "search",
              "subreddits",
              "posts",
              "users",
              "directUrls",
              "discover"
            ],
            "type": "string",
            "description": "Choose the type of content you want to extract.",
            "default": "search"
          },
          "queries": {
            "title": "Search Keywords / Phrases",
            "type": "array",
            "description": "Keywords or search phrases to look for across Reddit.",
            "items": {
              "type": "string"
            }
          },
          "searchSubreddit": {
            "title": "Restrict Search to Subreddit (Optional)",
            "type": "string",
            "description": "Optional: Only search within this subreddit (without 'r/'). Leave empty to search entire Reddit."
          },
          "strictSearch": {
            "title": "Strict Exact Keyword Matching",
            "type": "boolean",
            "description": "Enforces exact quoted match in Reddit search query.",
            "default": false
          },
          "strictTokenFilter": {
            "title": "Strict Token Filter",
            "type": "boolean",
            "description": "Only keep posts containing all query keywords in title or text.",
            "default": false
          },
          "subreddits": {
            "title": "Subreddits to Scrape (r/)",
            "type": "array",
            "description": "List of subreddits or multireddits (e.g. AskReddit, technology, startups).",
            "items": {
              "type": "string"
            }
          },
          "sort": {
            "title": "Sort Posts By",
            "enum": [
              "hot",
              "new",
              "top",
              "rising",
              "controversial",
              "relevance"
            ],
            "type": "string",
            "description": "Ranking order for subreddit feeds or search results.",
            "default": "hot"
          },
          "timeframe": {
            "title": "Time Filter (for 'Top', 'Controversial', or 'Search')",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Time window for rankings.",
            "default": "all"
          },
          "fullSubredditMode": {
            "title": "Full Subreddit Mode (Deepest Reachable History)",
            "type": "boolean",
            "description": "Deep crawl mode to paginate as far back as Reddit API permits.",
            "default": false
          },
          "urls": {
            "title": "Direct Reddit URLs",
            "type": "array",
            "description": "Links to posts, comments, subreddits, or user pages.",
            "items": {
              "type": "string"
            }
          },
          "usernames": {
            "title": "Reddit Usernames",
            "type": "array",
            "description": "Usernames to extract (without 'u/').",
            "items": {
              "type": "string"
            }
          },
          "userContent": {
            "title": "User Content Scope",
            "enum": [
              "all",
              "submitted",
              "comments"
            ],
            "type": "string",
            "description": "What activity to collect for user profiles.",
            "default": "all"
          },
          "includeComments": {
            "title": "Include Comments for Each Post",
            "type": "boolean",
            "description": "When enabled, extracts comments from each scraped post.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Maximum Comments per Post",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of comments to extract per thread.",
            "default": 25
          },
          "commentsSort": {
            "title": "Sort Comments By",
            "enum": [
              "confidence",
              "top",
              "new",
              "controversial",
              "old",
              "qa"
            ],
            "type": "string",
            "description": "Ranking order for comments.",
            "default": "confidence"
          },
          "flattenComments": {
            "title": "Flatten Comments into Separate Dataset Rows",
            "type": "boolean",
            "description": "When true, saves each comment as an independent record in the dataset.",
            "default": false
          },
          "postType": {
            "title": "Only Posts of This Type",
            "enum": [
              "all",
              "text",
              "image",
              "video",
              "gallery",
              "link"
            ],
            "type": "string",
            "description": "Filter by format.",
            "default": "all"
          },
          "minScore": {
            "title": "Minimum Score (Upvotes)",
            "type": "integer",
            "description": "Only keep posts with at least this score."
          },
          "maxScore": {
            "title": "Maximum Score (Upvotes)",
            "type": "integer",
            "description": "Only keep posts below or equal to this score."
          },
          "minComments": {
            "title": "Minimum Number of Comments",
            "type": "integer",
            "description": "Only keep posts with at least this many comments."
          },
          "minUpvoteRatio": {
            "title": "Minimum Upvote Ratio (0.0 to 1.0)",
            "type": "number",
            "description": "Filter by upvote ratio (e.g. 0.85 for 85%+ positive)."
          },
          "postsCreatedAfter": {
            "title": "Posts Created On or After (YYYY-MM-DD)",
            "type": "string",
            "description": "Only keep posts created on or after this date."
          },
          "postsCreatedBefore": {
            "title": "Posts Created On or Before (YYYY-MM-DD)",
            "type": "string",
            "description": "Only keep posts created on or before this date."
          },
          "onlyWithFlair": {
            "title": "Only Posts That Have a Flair",
            "type": "boolean",
            "description": "Only keep posts that have an assigned flair tag.",
            "default": false
          },
          "flairContains": {
            "title": "Flair Contains Keyword",
            "type": "string",
            "description": "Match posts where post flair contains this keyword."
          },
          "titleContains": {
            "title": "Title Contains Keyword",
            "type": "string",
            "description": "Only keep posts whose title contains this keyword."
          },
          "textContains": {
            "title": "Post Text Contains Keyword",
            "type": "string",
            "description": "Only keep posts whose body contains this keyword."
          },
          "domainContains": {
            "title": "Domain Contains",
            "type": "string",
            "description": "Only keep posts linking to this domain (e.g. 'github.com', 'nytimes.com')."
          },
          "excludeStickied": {
            "title": "Exclude Stickied / Pinned Posts",
            "type": "boolean",
            "description": "Exclude pinned and stickied announcement posts from the results.",
            "default": false
          },
          "excludeKeywords": {
            "title": "Exclude Keywords",
            "type": "array",
            "description": "Exclude posts containing any of these keywords.",
            "items": {
              "type": "string"
            }
          },
          "includeNsfw": {
            "title": "Include NSFW (18+) Content",
            "type": "boolean",
            "description": "Include posts marked as NSFW or 18+.",
            "default": true
          },
          "sentiment_analysis": {
            "title": "AI Sentiment Analysis",
            "type": "boolean",
            "description": "Adds sentiment score, confidence, and label (positive, negative, neutral, mixed, uncertain) to posts and comments.",
            "default": false
          },
          "content_analysis": {
            "title": "AI Content Taxonomy Classification",
            "type": "boolean",
            "description": "Classifies posts into standardized category hierarchies (Technology, Startups, Gaming, Food, etc.).",
            "default": false
          },
          "maxPostsPerSubreddit": {
            "title": "Maximum Posts per Subreddit / Query",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of posts to collect per source.",
            "default": 100
          },
          "maxTotalItems": {
            "title": "Maximum Total Items (Safety Cap)",
            "minimum": 1,
            "type": "integer",
            "description": "Safety ceiling for the total number of records across all inputs.",
            "default": 500
          },
          "maximize_coverage": {
            "title": "Maximize Coverage (Multi-View Traversal)",
            "type": "boolean",
            "description": "Expands search across multiple ranking surfaces (relevance, top, new, comments) and deduplicates results.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}