{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Pulse Ai",
    "description": "Scrape and monitor Reddit posts, comments, subreddits, and user data with AI-powered insights. Extract trending topics, sentiment analysis, and engagement metrics from Reddit. Export data, run via API, schedule automated monitoring, and integrate with analytics tools.",
    "version": "0.5",
    "x-build-id": "uPvgCtB7XX6bgqyH7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/netdesignr~reddit-pulse-ai/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-netdesignr-reddit-pulse-ai",
        "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/netdesignr~reddit-pulse-ai/runs": {
      "post": {
        "operationId": "runs-sync-netdesignr-reddit-pulse-ai",
        "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/netdesignr~reddit-pulse-ai/run-sync": {
      "post": {
        "operationId": "run-sync-netdesignr-reddit-pulse-ai",
        "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": {
          "startUrls": {
            "title": "Reddit URLs",
            "type": "array",
            "description": "Reddit URLs to scrape. Supports subreddit URLs (reddit.com/r/programming), post URLs (reddit.com/r/.../comments/...), and user profile URLs (reddit.com/user/...). Auto-detected.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searchQueries": {
            "title": "Search Queries",
            "type": "array",
            "description": "Search Reddit for these terms. Each query creates a separate search.",
            "items": {
              "type": "string"
            }
          },
          "subreddits": {
            "title": "Subreddit Names",
            "type": "array",
            "description": "Subreddit names to scrape (without r/ prefix). Alternative to providing full URLs.",
            "items": {
              "type": "string"
            },
            "default": [
              "technology"
            ]
          },
          "maxResults": {
            "title": "Max Results Per Source",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of results to extract per subreddit, search query, or user. 0 = all available (up to Reddit's ~1000 limit).",
            "default": 100
          },
          "sort": {
            "title": "Sort Order",
            "enum": [
              "hot",
              "new",
              "top",
              "rising",
              "controversial"
            ],
            "type": "string",
            "description": "How to sort results. For search queries, only hot, new, and top are supported by Reddit.",
            "default": "hot"
          },
          "timeFilter": {
            "title": "Time Filter",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Time range for 'top' and 'controversial' sort orders.",
            "default": "all"
          },
          "includeComments": {
            "title": "Include Comments",
            "type": "boolean",
            "description": "Fetch comments for each post. Increases run time and cost.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Max Comments Per Post",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum comments to fetch per post when 'Include Comments' is enabled.",
            "default": 100
          },
          "commentSort": {
            "title": "Comment Sort",
            "enum": [
              "confidence",
              "top",
              "new",
              "controversial",
              "old"
            ],
            "type": "string",
            "description": "Sort order for comments.",
            "default": "top"
          },
          "includeUserDetails": {
            "title": "Include User Details",
            "type": "boolean",
            "description": "Fetch karma, account age, and bio when scraping user profile URLs. Only applies to user profile inputs, not post authors.",
            "default": false
          },
          "includeCommunityInfo": {
            "title": "Include Community Info",
            "type": "boolean",
            "description": "Fetch subreddit metadata (subscribers, description, rules). One extra request per unique subreddit.",
            "default": false
          },
          "aiMode": {
            "title": "AI Intelligence Mode",
            "type": "boolean",
            "description": "Enable AI-powered analysis of every post and comment. Adds sentiment analysis, brand detection, sarcasm detection, topic classification, SEO signals, and more. Just toggle on, no setup needed.",
            "default": false
          },
          "geminiApiKey": {
            "title": "Gemini API Key (Optional, for discounted rate)",
            "type": "string",
            "description": "Optional. Provide your own Google Gemini API key instead of using the built-in one. Get one free at aistudio.google.com."
          },
          "targetBrands": {
            "title": "Target Brands to Track",
            "type": "array",
            "description": "Brand names to specifically track (e.g., 'Nike', 'Adidas'). Enables competitor comparison and sentiment-vs-target scoring. The AI auto-detects all other brand mentions regardless.",
            "items": {
              "type": "string"
            }
          },
          "proxy": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Residential proxies are required for Reddit scraping. The default configuration uses Apify's residential proxies.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "emptyRunPolicy": {
            "title": "Empty Run Policy",
            "enum": [
              "retry_then_fail",
              "retry_then_warn",
              "retry_then_succeed"
            ],
            "type": "string",
            "description": "Behavior when retry completes but 0 items were scraped.",
            "default": "retry_then_fail"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}