{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper — Search, Subreddits, Comments & Users",
    "description": "Reddit scraper with no login or API key: search posts with Reddit's search syntax, read any subreddit's posts, full comment threads with replies, user profiles with their posts and comments, subreddit stats and trending searches. Scores, upvote ratio and media links.",
    "version": "0.1",
    "x-build-id": "dlUftOwbfiFZCfDnw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/memo23~reddit-search-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-memo23-reddit-search-comments-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/memo23~reddit-search-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-memo23-reddit-search-comments-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/memo23~reddit-search-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-memo23-reddit-search-comments-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": {
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Search Reddit posts by keyword. Reddit search syntax works: subreddit:coffee, author:name, title:word, flair:name, \"exact phrase\", AND, OR, NOT. A page holds about 7 posts.",
            "items": {
              "type": "string"
            }
          },
          "searchSort": {
            "title": "Sort search by",
            "enum": [
              "RELEVANCE",
              "HOT",
              "TOP",
              "NEW",
              "COMMENTS"
            ],
            "type": "string",
            "description": "Order of the search results.",
            "default": "RELEVANCE"
          },
          "searchTime": {
            "title": "Posted within",
            "enum": [
              "all",
              "year",
              "month",
              "week",
              "day",
              "hour"
            ],
            "type": "string",
            "description": "Limit the search to a time range.",
            "default": "all"
          },
          "includeNsfw": {
            "title": "Include NSFW posts",
            "type": "boolean",
            "description": "Also return posts marked NSFW in search.",
            "default": false
          },
          "maxPostsPerQuery": {
            "title": "Max posts per query",
            "minimum": 5,
            "maximum": 1000000,
            "type": "integer",
            "description": "Posts to return for each query (minimum 5).",
            "default": 25
          },
          "subreddits": {
            "title": "Subreddits",
            "type": "array",
            "description": "Subreddit names (coffee, r/coffee) or links (https://www.reddit.com/r/coffee/). Each returns the subreddit's posts.",
            "items": {
              "type": "string"
            }
          },
          "subredditSort": {
            "title": "Sort subreddit posts by",
            "enum": [
              "HOT",
              "NEW",
              "TOP",
              "RISING",
              "BEST",
              "CONTROVERSIAL"
            ],
            "type": "string",
            "description": "Which listing of the subreddit to read.",
            "default": "HOT"
          },
          "maxPostsPerSubreddit": {
            "title": "Max posts per subreddit",
            "minimum": 5,
            "maximum": 1000000,
            "type": "integer",
            "description": "Posts to return for each subreddit (minimum 5). A page holds 5 to 8.",
            "default": 25
          },
          "includeSubredditInfo": {
            "title": "Subreddit info",
            "type": "boolean",
            "description": "Add one row per subreddit: subscribers, weekly active users and contributions, description, creation date, visibility.",
            "default": false
          },
          "feeds": {
            "title": "Site-wide feeds",
            "type": "array",
            "description": "Reddit's own feeds across all subreddits: Popular is what the whole site is upvoting, News is current-affairs posts, Games is gaming posts.",
            "items": {
              "type": "string",
              "enum": [
                "popular",
                "news",
                "games"
              ],
              "enumTitles": [
                "Popular",
                "News",
                "Games"
              ]
            }
          },
          "feedSort": {
            "title": "Sort feed by",
            "enum": [
              "HOT",
              "NEW",
              "TOP",
              "RISING",
              "BEST",
              "CONTROVERSIAL"
            ],
            "type": "string",
            "description": "Order of the Popular and Games feeds. The News feed has one order.",
            "default": "HOT"
          },
          "feedTime": {
            "title": "Feed time range",
            "enum": [
              "HOUR",
              "DAY",
              "WEEK",
              "MONTH",
              "YEAR",
              "ALL"
            ],
            "type": "string",
            "description": "Time range for the Popular and Games feeds when sorted by Top or Controversial.",
            "default": "DAY"
          },
          "maxPostsPerFeed": {
            "title": "Posts per feed",
            "minimum": 5,
            "maximum": 5000,
            "type": "integer",
            "description": "Upper limit of posts for each feed (minimum 5). A page holds 7 to 9.",
            "default": 25
          },
          "postUrls": {
            "title": "Post links or IDs",
            "type": "array",
            "description": "Reddit post links (https://www.reddit.com/r/…/comments/abc123/…), redd.it short links or post IDs. Each returns the full post: text, score, upvote ratio, media, flair.",
            "items": {
              "type": "string"
            }
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Return the comments of every post in the run as separate rows, with depth and parent so the thread can be rebuilt. Posts with fewer than 5 comments are skipped.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 5,
            "maximum": 1000000,
            "type": "integer",
            "description": "Comments to return for each post (minimum 5). A page holds about 8.",
            "default": 30
          },
          "commentSort": {
            "title": "Sort comments by",
            "enum": [
              "CONFIDENCE",
              "TOP",
              "NEW",
              "HOT",
              "CONTROVERSIAL",
              "OLD"
            ],
            "type": "string",
            "description": "Order of the comments.",
            "default": "CONFIDENCE"
          },
          "expandReplies": {
            "title": "Open collapsed reply threads",
            "type": "boolean",
            "description": "Reddit folds long reply chains behind \"more replies\". Turn this on to open the folded chains that hide 3 or more replies.",
            "default": false
          },
          "users": {
            "title": "Usernames or profile links",
            "type": "array",
            "description": "Reddit usernames (spez, u/spez) or profile links. Each returns the profile: karma, post and comment counts, account age.",
            "items": {
              "type": "string"
            }
          },
          "includeUserProfile": {
            "title": "Profile",
            "type": "boolean",
            "description": "Return the profile row.",
            "default": true
          },
          "includeUserPosts": {
            "title": "User's posts",
            "type": "boolean",
            "description": "Return the user's posts, newest first.",
            "default": false
          },
          "includeUserComments": {
            "title": "User's comments",
            "type": "boolean",
            "description": "Return the user's comments, newest first, each with the post it was written under.",
            "default": false
          },
          "maxItemsPerUser": {
            "title": "Max rows per user list",
            "minimum": 5,
            "maximum": 1000000,
            "type": "integer",
            "description": "Posts and comments to return for each user, for each of the two lists (minimum 5).",
            "default": 25
          },
          "includeTrendingSearches": {
            "title": "Trending searches",
            "type": "boolean",
            "description": "Return the searches trending on Reddit right now.",
            "default": false
          },
          "maxItems": {
            "title": "Max posts per run",
            "minimum": 5,
            "maximum": 1000000,
            "type": "integer",
            "description": "Upper limit on post rows across the whole run (minimum 5). Free-plan accounts get up to 100.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}