{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Keyword Monitor - Brand Mentions, Leads, Alerts",
    "description": "Reddit keyword monitor for brand, competitor and buying-intent mentions: new Reddit posts and comments matching your keywords since the last run, with highlighted snippets, sentiment and webhook-ready alerts. Your own Reddit app key or proxies (shared pools 403 keyless). $0.50 per 1,000 matches.",
    "version": "0.1",
    "x-build-id": "5GhoLvg7XNNIoeZww"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/offgrid-labs~reddit-keyword-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-offgrid-labs-reddit-keyword-monitor",
        "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/offgrid-labs~reddit-keyword-monitor/runs": {
      "post": {
        "operationId": "runs-sync-offgrid-labs-reddit-keyword-monitor",
        "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/offgrid-labs~reddit-keyword-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-offgrid-labs-reddit-keyword-monitor",
        "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": {
          "clientId": {
            "title": "Reddit client ID (optional)",
            "type": "string",
            "description": "Optional. Client ID of your own Reddit app (the string under the app name at https://www.reddit.com/prefs/apps). Used only for application-only OAuth (client_credentials grant, read-only). Leave empty with the secret to use the public JSON path. Example: p-jcoLKBynTLew"
          },
          "clientSecret": {
            "title": "Reddit client secret (optional)",
            "type": "string",
            "description": "Optional. Secret of the same Reddit app (field labelled \"secret\" at https://www.reddit.com/prefs/apps). Stored encrypted by Apify; never logged. If the ID/secret is rejected, the actor falls back to the public JSON path."
          },
          "appName": {
            "title": "Your Reddit app name (User-Agent)",
            "type": "string",
            "description": "Name of your Reddit app, sent as a descriptive User-Agent when OAuth credentials are provided. Example: my-brand-monitor"
          },
          "redditUsername": {
            "title": "Your Reddit username (optional, User-Agent)",
            "type": "string",
            "description": "Optional. Reddit username that owns the app; appended to the User-Agent as (by /u/<name>). Not used to log in."
          },
          "keywords": {
            "title": "Keywords to monitor",
            "type": "array",
            "description": "Brand names, product names, competitor names or buying-intent phrases, one per line (max 50). Case-insensitive whole-word / whole-phrase match in post titles, post text and comments; a trailing * matches word prefixes (scrap* = scraper, scraping). Example: apify, \"looking for a scraper\"",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Optional. Items containing any of these words/phrases are dropped (not saved, not charged). Example: hiring, job offer",
            "items": {
              "type": "string"
            }
          },
          "subreddits": {
            "title": "Subreddits (empty = all of Reddit)",
            "type": "array",
            "description": "Optional. Subreddits to watch, one per line (webscraping, r/webscraping or the URL). With subreddits, every new post and comment in them is read back to the last run and matched locally (complete coverage). Empty = all of Reddit: posts via Reddit search per keyword, comments from the newest r/all comment stream (partial, see README).",
            "items": {
              "type": "string"
            }
          },
          "searchPosts": {
            "title": "Monitor posts",
            "type": "boolean",
            "description": "Find new posts whose title or text matches. Default true.",
            "default": true
          },
          "scanComments": {
            "title": "Monitor comments",
            "type": "boolean",
            "description": "Find new comments whose text matches. Default true.",
            "default": true
          },
          "lookbackHours": {
            "title": "First-run look-back (hours)",
            "minimum": 1,
            "maximum": 720,
            "type": "integer",
            "description": "How far back the FIRST run of a monitor looks. Later runs return only items newer than the previous run (state is kept in a named key-value store). Default 24. Example: 72",
            "default": 24
          },
          "monitorId": {
            "title": "Monitor ID (state key)",
            "type": "string",
            "description": "Optional. Name of this monitor's saved state, so several schedules can watch different keyword sets independently. Empty = derived from the keywords + subreddits (changing them starts a new monitor). Example: acme-brand"
          },
          "stateStoreName": {
            "title": "State key-value store name",
            "type": "string",
            "description": "Named key-value store (in your Apify account) that keeps the last-seen position per Monitor ID. Default reddit-keyword-monitor-state.",
            "default": "reddit-keyword-monitor-state"
          },
          "resetState": {
            "title": "Reset state (start over)",
            "type": "boolean",
            "description": "If true, ignore the saved state for this Monitor ID and look back First-run look-back hours again. Default false.",
            "default": false
          },
          "maxPostsPerKeyword": {
            "title": "Max search results per keyword",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "All-of-Reddit mode: maximum search results read per keyword per run (Reddit search stops at about 1,000). Default 250.",
            "default": 250
          },
          "maxItemsScanned": {
            "title": "Max items scanned per stream",
            "minimum": 25,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum posts or comments read from each new-posts / new-comments stream per run (each 100 items = 1 API request). Only matching items are saved and charged. Default 1000.",
            "default": 1000
          },
          "caseSensitive": {
            "title": "Case-sensitive matching",
            "type": "boolean",
            "description": "If true, keywords match only with the same capitalisation. Default false.",
            "default": false
          },
          "sentiment": {
            "title": "Add simple sentiment",
            "type": "boolean",
            "description": "If true (default), each match gets a lexicon-based sentiment (positive/negative/neutral) and score from -1 to 1. Free; computed locally, no AI service.",
            "default": true
          },
          "skipNsfw": {
            "title": "Skip NSFW (over 18)",
            "type": "boolean",
            "description": "If true, NSFW posts/comments are skipped and not charged. Default false.",
            "default": false
          },
          "demo": {
            "title": "Demo mode (fixed sample, not charged)",
            "type": "boolean",
            "description": "If true, the actor returns a small fixed sample built from your keywords (demo: true) without contacting Reddit, and never charges or changes monitor state. Turn it off for live monitoring (public JSON path or your own OAuth credentials).",
            "default": false
          },
          "publicRequestBudget": {
            "title": "Public path request budget",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum HTTP requests the public (no-credential) JSON path may make per run. Reaching it ends the run cleanly with whatever was collected. Ignored when OAuth credentials are used. Default 300.",
            "default": 300
          },
          "proxyList": {
            "title": "Proxy list (optional, secret)",
            "type": "string",
            "description": "One proxy per line (or comma-separated), as http(s)://user:pass@host:port or host:port (credentials optional). The actor rotates across them and fails over to the next healthy one on 403/429/5xx/timeout. Leave empty to connect directly (or pair with Use Apify proxy)."
          },
          "useApifyProxy": {
            "title": "Use Apify proxy",
            "type": "boolean",
            "description": "If true (and no proxy list is supplied), route requests through Apify's managed proxy using the group chosen below. Requires Apify proxy to be enabled for this actor. Default false.",
            "default": false
          },
          "proxyGroups": {
            "title": "Apify proxy group",
            "enum": [
              "DATACENTERS",
              "RESIDENTIAL",
              "UNBLOCKER"
            ],
            "type": "string",
            "description": "Apify proxy pool: DATACENTERS (fastest), RESIDENTIAL (rotating IPs), or UNBLOCKER (most reliable against blocking).",
            "default": "RESIDENTIAL"
          },
          "proxyRotation": {
            "title": "Proxy rotation strategy",
            "enum": [
              "round_robin",
              "random",
              "sticky_window"
            ],
            "type": "string",
            "description": "How proxies are chosen. round_robin cycles in order (default); random picks uniformly; sticky_window holds one proxy for the configured window then moves on. Default round_robin.",
            "default": "round_robin"
          },
          "stickyWindow": {
            "title": "Sticky window size",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Requests per proxy before rotating, when rotation strategy is sticky_window. Default 15.",
            "default": 15
          },
          "proxyMaxRetries": {
            "title": "Proxy failover retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many additional proxies to try after a request fails (403/429/5xx/timeout) before giving up on that request. Default 2.",
            "default": 2
          },
          "proxyMaxFailures": {
            "title": "Max failures before blacklisting a proxy",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Consecutive failures after which a proxy is blacklisted (skipped) for the rest of the run. A proxy-auth rejection (407/401) blacklists immediately. Default 5.",
            "default": 5
          },
          "userAgent": {
            "title": "Custom User-Agent (advanced, optional)",
            "type": "string",
            "description": "Optional. Overrides the default User-Agent sent on the public JSON path (ignored on the official Data API path)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}