{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper — Posts, Comments, Subreddits | MCP + AI",
    "description": "Scrape Reddit posts, users, subreddits and other data with affordable ScrapeBadger Reddit Scraper. High success rates and fast support. 20 modes: posts, comment trees, subreddits, rules, wiki, user data, keyword & domain search, trending. No Reddit API key needed. From $1.00/1K items.",
    "version": "1.0",
    "x-build-id": "NU7s2Bs91bOiJ9Evc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrape.badger~reddit-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrape.badger-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/scrape.badger~reddit-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrape.badger-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/scrape.badger~reddit-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrape.badger-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "Search Posts",
              "Search Subreddits",
              "Search Users",
              "Search Domain Posts",
              "Trending Posts",
              "Get Post Detail",
              "Post Comments",
              "Post Duplicates",
              "Get Subreddit Detail",
              "Subreddit Posts",
              "Get Subreddit Rules",
              "List Subreddit Wiki Pages",
              "Get Subreddit Wiki Page",
              "Popular Subreddits",
              "New Subreddits",
              "Get User Profile",
              "User Posts",
              "User Comments",
              "Get User Moderated Subreddits",
              "Get User Trophies"
            ],
            "type": "string",
            "description": "The type of Reddit data to extract. Each mode uses a different subset of the fields below (see each field's description for which modes need it).",
            "default": "Search Posts"
          },
          "subreddit": {
            "title": "Subreddit",
            "type": "string",
            "description": "Subreddit name without the r/ prefix (e.g. 'programming'). REQUIRED for: Get Subreddit Detail, Subreddit Posts, Get Subreddit Rules, List Subreddit Wiki Pages, Get Subreddit Wiki Page. OPTIONAL for Search Posts (restricts the search to this community)."
          },
          "post_id": {
            "title": "Post ID",
            "type": "string",
            "description": "Reddit post ID without the t3_ prefix (e.g. 'abc123'). REQUIRED for: Get Post Detail, Post Comments, Post Duplicates."
          },
          "wiki_page": {
            "title": "Wiki Page",
            "type": "string",
            "description": "Wiki page path (e.g. 'index' or 'rules/posting'). REQUIRED for: Get Subreddit Wiki Page."
          },
          "username": {
            "title": "Username",
            "type": "string",
            "description": "Reddit username without the u/ prefix. REQUIRED for: Get User Profile, User Posts, User Comments, Get User Moderated Subreddits, Get User Trophies."
          },
          "query": {
            "title": "Search Query",
            "type": "string",
            "description": "Keywords to search. REQUIRED for: Search Posts, Search Subreddits, Search Users."
          },
          "domain": {
            "title": "Domain",
            "type": "string",
            "description": "Domain to find link posts for (e.g. 'github.com'). REQUIRED for: Search Domain Posts."
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "relevance",
              "hot",
              "top",
              "new",
              "rising",
              "comments"
            ],
            "type": "string",
            "description": "Sort order for posts/listings. Used by: Search Posts, Search Domain Posts, Subreddit Posts, User Posts, User Comments.",
            "default": "new"
          },
          "time_filter": {
            "title": "Time Filter",
            "enum": [
              "all",
              "hour",
              "day",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Time window for ranked sorts. Used by: Search Posts, Search Domain Posts, Subreddit Posts, User Posts, User Comments.",
            "default": "all"
          },
          "comment_sort": {
            "title": "Comment Sort",
            "enum": [
              "best",
              "top",
              "new",
              "controversial",
              "old",
              "qa"
            ],
            "type": "string",
            "description": "Sort order for comments. Used only by: Post Comments.",
            "default": "best"
          },
          "depth": {
            "title": "Comment Depth",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum nesting depth of the comment reply tree. Leave empty for full depth. Used only by: Post Comments."
          },
          "max_results": {
            "title": "Max Results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of items to return for list/search modes. Higher values increase run time and cost. Note: Reddit caps most public listings at ~1000 items.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}