{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper with Jev AI - Sentiment, Intent & Leads",
    "description": "Scrape Reddit posts and comments by subreddit, keyword, user or post URL. Every result is analysed by the Jev AI model for sentiment, intent, buying intent and pain points at no extra cost, and AI filters run before billing so you only pay for what you keep.",
    "version": "0.1",
    "x-build-id": "AqeBmrb6oFIrmOhea"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/abdullahbilal-y~reddit-jev-ai-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-abdullahbilal-y-reddit-jev-ai-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/abdullahbilal-y~reddit-jev-ai-scraper/runs": {
      "post": {
        "operationId": "runs-sync-abdullahbilal-y-reddit-jev-ai-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/abdullahbilal-y~reddit-jev-ai-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-abdullahbilal-y-reddit-jev-ai-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": "What to scrape",
            "enum": [
              "subreddit",
              "search",
              "user",
              "post"
            ],
            "type": "string",
            "description": "Pick one. Each mode uses its own input field below.",
            "default": "subreddit"
          },
          "subreddits": {
            "title": "Subreddits (mode: subreddits)",
            "maxItems": 500,
            "type": "array",
            "description": "Names, r/names or subreddit URLs.",
            "items": {
              "type": "string"
            },
            "default": [
              "programming",
              "technology",
              "science"
            ]
          },
          "searchQueries": {
            "title": "Search keywords (mode: search)",
            "maxItems": 500,
            "type": "array",
            "description": "Keywords or phrases. Reddit search syntax works, e.g. 'notion alternative subreddit:productivity'.",
            "items": {
              "type": "string"
            }
          },
          "usernames": {
            "title": "Usernames (mode: users)",
            "maxItems": 500,
            "type": "array",
            "description": "Usernames, u/names or profile URLs.",
            "items": {
              "type": "string"
            }
          },
          "postUrls": {
            "title": "Post URLs (mode: post URLs)",
            "maxItems": 1000,
            "type": "array",
            "description": "Full Reddit post links. Returns the comment thread of each post.",
            "items": {
              "type": "string"
            }
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "hot",
              "new",
              "top",
              "rising",
              "relevance",
              "comments"
            ],
            "type": "string",
            "description": "Subreddits: hot, new, top, rising (Relevance falls back to Hot). Search: Relevance is best - \"New\" matches loose words and returns off-topic posts unless you narrow the query with subreddit:, flair: or title:. Users: new, hot, top.",
            "default": "relevance"
          },
          "timeFilter": {
            "title": "Time range",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Used by Top sort and by search.",
            "default": "week"
          },
          "maxItems": {
            "title": "Max posts per target",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many posts to read per subreddit, query or user. Pages are fetched automatically. Reddit itself stops around 1,000 posts per listing, and search usually stops after 100-250 per query.",
            "default": 10
          },
          "includeComments": {
            "title": "Also collect comments",
            "type": "boolean",
            "description": "Fetch the comment thread of every post that passes your filters. Each comment is returned (and billed) as its own result.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Includes visible nested replies. Reddit shows 25 comments per view; above 25, the Actor merges several sort orders to collect more (up to 100). Very large threads will not be returned in full.",
            "default": 25
          },
          "commentSort": {
            "title": "Comment sort",
            "enum": [
              "best",
              "top",
              "new",
              "controversial"
            ],
            "type": "string",
            "description": "Which comments come first.",
            "default": "best"
          },
          "enableAiAnalysis": {
            "title": "AI analysis (included in price)",
            "type": "boolean",
            "description": "Adds sentiment, intent, emotion, buying intent, pain point, recommendation request and spam probability to every post and comment, powered by the Jev model from TypeSafe AI. No extra charge from this Actor. Runs after the free filters, so only rows that survive them are analysed.",
            "default": true
          },
          "topic": {
            "title": "Your topic (for relevance scoring)",
            "type": "string",
            "description": "Optional. Describe what you care about - e.g. 'project management software for small teams' - and every result gets a 0-1 relevance score."
          },
          "customQuestions": {
            "title": "Your own yes/no questions",
            "maxItems": 10,
            "type": "array",
            "description": "Up to 10. Each is answered for every result as a 0-1 probability, e.g. 'Mentions Asana or Trello?' or 'Is the author a small business owner?'. Included in the price.",
            "items": {
              "type": "string"
            }
          },
          "vercelAiGatewayKey": {
            "title": "Your own Vercel AI Gateway key (optional)",
            "type": "string",
            "description": "Use your own key for the AI analysis. Vercel AI Gateway serves the Jev model at TypeSafe's own price. Stored encrypted; never logged. Leave empty to use the built-in key."
          },
          "typesafeApiKey": {
            "title": "Your own TypeSafe API key (optional)",
            "type": "string",
            "description": "Alternative to the Vercel key: a key from typesafe.ai. Stored encrypted; never logged."
          },
          "minBuyingIntentPct": {
            "title": "Only keep buying intent of at least (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Drop results below this buying-intent probability. Filtered rows never reach your dataset, so they are not billed as results - only the small filtered-result fee shown on the Pricing tab, if any.",
            "default": 0
          },
          "minPainPointPct": {
            "title": "Only keep pain point of at least (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Drop results unlikely to describe a real problem. Filtered rows never reach your dataset, so they are not billed as results - only the small filtered-result fee shown on the Pricing tab, if any.",
            "default": 0
          },
          "minRelevancePct": {
            "title": "Only keep relevance of at least (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Requires a topic. Drop off-topic results. Filtered rows never reach your dataset, so they are not billed as results - only the small filtered-result fee shown on the Pricing tab, if any.",
            "default": 0
          },
          "excludeSpam": {
            "title": "Exclude spam and self-promotion",
            "type": "boolean",
            "description": "Drop results the AI judges to be spam, ads or the author plugging their own product. Filtered rows never reach your dataset, so they are not billed as results - only the small filtered-result fee shown on the Pricing tab, if any.",
            "default": false
          },
          "onlySentiments": {
            "title": "Only these sentiments",
            "uniqueItems": true,
            "type": "array",
            "description": "Leave empty to keep all.",
            "items": {
              "type": "string",
              "enum": [
                "positive",
                "negative",
                "neutral",
                "mixed"
              ]
            }
          },
          "onlyIntents": {
            "title": "Only these intents",
            "uniqueItems": true,
            "type": "array",
            "description": "Leave empty to keep all. E.g. pick 'seeking_recommendation' and 'complaint' for lead generation.",
            "items": {
              "type": "string",
              "enum": [
                "question",
                "seeking_recommendation",
                "complaint",
                "praise",
                "purchase_intent",
                "comparison",
                "announcement",
                "self_promotion",
                "discussion"
              ]
            }
          },
          "requireAllCustomTrue": {
            "title": "Only keep results where all my questions are 'yes'",
            "type": "boolean",
            "description": "Treats a probability of 50% or more as yes.",
            "default": false
          },
          "minScore": {
            "title": "Minimum upvotes",
            "minimum": 0,
            "type": "integer",
            "description": "Drop results below this score. Filtered rows never reach your dataset, so they are not billed as results - only the small filtered-result fee shown on the Pricing tab, if any."
          },
          "minComments": {
            "title": "Minimum comments (posts)",
            "minimum": 0,
            "type": "integer",
            "description": "Drop posts with fewer comments."
          },
          "excludeNsfw": {
            "title": "Exclude NSFW",
            "type": "boolean",
            "description": "Drops results Reddit marks as NSFW. Best effort: it relies on Reddit's own marking.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Required, and already set. Reddit blocks Apify's server IPs and datacenter proxies; residential proxies work reliably.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}