{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper — Posts, Users & Subreddits | $0.90/1K",
    "description": "Scrape Reddit posts, user history, subreddit info and feeds: subreddit posts, single posts and duplicates, user posts/comments/overview, subreddit details with rules, directories, autocomplete. No login needed. Pay per result.",
    "version": "0.2",
    "x-build-id": "DCvkXNxrtk9JvET4h"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/agentxpro~reddit-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-agentxpro-reddit-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/agentxpro~reddit-scraper/runs": {
      "post": {
        "operationId": "runs-sync-agentxpro-reddit-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/agentxpro~reddit-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-agentxpro-reddit-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": {
          "directory": {
            "title": "Directory",
            "enum": [
              "popular",
              "new"
            ],
            "type": "string",
            "description": "Subreddit directory mode: which directory to list.",
            "default": "popular"
          },
          "feedSource": {
            "title": "Feed source",
            "enum": [
              "front",
              "popular"
            ],
            "type": "string",
            "description": "Feed mode: the front page (r/hot across Reddit) or r/popular.",
            "default": "front"
          },
          "includeNsfw": {
            "title": "Include NSFW posts",
            "type": "boolean",
            "description": "Off (default): posts marked NSFW are dropped before delivery and are never charged. On: they are included.",
            "default": false
          },
          "includeRules": {
            "title": "Include subreddit rules",
            "type": "boolean",
            "description": "Subreddit info mode: also attach the subreddit's rules and Reddit's site rules to each subreddit row.",
            "default": false
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "subredditPosts",
              "postDetails",
              "postDuplicates",
              "userPosts",
              "userComments",
              "userOverview",
              "subredditInfo",
              "subredditDirectory",
              "feed",
              "autocomplete",
              "startUrls"
            ],
            "type": "string",
            "description": "What to scrape. subredditPosts: posts from one or more subreddits. postDetails: one post per URL/ID. postDuplicates: every other post that shared the same link. userPosts / userComments / userOverview: a user's history. subredditInfo: details for one or more subreddits. subredditDirectory: popular or new subreddits. feed: the front page or r/popular. autocomplete: subreddits matching a partial name. startUrls: paste any reddit.com links and each is routed automatically.",
            "default": "subredditPosts"
          },
          "postUrls": {
            "title": "Post URLs or IDs",
            "type": "array",
            "description": "Post details / duplicates modes: post URLs, redd.it links, post IDs or t3_ IDs. One row per post found.",
            "items": {
              "type": "string"
            }
          },
          "query": {
            "title": "Autocomplete query",
            "type": "string",
            "description": "Autocomplete mode: a partial subreddit name or keyword, e.g. 'tech'."
          },
          "resultsLimit": {
            "title": "Results limit per target",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum rows per target (per subreddit, per user, per feed). 1-1000.",
            "default": 100
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "hot",
              "top",
              "controversial",
              "new"
            ],
            "type": "string",
            "description": "Listing sort. Subreddit posts: hot, top, controversial (new and rising are not served to anonymous readers). User history: hot, new, top, controversial.",
            "default": "hot"
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Start URLs mode: any mix of reddit.com links — post links return the post, subreddit links return their posts, user links return their overview.",
            "items": {
              "type": "string"
            }
          },
          "subreddits": {
            "title": "Subreddits",
            "type": "array",
            "description": "Subreddit posts / info modes: subreddit names, r/name, or full reddit.com/r/... links.",
            "items": {
              "type": "string"
            }
          },
          "time": {
            "title": "Time filter",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Time window for the top and controversial sorts.",
            "default": "all"
          },
          "usernames": {
            "title": "Usernames",
            "type": "array",
            "description": "User modes: usernames, u/name, or full reddit.com/user/... links.",
            "items": {
              "type": "string"
            }
          },
          "agentContext": {
            "title": "AI agent context (agentContext)",
            "type": "boolean",
            "description": "Add an agentContext object to every delivered row: the post title + body, comment body, or subreddit title + description as clean text ready to paste into an LLM prompt, a source block (type, URL, title), a ready-to-paste citation with author, subreddit and date, an estimated token count and the retrieval time. Modelled on the response style AI-agent APIs use. Off by default; never changes charges.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}