{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Trend & Buyer Intent Radar",
    "description": "Explainable buyer-intent, pain-point and trend analysis of Reddit discussion exports you are authorized to use (CSV, JSON, JSONL or an Apify dataset). Does not fetch Reddit.",
    "version": "0.1",
    "x-build-id": "AOk6XdzcyPwcU2lTy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/privatex~reddit-trend-buyer-intent-radar/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-privatex-reddit-trend-buyer-intent-radar",
        "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/privatex~reddit-trend-buyer-intent-radar/runs": {
      "post": {
        "operationId": "runs-sync-privatex-reddit-trend-buyer-intent-radar",
        "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/privatex~reddit-trend-buyer-intent-radar/run-sync": {
      "post": {
        "operationId": "run-sync-privatex-reddit-trend-buyer-intent-radar",
        "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": {
          "datasetId": {
            "title": "Apify dataset with discussion rows",
            "type": "string",
            "description": "A dataset in your Apify account that holds Reddit discussion rows you are authorized to analyse. Common field names are detected automatically (id, title, body/selftext/text, created_utc/createdAt, subreddit/communityName, score/upVotes, permalink/url, dataType)."
          },
          "fileUrl": {
            "title": "…or an HTTPS file URL (CSV, TSV, JSON, JSONL)",
            "pattern": "^https://.+",
            "type": "string",
            "description": "Direct https:// link to an export file. Private, internal and non-HTTPS addresses are refused. Pre-signed links are fine; their query string is never logged."
          },
          "dataRightsConfirmed": {
            "title": "I have the right to analyse this data",
            "type": "boolean",
            "description": "Required for your own data. Confirm that you obtained these rows lawfully and that your licence or agreement (for example a Reddit Data API agreement or a licensed data provider) allows this analysis. Not needed for the demo.",
            "default": false
          },
          "dataSourceNote": {
            "title": "Where the data comes from (optional)",
            "type": "string",
            "description": "Short provenance note copied into every row, e.g. \"Reddit Data API under our agreement, exported 2026-10-28\"."
          },
          "demoMode": {
            "title": "Demo mode (synthetic data)",
            "type": "boolean",
            "description": "Runs on hand-written fictional discussions so you can see the output in under a minute. Demo rows are labelled SYNTHETIC_DEMO; no row or report events are charged. Also runs automatically when no dataset or file is given. Ignored when you give a dataset or file.",
            "default": false
          },
          "keywordGroups": {
            "title": "Keyword groups",
            "type": "array",
            "description": "One group per line: \"Group name: term, term, term\". Matching is whole-word and ignores case and accents. Example: \"Battery: battery life, charging\".",
            "items": {
              "type": "string"
            }
          },
          "onlyMatchingRows": {
            "title": "Only keep rows that match a keyword group",
            "type": "boolean",
            "description": "Only applies when keyword groups are given. Rows that are dropped are not charged.",
            "default": true
          },
          "intents": {
            "title": "Only these intents (optional)",
            "type": "array",
            "description": "Leave empty to keep every intent.",
            "items": {
              "type": "string",
              "enum": [
                "REQUEST_FOR_RECOMMENDATION",
                "COMPARISON",
                "COMPLAINT",
                "FEATURE_REQUEST",
                "PURCHASE_CONSIDERATION",
                "GENERAL_DISCUSSION",
                "UNCERTAIN"
              ],
              "enumTitles": [
                "Recommendation requests",
                "Comparisons",
                "Complaints",
                "Feature requests",
                "Purchase consideration",
                "General discussion",
                "Uncertain"
              ]
            }
          },
          "dateFrom": {
            "title": "From date (UTC)",
            "type": "string",
            "description": "Keep rows created on or after this date, e.g. 2026-10-01. Rows without a timestamp are dropped when a date filter is set."
          },
          "dateTo": {
            "title": "To date (UTC)",
            "type": "string",
            "description": "Keep rows created on or before this date/time."
          },
          "languages": {
            "title": "Languages (optional)",
            "type": "array",
            "description": "Language codes to keep, e.g. en. Uses the source's language field or a simple guess (en, tr, de, es, und). Intent rules are English; other languages are mostly labelled UNCERTAIN.",
            "items": {
              "type": "string"
            }
          },
          "minEngagement": {
            "title": "Minimum score / upvotes",
            "minimum": 0,
            "type": "integer",
            "description": "0 = no filter. Above 0, rows without a score in the source are dropped (scores are never estimated).",
            "default": 0
          },
          "maxRows": {
            "title": "Maximum rows to read",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Safety cap on rows read from the source.",
            "default": 5000
          },
          "maxFileSizeMb": {
            "title": "Maximum file size (MB)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Downloads larger than this are refused.",
            "default": 25
          },
          "monitorName": {
            "title": "Monitor name (optional)",
            "type": "string",
            "description": "Give the same name on every run to compare with the previous run: new rows, rising and new terms. Stored as counts and hashed row keys (no text) in a key-value store in your own account."
          },
          "includeExcerpts": {
            "title": "Include short text excerpts",
            "type": "boolean",
            "description": "Short evidence excerpt per row. E-mail addresses and phone numbers are masked. Turn off if your licence does not allow quoting.",
            "default": true
          },
          "excerptChars": {
            "title": "Excerpt length (characters)",
            "minimum": 50,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum excerpt length. Longer text is cut with an ellipsis.",
            "default": 200
          },
          "includePermalinks": {
            "title": "Include source links",
            "type": "boolean",
            "description": "Copy the permalink/url from your data (only http/https links).",
            "default": true
          },
          "authorHandling": {
            "title": "Author names",
            "enum": [
              "drop",
              "hash"
            ],
            "type": "string",
            "description": "Author names are never output. \"Hash\" adds a per-monitor pseudonymous reference so repeated posters can be counted without being identified.",
            "default": "drop"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}