{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Customer Research & Competitor Insights",
    "description": "Analyze licensed Reddit CSV/JSON exports for US SaaS and brand research. Find pain-point phrases, feature-request cues and competitor mentions; audit supplied threads and compare snapshots. Get five CSV reports, JSON and a summary. No live scraping, proxy or AI calls.",
    "version": "1.1",
    "x-build-id": "b1XaPszEPYZ9Ancrp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fascinating_lentil~reddit-posts-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fascinating_lentil-reddit-posts-comments-scraper",
        "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/fascinating_lentil~reddit-posts-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-fascinating_lentil-reddit-posts-comments-scraper",
        "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/fascinating_lentil~reddit-posts-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-fascinating_lentil-reddit-posts-comments-scraper",
        "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": "Data mode",
            "enum": [
              "demo",
              "import"
            ],
            "type": "string",
            "description": "Choose explicitly. Legacy subreddit/search/post URL/proxy inputs receive a migration error. Demos save zero dataset rows and request no post/comment result events, but platform usage and any configured start fee still apply."
          },
          "demoPreset": {
            "title": "Labeled US research preview",
            "enum": [
              "us-saas-research",
              "us-brand-comparison",
              "us-thread-quality"
            ],
            "type": "string",
            "description": "Invented posts, comments, brands and subreddit. Not source access, real customers, location or verified intent. US describes the workflow audience, not users' locations. Ignored in import mode.",
            "default": "us-saas-research"
          },
          "importJson": {
            "title": "Licensed observations — JSON array as text",
            "type": "string",
            "description": "Import only. Paste a flat JSON ARRAY as text; exactly one nonempty JSON/CSV import. Maximum 2 MiB, 1,000 observations and 500 unique IDs. Required: recordType, postId, createdAt, observedAt, plus title for posts or commentId/bodyText for comments. See README. No URLs or files are fetched."
          },
          "importCsv": {
            "title": "Licensed observations — CSV text with header",
            "type": "string",
            "description": "Import only. Maximum 2 MiB, 1,000 data rows, 40 columns and 500 unique IDs. Quoted multiline fields supported. Use UTC dates/timestamps and integer scores without formulae, ranges or shorthand. Supply safe isNSFW flags or a safe root post for comments. Never submit private messages, credentials or personal profiles."
          },
          "importSource": {
            "title": "Authorized export provider label",
            "type": "string",
            "description": "Required for import; 1–160 characters. Identify your licensed export. Do not put names, contact information or secrets here. A source label is not proof of rights, accuracy, freshness or a Reddit commercial agreement. Leave blank in demo."
          },
          "authorizedData": {
            "title": "This export and derived analysis are licensed for this paid service",
            "type": "boolean",
            "description": "Required TRUE for import only; never auto-confirmed by an example. Public visibility, a Reddit/API account, another scraper's output or this checkbox do not grant permission. Your license must cover commercial processing here and applicable redistribution, privacy and deletion requirements. Leave unchecked for demo.",
            "default": false
          },
          "maxRecords": {
            "title": "Maximum selected unique posts/comments",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Combined post/comment cap, not per subreddit or observation. First-seen eligible IDs are selected after full validation. Each saved ID includes its supplied snapshots. Omitted records are not saved or billed; caps can leave incomplete parent/thread evidence. Demo uses this cap for preview only and has zero dataset rows.",
            "default": 100
          },
          "watchTerms": {
            "title": "Literal product or brand terms",
            "type": "array",
            "description": "Optional: up to 10 unique non-sensitive literal terms, 2–40 characters each. Case-insensitive boundary matching in the latest supplied text. Counts are per selected record, not market share, sentiment, unique people or verified buying intent. Do not enter names, usernames, contacts or sensitive-group labels.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "comparisonWindowDays": {
            "title": "Supplied snapshot comparison window — days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Compare the earliest earlier observation within this gap to the latest observation for the same ID. Score deltas require a matching supplied metric basis. No live checking, cross-run history, forecast or notification. Scores may be fuzzed.",
            "default": 30
          },
          "skipNSFW": {
            "title": "Exclude unsafe or unknown-NSFW supplied records",
            "type": "boolean",
            "description": "Default true excludes explicit NSFW at any supplied time and unknown flags, unless a comment inherits a safe root. Root flags protect dependent comments. False permits unknown/flagged exports; it is not authorization to submit sexually explicit or otherwise prohibited content.",
            "default": true
          },
          "removedRecordKeys": {
            "title": "Supplied deletion/takedown keys for this run",
            "type": "array",
            "description": "Import only: up to 1,000 t3_postId / t1_commentId keys. Suppresses that ID and its supplied history; removed roots suppress comments in their supplied thread. Does not discover new Reddit deletions or erase previous datasets, INPUT, reports or downloads. Purge affected historical copies separately. Leave empty in demo.",
            "default": [],
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}