{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Brand Monitor",
    "description": "Monitor Reddit for brand mentions, competitor names, and product keywords on a schedule. Tracks score changes between runs so you always know which mentions are gaining momentum — not just what exists. Set it, schedule it, stay ahead.",
    "version": "2.0",
    "x-build-id": "G57rhHBorU9ysnqKp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/deepmine~reddit-brand-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-deepmine-reddit-brand-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/deepmine~reddit-brand-monitor/runs": {
      "post": {
        "operationId": "runs-sync-deepmine-reddit-brand-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/deepmine~reddit-brand-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-deepmine-reddit-brand-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",
        "required": [
          "keywords"
        ],
        "properties": {
          "keywords": {
            "title": "Brands & Keywords to Monitor",
            "minItems": 1,
            "type": "array",
            "description": "Brand names, product names, competitor names, or keywords to monitor across Reddit. Add one per line. Each is tracked independently — results show which keyword matched and how scores have changed since the last run.",
            "items": {
              "type": "string",
              "pattern": "\\S"
            }
          },
          "sortBy": {
            "title": "Sort Results By",
            "enum": [
              "new",
              "relevance",
              "top",
              "hot",
              "comments"
            ],
            "type": "string",
            "description": "How Reddit ranks the results returned for each keyword.\n\n• New — most recent mentions first. Best for catching new discussions as they appear.\n• Relevance — Reddit's own relevance ranking. Good for on-topic results.\n• Top — highest-scored posts. Good for seeing what resonated most.\n• Hot — currently active discussions with momentum.\n• Most Comments — most-discussed threads.",
            "default": "new"
          },
          "timeFilter": {
            "title": "Time Window",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Only return mentions posted within this time window. Match this to your run schedule — if you run every 24 hours, 'Past 24 hours' keeps results fresh. Use 'Past week' for broader coverage.",
            "default": "day"
          },
          "searchPosts": {
            "title": "Monitor Posts",
            "type": "boolean",
            "description": "Monitor Reddit posts (links, articles, discussions) that mention your brand or keywords.",
            "default": true
          },
          "searchComments": {
            "title": "Monitor Comments",
            "type": "boolean",
            "description": "Also monitor individual comments mentioning your keywords. Catches brand mentions buried inside discussion threads. Increases run time.",
            "default": false
          },
          "subredditFilter": {
            "title": "Restrict to Subreddits (optional)",
            "type": "array",
            "description": "Optionally restrict monitoring to specific subreddits. Leave empty to monitor all of Reddit. Accepts any format: gaming, r/gaming, or full URL.",
            "items": {
              "type": "string",
              "pattern": "\\S"
            },
            "default": []
          },
          "maxResultsPerKeyword": {
            "title": "Max Results Per Keyword",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of posts, and of comments, to collect per brand or keyword per run (each counted after your Minimum Upvote Score). 100 is enough for most brand monitoring use cases.",
            "default": 100
          },
          "minScore": {
            "title": "Minimum Upvote Score",
            "minimum": 0,
            "type": "integer",
            "description": "Ignore mentions with fewer upvotes than this. Set to 0 to capture everything including brand-new posts with no votes yet.",
            "default": 0
          },
          "trackChanges": {
            "title": "Track Score Changes Between Runs",
            "type": "boolean",
            "description": "The core monitoring feature. Each run saves a score snapshot. The next run compares against it and adds a 'scoreDelta' field to every result — showing exactly how many upvotes each mention gained since last time.\n\nRun on a schedule (every 6–24 hours) to build a continuous picture of which brand mentions are growing. The first run establishes the baseline — scoreDelta will be null. From the second run onward, deltas show you what's gaining traction.",
            "default": true
          },
          "includeSummaryRows": {
            "title": "Summary Rows (free)",
            "type": "boolean",
            "description": "Saves one summary row per brand (mentions, top subreddits, average buzz, top post) in the run's free Summary dataset (the Summary link on the Output tab). Summary rows are never charged: only mention rows are. The same summaries are always in the free SUMMARY record. Up to version 2.0.4 these rows came after the mentions in the results, at a row's price each.",
            "default": true
          },
          "matchMode": {
            "title": "Match",
            "enum": [
              "any",
              "all",
              "phrase"
            ],
            "type": "string",
            "description": "How closely a post or comment must match your keyword.\n\n• Reddit's match — whatever Reddit's search finds for the words (it also matches word stems and other fields, so some results only touch the keyword).\n• Every word — the post's title and text (or the comment) must hold every word of the keyword, in any order.\n• Exact phrase — the words in a row, as typed (case, punctuation and line breaks don't matter).\n\nResults that don't match aren't delivered and aren't charged.",
            "default": "any"
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Reddit answers Apify's datacenter proxy, so the default works for every plan. If you pick residential, the run still reads through datacenter and keeps residential for retries Reddit refuses there (charged to the run's own proxy traffic only when needed).",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}