{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper — Posts & Comments | from $2/1K",
    "description": "Collect public Reddit posts and comments from the Arctic Shift archive. Get structured records with scores, timestamps, links, authors, and quality fields. Run with subreddit or user targets; no buyer API key or OAuth login. Pricing: $0.002 per Reddit result on Free, plus $0.00005 per Actor Start.",
    "version": "0.1",
    "x-build-id": "NZZgzxRARDE4hY5aR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bovi~reddit-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bovi-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/bovi~reddit-scraper/runs": {
      "post": {
        "operationId": "runs-sync-bovi-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/bovi~reddit-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-bovi-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": {
          "subreddits": {
            "title": "Subreddits",
            "type": "array",
            "description": "Subreddit names to scrape posts from. Each item is a subreddit name (with or without 'r/' prefix). Example: ['python', 'learnpython', 'machinelearning']. Use this for topic/community-based sampling.",
            "items": {
              "type": "string"
            }
          },
          "urls": {
            "title": "Reddit URLs",
            "type": "array",
            "description": "Full Reddit URLs to scrape. Supports subreddit listing pages and user profile pages. Example: ['https://www.reddit.com/r/python/', 'https://www.reddit.com/user/spez/']. Use when you have a direct link rather than a subreddit name.",
            "items": {
              "type": "string"
            }
          },
          "users": {
            "title": "Reddit Users",
            "type": "array",
            "description": "Reddit usernames to scrape posts and comments from. Each item is a username (with or without 'u/' prefix). Example: ['spez', 'gallowboob']. Use for user activity research.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum number of posts (or comments) to return per subreddit or user. In community discovery this is the total across all discovered communities. Keep low (25–100) for agent mid-conversation sampling; use higher values (500+) for bulk research exports.",
            "default": 100
          },
          "sort": {
            "title": "Sort Order",
            "enum": [
              "new",
              "old",
              "top"
            ],
            "type": "string",
            "description": "Sort order for results. 'new' returns most recent posts first (default, best for current sentiment). 'old' returns oldest posts first. 'top' ranks the posted time window by archive snapshot score (the last 7 days when postedAfter/postedBefore are not set).",
            "default": "new"
          },
          "searchQuery": {
            "title": "Search Query",
            "type": "string",
            "description": "Filter posts by title keyword. Works in combination with subreddits — e.g. set subreddits=['python'] and searchQuery='async' to find Python posts about async. Leave empty to get all posts in the subreddit."
          },
          "includeComments": {
            "title": "Include Comments",
            "type": "boolean",
            "description": "Set to true to also collect comments, in addition to posts. Comments appear as separate records with type='comment'. Increases result count and run cost. Default: false (posts only).",
            "default": false
          },
          "postedAfter": {
            "title": "Posts after",
            "type": "string",
            "description": "Optional UTC start of the post window. Accepts an absolute date (2026-10-01), ISO datetime, or a relative value such as 7 days, 12 hours, 2 weeks, or 3 months. Relative values are resolved once when the run starts."
          },
          "postedBefore": {
            "title": "Posts before",
            "type": "string",
            "description": "Optional UTC end of the post window. Accepts an absolute date, ISO datetime, or relative value such as 7 days. Relative values are resolved once when the run starts."
          },
          "commentedAfter": {
            "title": "Comments after",
            "type": "string",
            "description": "Optional UTC start of the comment window. Accepts an absolute date, ISO datetime, or relative value such as 12 hours. Relative values are resolved once when the run starts."
          },
          "commentedBefore": {
            "title": "Comments before",
            "type": "string",
            "description": "Optional UTC end of the comment window. Accepts an absolute date, ISO datetime, or relative value such as 2 weeks. Relative values are resolved once when the run starts."
          },
          "searchQueries": {
            "title": "Search Queries",
            "type": "array",
            "description": "Optional list of post search terms. Each term is searched for each subreddit or user target and merged with searchQuery; duplicate rows are removed.",
            "items": {
              "type": "string"
            }
          },
          "searchIn": {
            "title": "Search In",
            "enum": [
              "title",
              "body",
              "both"
            ],
            "type": "string",
            "description": "Archive search field for searchQuery and searchQueries: title, body, or both. Without this input, the existing title-search behavior is used."
          },
          "commentKeywords": {
            "title": "Comment Keywords",
            "type": "array",
            "description": "Optional comment body terms searched for each subreddit or user. Without a post search term, matching comments are returned without fetching posts. With searchQuery or searchQueries, both post and comment rows are returned, even when includeComments is false.",
            "items": {
              "type": "string"
            }
          },
          "filterKeywords": {
            "title": "Filter Keywords",
            "type": "array",
            "description": "Optional client-side terms matched case-insensitively against post title/body or comment body.",
            "items": {
              "type": "string"
            }
          },
          "filterKeywordMode": {
            "title": "Filter Keyword Mode",
            "enum": [
              "any",
              "all",
              "exactPhrase"
            ],
            "type": "string",
            "description": "How filterKeywords are applied: any term, all terms, or an exact phrase substring. With filterKeywords set and no mode, any is used."
          },
          "discoverCommunities": {
            "title": "Discover Communities",
            "type": "boolean",
            "description": "For keyword-only searches without subreddit, user, URL, or post targets, find up to three communities whose names start with each keyword, ordered by subscribers. This matches community names, not topics, and does not search all Reddit. maxItems is the total across the discovered communities."
          },
          "minScore": {
            "title": "Minimum Score",
            "type": "integer",
            "description": "Client-side minimum score. Score is an archive snapshot taken about 36 hours after posting, not a live score."
          },
          "minComments": {
            "title": "Minimum Comments",
            "type": "integer",
            "description": "Client-side minimum post comment count. The count is an archive snapshot taken about 36 hours after posting, not a live count."
          },
          "flairs": {
            "title": "Flairs",
            "type": "array",
            "description": "Optional post flair names. Each flair is requested in a separate archive pass and matching rows are deduplicated.",
            "items": {
              "type": "string"
            }
          },
          "includeNsfw": {
            "title": "Include NSFW",
            "type": "boolean",
            "description": "Absent preserves today's results. Set false to drop posts marked over_18 by the archive."
          },
          "excludeAuthors": {
            "title": "Exclude Authors",
            "type": "array",
            "description": "Optional case-insensitive author names to omit from post and comment results.",
            "items": {
              "type": "string"
            }
          },
          "skipStickied": {
            "title": "Skip Stickied",
            "type": "boolean",
            "description": "When true, omit stickied posts and comments."
          },
          "skipBots": {
            "title": "Skip Bots",
            "type": "boolean",
            "description": "When true, omit authors ending in bot and the AutoModerator account."
          },
          "excludeRemoved": {
            "title": "Exclude Removed",
            "type": "boolean",
            "description": "When true, omit rows marked removed or deleted by the archive metadata."
          },
          "posts": {
            "title": "Exact Posts",
            "type": "array",
            "description": "Optional exact post IDs or Reddit post URLs, including redd.it and Reddit comments URLs. Invalid references are not sent to the archive. Fetches each post by archive ID and its comments through link_id, up to maxCommentsPerPost.",
            "items": {
              "type": "string"
            }
          },
          "commentsMode": {
            "title": "Comments Mode",
            "enum": [
              "subreddit",
              "perPost"
            ],
            "type": "string",
            "description": "With includeComments=true, subreddit collects the existing subreddit-wide stream; perPost collects comments by each returned post link_id. perPost requires includeComments=true."
          },
          "maxCommentsPerPost": {
            "title": "Max Comments Per Post",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "For subreddit or user targets with includeComments=true, maximum comments per post. Exact posts targets also include comments up to this value. Default: 50. Lower this to reduce token volume when using results with an AI agent.",
            "default": 50
          },
          "maxCommentDepth": {
            "title": "Maximum Comment Depth",
            "type": "integer",
            "description": "Optional client-side maximum comment depth."
          },
          "userContent": {
            "title": "User Content",
            "enum": [
              "posts",
              "comments",
              "both"
            ],
            "type": "string",
            "description": "For user targets, collect posts, comments, or both. Without this input, the existing user behavior is used."
          },
          "includeUserProfiles": {
            "title": "Include User Profiles",
            "type": "boolean",
            "description": "Add one user summary row per user target with archive karma, activity counts and dates, and up to ten top interaction communities."
          },
          "includeCommunityInfo": {
            "title": "Include Community Info",
            "type": "boolean",
            "description": "Add one community summary row per subreddit target with subscribers, description, creation date, and NSFW flag when available."
          },
          "onlyNew": {
            "title": "Only New Rows",
            "type": "boolean",
            "description": "Keep a named cursor and up to 5,000 seen row IDs for scheduled runs. The first run returns the newest rows; later runs return the oldest unseen rows first, regardless of sort, and continue from the last row pushed."
          },
          "watchName": {
            "title": "Watch Name",
            "type": "string",
            "description": "Required when onlyNew is true. Names a persistent store and accepts 1-40 letters, digits, or dashes."
          },
          "extendedFields": {
            "title": "Extended Fields",
            "type": "boolean",
            "description": "Add optional post/comment archive fields and removal metadata. Missing source values are null."
          },
          "addSignals": {
            "title": "Add Signals",
            "type": "boolean",
            "description": "Add deterministic rule-based English sentiment and intent signals. This is rule-based, English only, and not AI."
          },
          "trackTerms": {
            "title": "Track Terms",
            "type": "array",
            "description": "Optional terms to list in signals.matchedTerms when they appear in a returned post or comment.",
            "items": {
              "type": "string"
            }
          },
          "addMarkdown": {
            "title": "Add Markdown",
            "type": "boolean",
            "description": "Add a clean labeled markdown text block for AI pipelines."
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Optional Apify proxy settings. This actor uses Arctic Shift (a free Reddit archive API) and does not require proxy for most runs. Enable only if your network blocks the archive endpoint."
          },
          "disableUsageStats": {
            "title": "Disable usage statistics",
            "type": "boolean",
            "description": "See the README Usage statistics section for details.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}