{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Brand Mention Monitor & Sentiment Alerts",
    "description": "Track every new Reddit post and comment that names your brand or your competitors. Each run returns only mentions you have not seen before — with positive, neutral or negative sentiment, the sentence around the mention and a direct link to reply. Built to run hourly or daily behind an alert.",
    "version": "0.0",
    "x-build-id": "Ib3jgq5aW0RKxROej"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apt_marble~reddit-brand-mention-monitor-sentiment-alerts/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apt_marble-reddit-brand-mention-monitor-sentiment-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/apt_marble~reddit-brand-mention-monitor-sentiment-alerts/runs": {
      "post": {
        "operationId": "runs-sync-apt_marble-reddit-brand-mention-monitor-sentiment-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/apt_marble~reddit-brand-mention-monitor-sentiment-alerts/run-sync": {
      "post": {
        "operationId": "run-sync-apt_marble-reddit-brand-mention-monitor-sentiment-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": [
          "brandKeywords"
        ],
        "properties": {
          "brandKeywords": {
            "title": "Brand keywords",
            "type": "array",
            "description": "The names you want to hear about — your product, your company, a handle, a domain. Multi-word terms are matched as an exact phrase. Every result is guaranteed to contain the term verbatim.",
            "default": [
              "ChatGPT"
            ],
            "items": {
              "type": "string"
            }
          },
          "competitorKeywords": {
            "title": "Competitor keywords",
            "type": "array",
            "description": "Optional. Rival names to track alongside your own. They appear in the results tagged as 'competitor' so you can compare share of voice and sentiment side by side.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "subreddits": {
            "title": "Only these communities",
            "type": "array",
            "description": "Optional. Restrict the search to specific communities. Accepts 'python', 'r/python' or a full community URL. Leave empty to search all of Reddit.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeSubreddits": {
            "title": "Skip these communities",
            "type": "array",
            "description": "Optional. Communities to drop from the results — useful for muting your own community, meme subs or known spam hangouts.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchComments": {
            "title": "Read comment threads too",
            "type": "boolean",
            "description": "Also open the comment threads of the matching posts and report individual comments that name your keyword, each with its own author and sentiment. This adds a little time per thread. Turn it off if you only want whole posts and want the run to finish faster.",
            "default": true
          },
          "lookbackWindow": {
            "title": "Lookback window",
            "enum": [
              "hour",
              "day",
              "week",
              "month"
            ],
            "type": "string",
            "description": "How far back each run looks. Match this to how often you schedule the monitor — hourly runs work well with 'Past hour', daily runs with 'Past 24 hours'.",
            "default": "day"
          },
          "maxMentionsPerKeyword": {
            "title": "Maximum mentions per keyword",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Caps how many mentions each keyword can return in one run, so a keyword that suddenly goes viral cannot run away with your budget. Post mentions and comment mentions are capped separately, so one busy thread cannot crowd out everything else.",
            "default": 100
          },
          "onlyNewSinceLastRun": {
            "title": "Only return mentions I have not seen",
            "type": "boolean",
            "description": "On by default. The monitor remembers every mention it has already reported and skips it next time, so a scheduled run gives you a clean 'what's new' list instead of the same items again. Turn it off to get every mention in the window on every run.",
            "default": true
          },
          "stateStoreName": {
            "title": "Memory name",
            "type": "string",
            "description": "The name under which the monitor keeps its record of already-reported mentions. Runs that share a name share a memory — give two schedules different names to track two brands independently.",
            "default": "reddit-mention-monitor-state"
          },
          "resetState": {
            "title": "Forget everything and start fresh",
            "type": "boolean",
            "description": "Wipes the memory for this run, so every mention in the window counts as new. Handy after changing keywords or when you want a full backfill.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Parallel searches",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many searches run at the same time. Higher finishes sooner; lower is gentler and more predictable.",
            "default": 5
          },
          "country": {
            "title": "Browse from",
            "enum": [
              "us",
              "gb",
              "ca",
              "au",
              "de",
              "fr",
              "es",
              "it",
              "nl",
              "ie",
              "in",
              "sg",
              "br",
              "jp",
              "pl",
              "se",
              "mx"
            ],
            "type": "string",
            "description": "Which country's view of Reddit to use. Reddit content is the same almost everywhere, so the default suits nearly every run.",
            "default": "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}