{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Post Monitor Lite",
    "description": "Monitor new public Reddit posts by subreddit, keyword, or URL. Filter by date and engagement, deduplicate scheduled runs, and export post, media, and source-quality data.",
    "version": "0.1",
    "x-build-id": "31ybKLCbhffF4EngH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fetch_cat~reddit-post-monitor-lite/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fetch_cat-reddit-post-monitor-lite",
        "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/fetch_cat~reddit-post-monitor-lite/runs": {
      "post": {
        "operationId": "runs-sync-fetch_cat-reddit-post-monitor-lite",
        "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/fetch_cat~reddit-post-monitor-lite/run-sync": {
      "post": {
        "operationId": "run-sync-fetch_cat-reddit-post-monitor-lite",
        "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": {
          "subreddits": {
            "title": "Subreddits",
            "type": "array",
            "description": "Subreddit names without r/. Example: apify, webscraping, MachineLearning.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Reddit search queries",
            "type": "array",
            "description": "Search terms to monitor across Reddit. Add phrases, product names, brands, competitors, or questions.",
            "items": {
              "type": "string"
            }
          },
          "redditUrls": {
            "title": "Reddit URLs",
            "type": "array",
            "description": "Public Reddit listing, search, subreddit, or individual post URLs.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxPosts": {
            "title": "Maximum posts per run",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on posts saved across all sources. Results are allocated round-robin so one source cannot consume the complete limit.",
            "default": 10
          },
          "maxPostsPerSource": {
            "title": "Maximum posts per source",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum posts collected from each subreddit, search query, or URL before global filtering and deduplication.",
            "default": 20
          },
          "maxPagesPerSource": {
            "title": "Maximum pages per source",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum Reddit listing pages requested for each source. Reddit listings normally expose up to about 1,000 accessible records.",
            "default": 10
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "new",
              "hot",
              "top",
              "rising",
              "comments",
              "relevance"
            ],
            "type": "string",
            "description": "Sort used by Reddit. New, hot, top, and rising apply to subreddits. New, top, comments, and relevance apply to searches. Unsupported combinations fall back to new.",
            "default": "new"
          },
          "timeFilter": {
            "title": "Reddit time window",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Time window used by top and search sorts that support it.",
            "default": "week"
          },
          "includeKeywords": {
            "title": "Required keywords",
            "type": "array",
            "description": "Keep posts whose title or visible body contains at least one keyword. Matching is case-insensitive. Leave empty to keep all topics.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Excluded keywords",
            "type": "array",
            "description": "Skip posts whose title or visible body contains any listed keyword. Matching is case-insensitive.",
            "items": {
              "type": "string"
            }
          },
          "maxAgeHours": {
            "title": "Maximum post age in hours",
            "minimum": 0,
            "type": "number",
            "description": "Keep only posts no older than this many hours. Useful for frequent scheduled monitoring."
          },
          "dateFrom": {
            "title": "Posted from date",
            "type": "string",
            "description": "Keep posts published on or after this date or ISO 8601 date-time."
          },
          "dateTo": {
            "title": "Posted to date",
            "type": "string",
            "description": "Keep posts published on or before this date or ISO 8601 date-time."
          },
          "minScore": {
            "title": "Minimum score",
            "minimum": 0,
            "type": "integer",
            "description": "Only save posts with at least this Reddit score. Records from limited fallback feeds are skipped when score is unavailable."
          },
          "maxScore": {
            "title": "Maximum score",
            "minimum": 0,
            "type": "integer",
            "description": "Only save posts with at most this Reddit score. Records from limited fallback feeds are skipped when score is unavailable."
          },
          "minComments": {
            "title": "Minimum comments",
            "minimum": 0,
            "type": "integer",
            "description": "Only save posts with at least this many comments. Records from limited fallback feeds are skipped when comment count is unavailable."
          },
          "flairFilter": {
            "title": "Exact post flair",
            "type": "string",
            "description": "Only save posts whose flair exactly matches this text, ignoring letter case."
          },
          "domainFilter": {
            "title": "Outbound domain contains",
            "type": "string",
            "description": "Only save link posts whose outbound domain contains this text, such as youtube.com or github.com."
          },
          "authorFilter": {
            "title": "Reddit author",
            "type": "string",
            "description": "Only save posts by this Reddit username. The u/ prefix is optional."
          },
          "includeNsfw": {
            "title": "Include NSFW posts",
            "type": "boolean",
            "description": "Keep posts marked as NSFW when Reddit provides the flag.",
            "default": false
          },
          "includeSpoilers": {
            "title": "Include spoiler posts",
            "type": "boolean",
            "description": "Keep posts marked as spoilers.",
            "default": true
          },
          "includeStickied": {
            "title": "Include stickied posts",
            "type": "boolean",
            "description": "Keep moderator-pinned posts.",
            "default": true
          },
          "deduplicateAcrossRuns": {
            "title": "Deduplicate across runs",
            "type": "boolean",
            "description": "Skip matching post IDs already seen by earlier runs using the same state key. The first run returns existing matches.",
            "default": false
          },
          "onlyNew": {
            "title": "Establish a baseline first",
            "type": "boolean",
            "description": "On the first run, remember current matching posts without saving them. Later runs return only new matches. This automatically enables cross-run deduplication.",
            "default": false
          },
          "stateKey": {
            "title": "Monitoring state key",
            "type": "string",
            "description": "Optional record name that keeps deduplication history separate for different schedules sharing the same state store. Default: default."
          },
          "stateStoreName": {
            "title": "Persistent state store name",
            "type": "string",
            "description": "Named key-value store used to preserve monitoring history across separate runs. Different tasks can share a store when they use different state keys. Default: reddit-post-monitor-lite-state.",
            "default": "reddit-post-monitor-lite-state"
          },
          "failOnNoResults": {
            "title": "Fail when no posts are saved",
            "type": "boolean",
            "description": "Mark the run as failed when no posts match. Initial only-new baseline runs remain successful. RUN-SUMMARY always explains empty output.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Standard Apify Proxy configuration. Automatic Apify Proxy is used by default. This setting takes precedence over the legacy proxy fields below."
          },
          "maxRetries": {
            "title": "Retries per Reddit request",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Number of retries after the first request for temporary blocks, rate limits, server errors, timeouts, or connection errors. Each retry uses a fresh connection.",
            "default": 2
          },
          "useApifyProxy": {
            "title": "Use Apify Proxy (legacy)",
            "type": "boolean",
            "description": "Backward-compatible proxy switch used only when Proxy configuration is not provided.",
            "default": true
          },
          "proxyGroups": {
            "title": "Proxy groups (legacy)",
            "type": "array",
            "description": "Backward-compatible Apify Proxy group list used only when Proxy configuration is not provided.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}