{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Subreddit Posts Scraper — New, Hot, Top with Velocity",
    "description": "Posts of public subreddits — new, hot, top, rising or controversial — page by page: title, text, link, kind, score, upvote ratio, comment count, exact time, flair, image, gallery and video, score and comments per hour, the subreddit's size; author karma on request. Only-new mode. No login.",
    "version": "0.2",
    "x-build-id": "e54vWG9oMUmrUnSER"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/foxlabs~reddit-subreddit-posts-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-foxlabs-reddit-subreddit-posts-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/foxlabs~reddit-subreddit-posts-scraper/runs": {
      "post": {
        "operationId": "runs-sync-foxlabs-reddit-subreddit-posts-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/foxlabs~reddit-subreddit-posts-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-foxlabs-reddit-subreddit-posts-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",
        "required": [
          "subreddits"
        ],
        "properties": {
          "subreddits": {
            "title": "Subreddits",
            "type": "array",
            "description": "One subreddit per line: a name (python), r/python, or an address (https://www.reddit.com/r/python/). The forms can be mixed; a subreddit written twice is read once. Only public subreddits can be read — a private, quarantined or Premium-only one gets a free status row that says so.",
            "items": {
              "type": "string"
            }
          },
          "sort": {
            "title": "Listing",
            "enum": [
              "new",
              "hot",
              "top",
              "rising",
              "controversial"
            ],
            "type": "string",
            "description": "Which of the subreddit's listings to read, in its own order: new (newest first), hot, top (by score, within the period below), rising, controversial (within the period).",
            "default": "new"
          },
          "time": {
            "title": "Period (for top and controversial)",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "The period the top and controversial listings cover. Ignored for new, hot and rising.",
            "default": "all"
          },
          "maxPostsPerSubreddit": {
            "title": "Maximum posts per subreddit",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "How many posts to deliver for each subreddit, from the top of the listing. Reddit's pages give 24 posts a request and it shows at most about 1,000 posts of any listing: a number above that stops where Reddit stops.",
            "default": 100
          },
          "maxPosts": {
            "title": "Maximum posts in total",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "The run stops when this many rows have been delivered. You are charged only for delivered rows.",
            "default": 100000
          },
          "postKinds": {
            "title": "Kinds of post (optional)",
            "type": "array",
            "description": "Leave empty for every kind. Choose some to get only those; a post of another kind is skipped and not charged.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "link",
                "image",
                "video",
                "gallery",
                "poll",
                "crosspost"
              ],
              "enumTitles": [
                "Text posts",
                "Link posts",
                "Image posts",
                "Video posts",
                "Galleries",
                "Polls",
                "Crossposts"
              ]
            }
          },
          "minScore": {
            "title": "Minimum score (optional)",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Deliver only posts whose score is at least this. Leave empty for every post."
          },
          "minComments": {
            "title": "Minimum comments (optional)",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Deliver only posts with at least this many comments. Leave empty for every post."
          },
          "includeSubredditInfo": {
            "title": "Add the subreddit's record to each row",
            "type": "boolean",
            "description": "One request per subreddit adds its subscribers, active users, creation date, type and description to every row of it (subredditInfo). Off: the rows carry the subscriber count alone.",
            "default": true
          },
          "includeAuthorInfo": {
            "title": "Add each author's karma and account age",
            "type": "boolean",
            "description": "Adds each post's author record (link and comment karma, the account's cake day, avatar) as authorInfo. Reddit shows these only on the author's own profile page, so this reads one page per author: it makes the run slower and uses more proxy traffic. Off: the rows still carry the author, the author's id and the avatar. A deleted author gets null.",
            "default": false
          },
          "onlyNewPosts": {
            "title": "Only posts not delivered before",
            "type": "boolean",
            "description": "Remember delivered posts under the list name below and skip them in later runs. Schedule the same subreddits hourly or daily and each run brings only the posts it has not delivered before. With this on, \"Maximum posts per subreddit\" is how far down each listing the Actor looks.",
            "default": false
          },
          "listName": {
            "title": "List name",
            "pattern": "^[A-Za-z0-9]([A-Za-z0-9-]{0,38}[A-Za-z0-9])?$",
            "type": "string",
            "description": "Name of the memory used by \"Only posts not delivered before\" (looked at only when that is on). Use a different name for each project. Letters, digits and hyphens (a hyphen not first or last), up to 40 characters; capitals are read as lower case.",
            "default": "default"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Nothing to change for normal use: the Actor reads Reddit through Apify Proxy residential addresses, the only kind Reddit answers for a signed-out visitor (measured 2026-10-17: residential 200, shared datacenter and dedicated datacenter 403 on every try). Set a proxy here to send every request through it instead; a setting the platform refuses ends the run before anything is read."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}