{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Mention Monitor: Subreddit Keyword Alerts",
    "description": "Watch subreddits for your keywords in posts and comments, including mentions that appear only in a comment. Each scheduled run returns only new matches. Reads the Arctic Shift Reddit archive; no Reddit login or API key.",
    "version": "0.1",
    "x-build-id": "3oY8s42k2JeWywnC0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/shelfdata~reddit-mention-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-shelfdata-reddit-mention-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/shelfdata~reddit-mention-monitor/runs": {
      "post": {
        "operationId": "runs-sync-shelfdata-reddit-mention-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/shelfdata~reddit-mention-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-shelfdata-reddit-mention-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": [
          "subreddits",
          "keywords"
        ],
        "properties": {
          "subreddits": {
            "title": "Subreddits",
            "type": "array",
            "description": "Subreddit names (`Supplements`, `r/Supplements`) or subreddit URLs. Every new post and comment of each subreddit is read and matched. Up to 50.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Brand names, products, competitors or topics. Matched as whole words, case-insensitive (`creatine` does not match `creatinine`); a link counts by its domain (`brand.com/...`).",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude if the text contains",
            "type": "array",
            "description": "Drop a match when its post or comment also contains one of these words or phrases, e.g. a product that shares your brand's name.",
            "items": {
              "type": "string"
            }
          },
          "searchPosts": {
            "title": "Search posts",
            "type": "boolean",
            "description": "Match post titles and text.",
            "default": true
          },
          "searchComments": {
            "title": "Search comments",
            "type": "boolean",
            "description": "Match comments, including mentions in threads whose post never names the keyword.",
            "default": true
          },
          "includePostContext": {
            "title": "Add the post title to comment matches",
            "type": "boolean",
            "description": "Looks up the title of the post each matching comment belongs to (one extra request per page with matches).",
            "default": true
          },
          "lookbackHours": {
            "title": "Look back (hours)",
            "minimum": 1,
            "maximum": 2160,
            "type": "integer",
            "description": "How far back the first run reads (and every run, with 'Only new matches' off). At most 90 days.",
            "default": 24
          },
          "onlyNew": {
            "title": "Only new matches since the last run",
            "type": "boolean",
            "description": "Remembers per subreddit how far it has read and which matches it returned (in a key-value store named `reddit-mention-monitor-state` in your account), so each scheduled run returns only matches it has not returned before. A pause longer than the look-back window resumes at the start of the window. The form starts with it off (a one-off run); tick it for scheduled monitoring. API calls and schedules that omit this field keep it on.",
            "default": true
          },
          "recheckHours": {
            "title": "Re-check late comments after (hours)",
            "minimum": 0,
            "maximum": 168,
            "type": "integer",
            "description": "Comments reach the archive late, often hours and up to about 40 hours after they are posted. With 'Only new matches' on, every post and comment is read again about 6 hours and this many hours after it was posted, so late comments are still found; matches already returned are never returned again. Each item is read at most three times however often the actor runs. 0 turns re-checks off (cheaper, but misses late comments).",
            "default": 48
          },
          "monitorName": {
            "title": "Monitor name",
            "maxLength": 60,
            "type": "string",
            "description": "Keeps separate memories for different monitors (e.g. one per client) that watch the same subreddits.",
            "default": "default"
          },
          "maxPagesPerRun": {
            "title": "Maximum pages per run",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "One page is up to 100 posts or comments of one subreddit (a few seconds each; each page read is charged). A busy subreddit such as r/Supplements has about 10 comment pages a day, read up to three times with the re-checks. A run that does not catch up continues where it stopped next time.",
            "default": 200
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many matches; the next run continues after the last one returned.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}