{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper | Subreddit & User Posts Export",
    "description": "Pay per row, no login: posts from subreddits and r/popular as JSON with score, comment count, date and link. Posts only, no comments or search. No new, rising or r/all; up to about 1,000 posts per listing; about 100 requests per 10 min per IP without proxy. Blocked runs fail with a reason.",
    "version": "0.2",
    "x-build-id": "xcFrQGasZhobvL2hi"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dataizi-srl~reddit-com-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dataizi-srl-reddit-com-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/dataizi-srl~reddit-com-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dataizi-srl-reddit-com-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/dataizi-srl~reddit-com-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dataizi-srl-reddit-com-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": {
          "subreddits": {
            "title": "Subreddits",
            "type": "array",
            "description": "Subreddit names, one per line: `python` or `r/python`. Case does not matter. Each one is read with the Sort you choose below, and the run returns its posts only, never its comments.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "startUrls": {
            "title": "Reddit links",
            "type": "array",
            "description": "Links, one per line: a subreddit (`https://www.reddit.com/r/programming/`, or with a sort and window such as `/r/python/top/?t=week`), `https://www.reddit.com/r/popular/`, a user (`https://www.reddit.com/user/spez/`) or a post (`https://www.reddit.com/r/programming/comments/abc123/title/`, `https://redd.it/abc123`), starting with `https://`, with `www.`, `old.` or no prefix (`https://reddit.com/r/python/`). A sort or window inside a subreddit link wins over the settings below for that link. A post link returns that post's row only, without comments. Not served and refused at start with the reason: `new` and `rising` links, `r/all`, search links, a user's comments page and other sites.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "hot",
              "top",
              "controversial",
              "best"
            ],
            "type": "string",
            "description": "The order of a subreddit's posts, for subreddit sources without their own sort: Hot, Top, Controversial or Best. New and Rising are not served: Reddit does not give them to this kind of visitor.",
            "default": "hot"
          },
          "timeFilter": {
            "title": "Time window",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "The period for Top and Controversial: hour, day, week, month, year or all time. Ignored for Hot and Best.",
            "default": "week"
          },
          "postedAfter": {
            "title": "Only posts newer than",
            "type": "string",
            "description": "Keep only posts created on or after this date (`2026-11-01`) or relative time (`7 days`, `2 weeks`, `3 months`). It filters the posts the listing returns, up to Posts per source, and cannot reach further back than the listing does (up to about 1,000 posts). It does not create a New feed."
          },
          "includeNsfw": {
            "title": "Include NSFW posts",
            "type": "boolean",
            "description": "On by default so the export matches what the listing shows. Turn it off to skip posts Reddit marks NSFW; skipped posts are not saved and not charged.",
            "default": true
          },
          "maxPostsPerSource": {
            "title": "Posts per source",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "The most posts read from each subreddit, `r/popular` or user, 1 to 1,000. Default 10. Reddit ends a listing at up to about 1,000 posts, and some Top and Controversial listings end sooner, so a larger number returns what the listing has. A post link always returns one post.",
            "default": 10
          },
          "maxItems": {
            "title": "Maximum posts in total",
            "minimum": 0,
            "type": "integer",
            "description": "Stops the run after this many rows over all sources. Default 100, which keeps a first run quick; set 0 for no cap. Each row is one result you pay for. The run also stops cleanly when your maximum cost per run is reached, and keeps every row it saved.",
            "default": 100
          },
          "includePersonalData": {
            "title": "Include author names (personal data)",
            "type": "boolean",
            "description": "On by default: the author name, profile link and author flair are in every row. Turn it off to set them to `null`. Usernames are personal data, so you need a lawful basis under privacy laws such as the GDPR to keep them.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "No proxy by default. Without a proxy Reddit allows about 100 requests per 10 minutes per network address, shared with other users of it, and a run that meets the limit waits up to 2 minutes for it to reset (up to about 10 minutes after every 1,000 posts saved), otherwise stops early and keeps its rows. Apify Proxy (datacenter) spreads requests over more addresses; residential Apify Proxy is also accepted. Search-engine proxies and custom proxy URLs are not supported: the run stops at start with a message and saves no rows.",
            "default": {
              "useApifyProxy": 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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}