{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper & API: Posts, Full Comment Threads, Users",
    "description": "Reddit comments and subreddit posts as rows: full comment threads with replies, parent and depth, plus posts from subreddits, user profiles and keyword searches with title, text, author, upvotes, comment count, flair and links. No Reddit account or API key. Exporta hilos de Reddit.",
    "version": "0.3",
    "x-build-id": "gxlNMeNtG05Wv6qKY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automatic~reddit-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automatic-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/automatic~reddit-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automatic-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/automatic~reddit-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automatic-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": {
          "startUrls": {
            "title": "Subreddits, users or post links",
            "type": "array",
            "description": "One per line: a subreddit (r/python or a reddit.com/r/... link), a user (u/name or a reddit.com/user/... link), a post link (its comments are collected too) or a Reddit search link.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "searchQueries": {
            "title": "Search Reddit",
            "type": "array",
            "description": "Searches across all of Reddit, one per line, exactly as you would type them into Reddit's search box. Tip: add subreddit:name to search inside one community.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "sort": {
            "title": "Sort subreddit and user posts by",
            "enum": [
              "hot",
              "new",
              "top",
              "rising",
              "controversial"
            ],
            "type": "string",
            "description": "Hot, New, Top, Rising or Controversial. A sort inside a subreddit link (reddit.com/r/name/top) takes precedence.",
            "default": "hot"
          },
          "timeFilter": {
            "title": "Time window",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "For Top and Controversial sorting and for searches: past hour, day, week, month, year or all time.",
            "default": "week"
          },
          "searchSort": {
            "title": "Sort search results by",
            "enum": [
              "relevance",
              "hot",
              "top",
              "new",
              "comments"
            ],
            "type": "string",
            "description": "Relevance, Hot, Top, New or Most comments.",
            "default": "relevance"
          },
          "postedAfter": {
            "title": "Only posts newer than",
            "type": "string",
            "description": "Skip posts created before this point: a date (2026-11-01), a date-time in UTC (2026-11-01T12:00:00Z) or a period such as 24 hours, 7 days, 2 weeks or 1 month. Skipped posts are not charged. With New sorting the listing stops at the first older post."
          },
          "maxPostsPerSource": {
            "title": "Posts per subreddit, user or search",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many posts to collect from each source. Reddit lists at most about 1,000 posts per subreddit listing; a user source gives that user's most recent posts (about 25).",
            "default": 25
          },
          "includeScores": {
            "title": "Vote scores and comment counts",
            "type": "boolean",
            "description": "Subreddit and user metadata is always kept where available. For search results and post links, keep displayed scores, comment counts, NSFW flags and post type. No separate enrichment requests are made.",
            "default": true
          },
          "includeComments": {
            "title": "Collect comments of every post",
            "type": "boolean",
            "description": "Also collect the comment thread of each post found in subreddits, users and searches, with full reply threads. Post links always include their comments. Each comment is one row.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Comments per post",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum comments per post, with each comment's score, reply depth and parent. Top-level comments come first, then deeper replies, including the ones Reddit folds behind \"more replies\".",
            "default": 100
          },
          "includeRemovedComments": {
            "title": "Keep removed and image-only comments",
            "type": "boolean",
            "description": "Also save comments that have no text: removed or deleted comments and image or GIF replies, flagged with isRemoved and isMediaOnly. Off by default, so every comment row has text.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum rows in total",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Total cap on posts plus comments across every source. The run stops when it is reached.",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "Proxy (keep the default)",
            "type": "object",
            "description": "Preconfigured to Apify RESIDENTIAL, US, which every Apify plan can use. Other proxy settings are refused with a clear input error before any browsing.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}