{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Keyword Monitor & Brand Alerts",
    "description": "Monitor Reddit for brand mentions, competitors & keywords in real time. Scan any subreddit or all of Reddit, get instant Slack/webhook alerts, and export clean JSON. No API key needed — fast, lightweight, and schedule-ready. Perfect for PR, lead gen, and competitor tracking.",
    "version": "0.0",
    "x-build-id": "uphfJ0ZDxSs7t9Z1a"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/b2b_leads~reddit-keyword-monitor-brand-alerts/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-b2b_leads-reddit-keyword-monitor-brand-alerts",
        "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/b2b_leads~reddit-keyword-monitor-brand-alerts/runs": {
      "post": {
        "operationId": "runs-sync-b2b_leads-reddit-keyword-monitor-brand-alerts",
        "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/b2b_leads~reddit-keyword-monitor-brand-alerts/run-sync": {
      "post": {
        "operationId": "run-sync-b2b_leads-reddit-keyword-monitor-brand-alerts",
        "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": [
          "keywords"
        ],
        "properties": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Required. Brand names, competitors, product terms, or phrases to watch for in Reddit posts and comments.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "matchMode": {
            "title": "Match mode",
            "enum": [
              "substring",
              "word",
              "regex"
            ],
            "type": "string",
            "description": "How keywords are matched: substring (default), whole-word boundary, or regex pattern per keyword.",
            "default": "substring"
          },
          "caseSensitive": {
            "title": "Case sensitive matching",
            "type": "boolean",
            "description": "When enabled, keyword matching respects upper/lowercase. Off by default (case-insensitive).",
            "default": false
          },
          "ignoreKeywords": {
            "title": "Ignore keywords",
            "type": "array",
            "description": "Negative filters — if any of these appear in the text, the item is skipped even when a watch keyword matches.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "watchScope": {
            "title": "Watch scope",
            "enum": [
              "specific_subreddits",
              "all_reddit"
            ],
            "type": "string",
            "description": "Choose specific subreddits or scan all of Reddit site-wide via r/all.",
            "default": "specific_subreddits"
          },
          "subreddits": {
            "title": "Subreddits",
            "type": "array",
            "description": "Subreddit names or URLs to scan. Only used when watch scope is \"Specific subreddits\" — add at least one.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "stream": {
            "title": "Content stream",
            "enum": [
              "posts",
              "comments",
              "both"
            ],
            "type": "string",
            "description": "Whether to scan new comments, new posts, or both for keyword matches.",
            "default": "both"
          },
          "runMode": {
            "title": "Run mode",
            "enum": [
              "once",
              "scheduled_monitor"
            ],
            "type": "string",
            "description": "One-off: scan the lookback window, return matches, and stop (default). Scheduled monitor: remember position between runs — use with Apify Scheduler for continuous alerts.",
            "default": "once"
          },
          "lookback": {
            "title": "Lookback items",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Number of newest posts/comments to scan per subreddit per stream (1–1000). The Actor auto-paginates beyond a single page. Higher values give deeper coverage but cost slightly more per run.",
            "default": 100
          },
          "sinceId": {
            "title": "Since fullname (incremental cursor)",
            "type": "string",
            "description": "Optional Reddit fullname (e.g. t1_abc123 or t3_xyz). In scheduled monitor mode, combined with persisted state so only newer items are returned.",
            "default": ""
          },
          "maxMatches": {
            "title": "Max matches per run",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many matches in a single run. 0 = unlimited.",
            "default": 0
          },
          "titleOnly": {
            "title": "Match post titles only",
            "type": "boolean",
            "description": "For posts, match keywords in the title only (ignore selftext/body). Comments are always matched on body text.",
            "default": false
          },
          "minUpvotes": {
            "title": "Minimum upvotes",
            "minimum": 0,
            "type": "integer",
            "description": "Only emit matches with at least this many upvotes. Set to 0 to disable.",
            "default": 0
          },
          "includeNsfw": {
            "title": "Include NSFW posts",
            "type": "boolean",
            "description": "Include posts marked over_18 (NSFW). Off by default for brand-safe monitoring.",
            "default": false
          },
          "authorAllowlist": {
            "title": "Author allowlist",
            "type": "array",
            "description": "If set, only posts/comments from these usernames are considered. Empty = all authors allowed.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "authorDenylist": {
            "title": "Author denylist",
            "type": "array",
            "description": "Usernames to exclude from matching (spam bots, competitors, etc.).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Optional URL to POST an alert on each match. Matches are always saved to the dataset (required for billing) — webhooks fire in addition, not instead.",
            "default": ""
          },
          "webhookFormat": {
            "title": "Webhook format",
            "enum": [
              "json",
              "slack"
            ],
            "type": "string",
            "description": "json = compact JSON payload; slack = Slack-compatible message with link button.",
            "default": "json"
          },
          "includeRaw": {
            "title": "Include raw Reddit JSON",
            "type": "boolean",
            "description": "Attach the full raw Reddit object under the raw field (larger output).",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy settings",
            "type": "object",
            "description": "Use Apify Proxy with US Residential for best results on Reddit runs.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}