{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Historical Archive Scraper",
    "description": "Access 10+ years of archived Reddit posts and comments via PullPush. Full-text comment search (Reddit can't do this). No login, no proxy. $0.001/item.",
    "version": "0.0",
    "x-build-id": "cI600pui0ZFEEdu9L"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/logiover~reddit-historical-archive-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-logiover-reddit-historical-archive-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/logiover~reddit-historical-archive-scraper/runs": {
      "post": {
        "operationId": "runs-sync-logiover-reddit-historical-archive-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/logiover~reddit-historical-archive-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-logiover-reddit-historical-archive-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": "List of subreddit names to scrape historically (no /r/ prefix needed). Each runs as a listing scrape. Example: ['programming', 'wallstreetbets', 'askhistorians']",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "postIds": {
            "title": "Post IDs",
            "type": "array",
            "description": "Reddit post IDs (the alphanumeric piece in /comments/XXXX/). Each post is fetched along with ALL of its archived comments (flat list with reconstructed depth field).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "usernames": {
            "title": "Usernames",
            "type": "array",
            "description": "Reddit usernames to scrape (no /u/ prefix needed). Returns the user's historical posts and/or comments based on `userContent`. Excellent for tracking the full Reddit history of an account.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Post Search Queries",
            "type": "array",
            "description": "Full-text search across all archived Reddit POSTS. PullPush's unique advantage: Reddit-wide FTS (Full Text Search) on title + selftext. Can be combined with date ranges, subreddit filters, score thresholds.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "commentSearchQueries": {
            "title": "Comment Search Queries",
            "type": "array",
            "description": "Full-text search across all archived Reddit COMMENTS. This is a UNIQUE FEATURE — Reddit's own search cannot search comment bodies, only post titles. Use this to find every comment ever made mentioning a brand, term, or phrase across all of Reddit history.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Reddit URLs (auto-detected)",
            "type": "array",
            "description": "Any Reddit URL — subreddit, post, user, or search. The scraper auto-detects the type. Mix and match URL types in one input.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "new",
              "top",
              "hot",
              "rising",
              "controversial",
              "best"
            ],
            "type": "string",
            "description": "How to sort results. 'new' (newest archived first) and 'top' (highest score first) are natively supported. 'hot', 'rising', 'controversial', 'best' are Reddit-algorithm-specific and not supported — they fall back to 'new'.",
            "default": "new"
          },
          "afterDate": {
            "title": "After Date (ISO)",
            "type": "string",
            "description": "Only return posts/comments created AFTER this ISO date. Format: YYYY-MM-DD or full ISO timestamp. Powerful for time-bounded historical analysis. Example: '2023-01-01'",
            "default": null
          },
          "beforeDate": {
            "title": "Before Date (ISO)",
            "type": "string",
            "description": "Only return posts/comments created BEFORE this ISO date. Combine with afterDate for precise time-window queries. Example: '2024-12-31'",
            "default": null
          },
          "minScore": {
            "title": "Minimum Score",
            "type": "integer",
            "description": "Only return posts/comments with score (upvotes - downvotes) at or above this value. Useful for filtering to viral or high-engagement content. Leave empty for no filter.",
            "default": null
          },
          "userContent": {
            "title": "User Content Type",
            "enum": [
              "overview",
              "submitted",
              "comments"
            ],
            "type": "string",
            "description": "When scraping users, choose what to return: both submitted posts and comments, only posts, or only comments.",
            "default": "overview"
          },
          "maxItems": {
            "title": "Max Items (Global)",
            "minimum": 0,
            "type": "integer",
            "description": "Total cap across ALL targets. Hard ceiling. `0` = unlimited."
          },
          "maxItemsPerTarget": {
            "title": "Max Items Per Target",
            "minimum": 0,
            "type": "integer",
            "description": "Cap per subreddit / post / user / search. Prevents one big target from eating the budget."
          },
          "requestDelayMs": {
            "title": "Request Delay (ms)",
            "minimum": 100,
            "type": "integer",
            "description": "Milliseconds between requests. PullPush hard limit is ~30/min — 2200ms (default) keeps you safely under. Lower at your own risk.",
            "default": 2200
          },
          "maxRetries": {
            "title": "Max Retries on 429/5xx",
            "minimum": 0,
            "type": "integer",
            "description": "Retry attempts with exponential backoff on rate limits and server errors.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}