{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper - All In One",
    "description": "Nine Reddit reads in one Actor: a subreddit feed, the popular feed, keyword search, an account's activity and comment history, a post's comment tree, a single post, a community record, and an account profile. The mode is chosen at run time and each one fills in its own section.",
    "version": "0.1",
    "x-build-id": "YUm0S9msshBDyLGNu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/thenetaji~reddit-scraper-all-in-one/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-thenetaji-reddit-scraper-all-in-one",
        "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/thenetaji~reddit-scraper-all-in-one/runs": {
      "post": {
        "operationId": "runs-sync-thenetaji-reddit-scraper-all-in-one",
        "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/thenetaji~reddit-scraper-all-in-one/run-sync": {
      "post": {
        "operationId": "run-sync-thenetaji-reddit-scraper-all-in-one",
        "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",
        "required": [
          "scraperType"
        ],
        "properties": {
          "scraperType": {
            "title": "What to collect",
            "enum": [
              "subredditPosts",
              "popularPosts",
              "search",
              "userPosts",
              "userComments",
              "postComments",
              "postDetails",
              "subredditInfo",
              "userProfile"
            ],
            "type": "string",
            "description": "Choose the dataset for this run, then fill in the section for that mode below.",
            "default": "subredditPosts"
          },
          "subreddit": {
            "title": "Subreddit",
            "type": "string",
            "description": "The subreddit to read. A bare name (AskReddit), a prefixed name (r/AskReddit), or a pasted reddit.com URL are all accepted; a URL is reduced to the subreddit it names, and any sort or time in that URL is ignored in favour of the fields below."
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "best",
              "hot",
              "new",
              "top",
              "rising",
              "controversial"
            ],
            "type": "string",
            "description": "The listing order to read the subreddit in. Each order returns a different set of posts, not a reordering of one set.",
            "default": "best"
          },
          "time": {
            "title": "Time window",
            "enum": [
              "HOUR",
              "DAY",
              "WEEK",
              "MONTH",
              "YEAR",
              "ALL"
            ],
            "type": "string",
            "description": "The period the Top and Controversial sorts rank within. It is ignored by Best, Hot, New, and Rising. Leave it empty to let the listing apply its own window."
          },
          "post_id": {
            "title": "Post",
            "type": "string",
            "description": "The post to read. A base36 post id (1vqcqpz), a t3_ fullname, or a pasted permalink are all accepted. A permalink is the safest form: the post id and the subreddit are read out of the same string and cannot contradict each other, and it makes the Subreddit field unnecessary."
          },
          "commentSort": {
            "title": "Comment order",
            "enum": [
              "top",
              "new",
              "controversial",
              "old"
            ],
            "type": "string",
            "description": "The order the comment tree is read in. Leave it empty to take Reddit's own default order, which is the one reddit.com applies to a thread nobody has re-sorted."
          },
          "username": {
            "title": "Username",
            "type": "string",
            "description": "The account to read. A bare name (spez), a prefixed name (u/spez), or a pasted reddit.com/user/ URL are all accepted; a URL is reduced to the account it names."
          },
          "include": {
            "title": "Include",
            "enum": [
              "all",
              "posts",
              "comments"
            ],
            "type": "string",
            "description": "Which half of the account's activity to keep. Reddit serves posts and comments as one interleaved feed with no filter of its own, so Posts only and Comments only are applied after the feed has been read: those runs read more of the feed per saved record and can finish below Max results even on an active account.",
            "default": "all"
          },
          "q": {
            "title": "Search term",
            "type": "string",
            "description": "The words to search Reddit for. Passed through as typed; quotes, operators, and punctuation are treated exactly as reddit.com's own search box treats them."
          },
          "searchType": {
            "title": "Search in",
            "enum": [
              "posts",
              "communities",
              "comments",
              "people",
              "media"
            ],
            "type": "string",
            "description": "Which corpus to search. Each returns a different record shape: posts and media return post records, communities return subreddit records, comments return comment records, and people return account records.",
            "default": "posts"
          },
          "cursor": {
            "title": "Search cursor",
            "type": "string",
            "description": "A search continuation token, if one is already held from elsewhere. Search results are ranked rather than paged by id, so a run of this Actor cannot publish a token that resumes exactly where it stopped and does not print one; raise Max results to go deeper instead. Leave it empty in normal use."
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "The maximum number of records to save. A value of 0 removes the bound and the run continues until the source reports it has no more to give.",
            "default": 100
          },
          "after": {
            "title": "Resume from",
            "type": "string",
            "description": "A continuation point from an earlier run: the value the run log prints when it stops, or the id of a record already collected. The feed continues after that record instead of starting at the top. Leave it empty to start at the top."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}