{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit VOC Collector",
    "description": "Discover public Reddit VOC candidates or collect reviewed posts and comment trees through Arctic Shift, with raw-response and completeness audits.",
    "version": "0.0",
    "x-build-id": "p88ixWwrZjaLL5pg5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/research_master~reddit-voc-collector/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-research_master-reddit-voc-collector",
        "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/research_master~reddit-voc-collector/runs": {
      "post": {
        "operationId": "runs-sync-research_master-reddit-voc-collector",
        "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/research_master~reddit-voc-collector/run-sync": {
      "post": {
        "operationId": "run-sync-research_master-reddit-voc-collector",
        "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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Run mode",
            "enum": [
              "discover",
              "collect"
            ],
            "type": "string",
            "description": "Discover emits deduplicated candidate posts. Collect fetches posts and comment trees from a separately reviewed selectedPosts list.",
            "default": "discover"
          },
          "subreddits": {
            "title": "Subreddits for discovery",
            "minItems": 1,
            "maxItems": 25,
            "type": "array",
            "description": "Required only in discover mode. Enter public subreddit names without r/.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 21,
              "pattern": "^[A-Za-z0-9_]+$"
            }
          },
          "queries": {
            "title": "Discovery queries",
            "minItems": 1,
            "maxItems": 25,
            "type": "array",
            "description": "Required only in discover mode. Every query is run inside every selected subreddit.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          "includeTerms": {
            "title": "Positive relevance terms",
            "maxItems": 100,
            "type": "array",
            "description": "Optional discover-mode terms. A candidate is marked likely_relevant only when at least one term matches; omit to accept any non-excluded candidate.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          "excludeTerms": {
            "title": "Exclusion terms",
            "maxItems": 100,
            "type": "array",
            "description": "Optional discover-mode terms. Any hit makes likely_relevant false, even when an include term also matches.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          "startDate": {
            "title": "Earliest post date",
            "maxLength": 35,
            "type": "string",
            "description": "Optional discover-mode UTC lower bound in YYYY-MM-DD or RFC 3339 form."
          },
          "endDate": {
            "title": "Latest post date",
            "maxLength": 35,
            "type": "string",
            "description": "Optional discover-mode UTC upper bound in YYYY-MM-DD or RFC 3339 form."
          },
          "pageLimit": {
            "title": "Posts per discovery page",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Arctic Shift result limit for each page. Runtime default: 100."
          },
          "maxPagesPerQuery": {
            "title": "Maximum pages per subreddit-query pair",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Hard discover-mode pagination cap. Runtime default: 3."
          },
          "maxCandidates": {
            "title": "Maximum unique candidates",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Global hard cap on deduplicated candidate rows. Runtime default: 500."
          },
          "selectedPosts": {
            "title": "Reviewed posts to collect",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "Required only in collect mode. Supply a manually reviewed list from a prior discovery run.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "id": {
                  "title": "Post ID",
                  "type": "string",
                  "description": "Reddit base36 post ID without t3_.",
                  "pattern": "^[A-Za-z0-9]{3,12}$"
                },
                "subreddit": {
                  "title": "Expected subreddit",
                  "type": "string",
                  "description": "Public subreddit name without r/. The returned post must match it.",
                  "pattern": "^[A-Za-z0-9_]{1,21}$"
                },
                "reason": {
                  "title": "Selection reason",
                  "type": "string",
                  "description": "Optional analyst rationale preserved on the post record.",
                  "maxLength": 500
                },
                "matchedQueries": {
                  "title": "Matched discovery queries",
                  "type": "array",
                  "description": "Query provenance copied from the reviewed discovery candidate.",
                  "maxItems": 100,
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                }
              },
              "required": [
                "id",
                "subreddit"
              ]
            }
          },
          "commentLimit": {
            "title": "Maximum comments per selected post",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard collect-mode limit passed to Arctic Shift. Runtime default: 5000."
          },
          "requestSettings": {
            "title": "Request safety settings",
            "type": "object",
            "description": "Bounded timeout, delay, and retry controls. The Arctic Shift host is fixed and cannot be overridden.",
            "properties": {
              "requestDelayMs": {
                "title": "Delay after successful requests (ms)",
                "type": "integer",
                "description": "Polite delay after each successful Arctic Shift request. Runtime default: 500 ms.",
                "minimum": 0,
                "maximum": 10000
              },
              "requestTimeoutSecs": {
                "title": "Request timeout (seconds)",
                "type": "integer",
                "description": "Abort one request after this duration. Runtime default: 60 seconds.",
                "minimum": 5,
                "maximum": 120
              },
              "maxRetries": {
                "title": "Maximum retries",
                "type": "integer",
                "description": "Maximum retries after the first attempt for timeouts, throttling, and transient server errors. Runtime default: 3.",
                "minimum": 0,
                "maximum": 5
              },
              "backoffBaseMs": {
                "title": "Initial retry backoff (ms)",
                "type": "integer",
                "description": "Base duration for bounded exponential retry backoff. Runtime default: 500 ms.",
                "minimum": 100,
                "maximum": 5000
              },
              "maxBackoffMs": {
                "title": "Maximum retry backoff (ms)",
                "type": "integer",
                "description": "Hard cap for exponential or Retry-After delays. Runtime default: 10,000 ms.",
                "minimum": 1000,
                "maximum": 30000
              }
            },
            "additionalProperties": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}