{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper - Monitoring, Signals & Attention Queue",
    "description": "Scrapes Reddit and returns a ranked attention queue: brand monitoring, mention tracking, sentiment analysis, and breakout detection in one run. Drop-in compatible with existing Reddit scraper workflows. $0.002 per record.",
    "version": "1.0",
    "x-build-id": "OWGdj2AxuCacRlyBv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ryanclinton~reddit-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ryanclinton-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/ryanclinton~reddit-scraper/runs": {
      "post": {
        "operationId": "runs-sync-ryanclinton-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/ryanclinton~reddit-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-ryanclinton-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "monitor",
              "communities",
              "posts",
              "users",
              "search"
            ],
            "type": "string",
            "description": "Entry point. 'monitor' is the hero: paste a brand/keyword and get a ranked attention queue of what changed. 'communities' ranks subreddits by what's heating up. 'posts' explains why each thread matters. 'users' surfaces author momentum. 'search' reranks search results by breakout potential. Leave fields below empty to use the monitor demo (tracks 'Notion').",
            "default": "monitor"
          },
          "track": {
            "title": "Track (brand / keyword)",
            "type": "array",
            "description": "Monitor mode: brand names or keywords to track across Reddit. The actor returns the threads that need attention right now, ranked. Example: [\"Notion\", \"Obsidian\"].",
            "default": [
              "Notion"
            ],
            "items": {
              "type": "string"
            }
          },
          "communities": {
            "title": "Communities (subreddits)",
            "type": "array",
            "description": "Communities to scan or monitor. Accepts 'r/Notion', 'Notion', or a full subreddit URL. Used by communities and monitor modes.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "posts": {
            "title": "Post URLs",
            "type": "array",
            "description": "Posts mode: Reddit post permalinks to analyse. Each result carries whyThisMatters plus comment-theme synthesis when comments are sampled.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "users": {
            "title": "User profiles",
            "type": "array",
            "description": "Users mode: Reddit usernames or profile URLs to analyse for posting/karma momentum.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Search mode: a keyword/phrase. Results are reranked by the rankBy axis (breakout potential, momentum, or attention) rather than Reddit's native sort.",
            "default": ""
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "posts",
              "communities",
              "users"
            ],
            "type": "string",
            "description": "Search mode: what to search for.",
            "default": "posts"
          },
          "rankBy": {
            "title": "Rank by",
            "enum": [
              "attention",
              "breakoutPotential",
              "momentum",
              "engagement",
              "recency",
              "relevance"
            ],
            "type": "string",
            "description": "How to order results in the attention queue. 'attention' uses the composite attentionIndex. 'breakoutPotential' surfaces posts popping vs their community baseline. 'momentum' surfaces accelerating trajectories.",
            "default": "attention"
          },
          "watchlistName": {
            "title": "Watchlist name",
            "type": "string",
            "description": "Name this watchlist to unlock delta intelligence. State is stored in a named key-value store ('reddit-monitor-<name>') and accumulates across runs: what changed since last run, momentum trajectory, recurrence, and topic memory. Leave empty for a one-shot run with no persistence.",
            "default": ""
          },
          "deltaWindowDays": {
            "title": "Delta window (days)",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "Window for run-over-run change detection in monitor/watchlist mode.",
            "default": 7
          },
          "persona": {
            "title": "Persona",
            "enum": [
              "brand-monitoring",
              "trend-research",
              "community-discovery",
              "pr-comms",
              "generic"
            ],
            "type": "string",
            "description": "Reshapes materiality weights and escalation thresholds. 'brand-monitoring' weights mentions + sentiment. 'pr-comms' escalates sentiment shifts. 'trend-research' escalates topic surges and community acceleration. Orthogonal to mode and rankBy.",
            "default": "brand-monitoring"
          },
          "includeCommentsSample": {
            "title": "Sample comments",
            "type": "boolean",
            "description": "Sample comments per post and run deterministic theme + sentiment synthesis (lexicon-tfidf-v1, no external LLM). Required for sentiment shift detection.",
            "default": false
          },
          "commentsSamplePerPost": {
            "title": "Comments sampled per post",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many comments to sample per post for theme + sentiment synthesis. Higher samples raise the sentiment confidence band.",
            "default": 100
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on records emitted. Reddit lists cap at ~1,000 items platform-wide; use monitor mode with scheduled daily runs to capture beyond the cap incrementally.",
            "default": 100
          },
          "maxPostsPerCommunity": {
            "title": "Max posts per community",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Per-community post cap for communities/monitor modes.",
            "default": 100
          },
          "maxRecentItems": {
            "title": "Max recent items per user",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Users mode: how many recent posts/comments to pull per user.",
            "default": 50
          },
          "outputProfile": {
            "title": "Output profile",
            "enum": [
              "signals",
              "compat",
              "agent",
              "minimal"
            ],
            "type": "string",
            "description": "'signals' (default) adds the full intelligence layer on top of the substrate. 'compat' returns the exact drop-in field set with no signal fields. 'agent' returns a compact decision surface for MCP/AI/RAG consumers. 'minimal' returns IDs and URLs only.",
            "default": "signals"
          },
          "analysisDepth": {
            "title": "Analysis depth",
            "enum": [
              "fast",
              "standard",
              "deep"
            ],
            "type": "string",
            "description": "Trades coverage/runtime. 'fast' is shallow, 'deep' scans more. 'standard' is the balanced default.",
            "default": "standard"
          },
          "explainability": {
            "title": "Explainability",
            "enum": [
              "standard",
              "full"
            ],
            "type": "string",
            "description": "Verbosity control. 'full' keeps all evidence, suppressed-signal, and score-breakdown blocks. 'standard' trims to the decision surface.",
            "default": "standard"
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "relevance",
              "hot",
              "top",
              "new",
              "comments"
            ],
            "type": "string",
            "description": "Reddit listing/search sort.",
            "default": "hot"
          },
          "time": {
            "title": "Time filter",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Time window for top/search sorts.",
            "default": "month"
          },
          "includeNSFW": {
            "title": "Include NSFW",
            "type": "boolean",
            "description": "Include over-18 communities/posts in results.",
            "default": false
          },
          "maxRuntimeSeconds": {
            "title": "Max runtime (seconds)",
            "minimum": 60,
            "maximum": 7200,
            "type": "integer",
            "description": "Hard runtime budget. The actor stops fetching cleanly when reached and still emits partial results plus a summary, so you never get a hard-killed empty run. Auto-clamped against the platform timeout to reserve emit time.",
            "default": 3600
          },
          "startUrls": {
            "title": "Start URLs (compatibility)",
            "type": "array",
            "description": "Drop-in compatibility alias. Paste post/user/community URLs from your existing Reddit-scraper workflow and they are mapped to the modes above automatically.",
            "default": []
          },
          "searches": {
            "title": "Searches (compatibility)",
            "type": "array",
            "description": "Drop-in compatibility alias for keyword search. Mapped to search mode.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchCommunityName": {
            "title": "Restrict search to community (compatibility)",
            "type": "string",
            "description": "Drop-in compatibility alias: restrict search to one community.",
            "default": ""
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. Residential proxies are recommended for Reddit. Defaults to Apify residential proxy when left unset.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}