{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Buying-Intent Lead Monitor",
    "description": "Find people on Reddit asking for product recommendations, seeking alternatives to competitors, or voicing pain points. Scans posts and comments across subreddits, scores each lead by buying-intent strength, and de-duplicates across scheduled runs.",
    "version": "0.1",
    "x-build-id": "fBGsMP8oFVcyLBDkh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/xtracto~reddit-intent-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-xtracto-reddit-intent-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/xtracto~reddit-intent-monitor/runs": {
      "post": {
        "operationId": "runs-sync-xtracto-reddit-intent-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/xtracto~reddit-intent-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-xtracto-reddit-intent-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": [
          "phrases"
        ],
        "properties": {
          "phrases": {
            "title": "Intent phrases",
            "type": "array",
            "description": "Phrases that signal someone is shopping or frustrated (recommendation requests, competitor alternatives, pain points). Each phrase is searched and also used to score matches — the more (and heavier) the phrases a post or comment contains, the higher its intent score. Add phrases specific to your product for sharper leads.",
            "items": {
              "type": "string"
            }
          },
          "subreddits": {
            "title": "Subreddits (optional)",
            "type": "array",
            "description": "Communities to monitor (without `r/`), e.g. `SaaS`, `Entrepreneur`, `smallbusiness`. Leave empty to search across all of Reddit.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Extra keywords (optional)",
            "type": "array",
            "description": "Optional product/topic terms combined with every phrase to narrow results (e.g. `CRM`, `email marketing`). All keywords must appear alongside the phrase. Leave empty to match phrases alone.",
            "items": {
              "type": "string"
            }
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Also scan the comment threads of matching/active posts. Comments are where buying intent often hides (\"has anyone tried an alternative to X?\"). Turn off for a faster, posts-only run.",
            "default": true
          },
          "timeWindow": {
            "title": "Time window",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "How far back to look. Use `day` or `week` for a live monitor on a schedule; widen to `month`/`year` for a one-off backfill.",
            "default": "week"
          },
          "maxPostsPerQuery": {
            "title": "Max posts per phrase",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many posts to pull for each phrase (per subreddit). Reddit search returns roughly the first couple hundred results per phrase, so use several narrow phrases plus a tight time window for full coverage.",
            "default": 100
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "When scanning comments, how many to read per post before moving on. Higher = deeper threads but slower/costlier runs.",
            "default": 50
          },
          "maxItems": {
            "title": "Max leads",
            "minimum": 1,
            "type": "integer",
            "description": "Overall cap on lead rows for the run. The actor stops once this many posts + comments have been collected.",
            "default": 200
          },
          "minIntentScore": {
            "title": "Minimum intent score",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep leads scoring at least this. Strong phrases score 3, softer ones 1. Raise to 2–3 for higher-confidence (fewer) leads; keep at 1 for maximum reach.",
            "default": 1
          },
          "dedupeAcrossRuns": {
            "title": "Skip leads seen on previous runs",
            "type": "boolean",
            "description": "Remember which posts and comments were already delivered, so a scheduled monitor only surfaces NEW leads each run. Turn off to always return every match.",
            "default": true
          },
          "redditClientId": {
            "title": "Reddit client ID (optional)",
            "type": "string",
            "description": "Optional Reddit app client ID for a higher rate limit on very large or frequent runs. Leave blank to use the public path — it works for most jobs, no account needed."
          },
          "redditClientSecret": {
            "title": "Reddit client secret (optional)",
            "type": "string",
            "description": "Optional secret paired with the Reddit client ID above. Not required for the default public path; provide only if your Reddit app needs it."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy settings. Residential is recommended — Reddit is unreliable from datacenter addresses, so residential gives the most complete results. This is prefilled for you.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}