{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper Pro - Posts, Comments, Sentiment",
    "description": "Scrape Reddit posts, comments, communities and users without login. Adds sentiment analysis, trend velocity scoring, and keyword-based search alerts not found in other Reddit scrapers.",
    "version": "0.1",
    "x-build-id": "kuOKnsR0pzQI5Wfwb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nexcrawl~reddit-scraper-pro/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nexcrawl-reddit-scraper-pro",
        "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/nexcrawl~reddit-scraper-pro/runs": {
      "post": {
        "operationId": "runs-sync-nexcrawl-reddit-scraper-pro",
        "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/nexcrawl~reddit-scraper-pro/run-sync": {
      "post": {
        "operationId": "run-sync-nexcrawl-reddit-scraper-pro",
        "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": "Start URLs",
            "type": "array",
            "description": "Reddit URLs to scrape: post links, subreddit links (r/...), or user profile links (u/...). Leave empty if using Search keywords instead.",
            "items": {
              "type": "string"
            }
          },
          "searchKeywords": {
            "title": "Search keywords (new)",
            "type": "array",
            "description": "Search Reddit (or a specific subreddit) for posts matching these keywords. Great for market research, brand monitoring, or lead generation. Leave empty if using Start URLs instead.",
            "items": {
              "type": "string"
            }
          },
          "redditClientId": {
            "title": "Reddit API Client ID (recommended)",
            "type": "string",
            "description": "Free Reddit API credential that removes 403 blocks entirely. Get one in 2 minutes: go to reddit.com/prefs/apps, click 'create app', choose type 'script', then copy the ID shown under the app name. Leave blank to run anonymously (much slower, often blocked on shared IPs)."
          },
          "redditClientSecret": {
            "title": "Reddit API Client Secret (recommended)",
            "type": "string",
            "description": "The 'secret' value shown on the same Reddit app page as your Client ID."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "new",
              "hot",
              "top",
              "rising"
            ],
            "type": "string",
            "description": "How to sort posts when scraping a community or running a keyword search.",
            "default": "new"
          },
          "timeframe": {
            "title": "Timeframe (for Top sort)",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Time window to use when Sort by is set to Top.",
            "default": "week"
          },
          "maxPostsPerSource": {
            "title": "Max posts per source",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of posts to scrape per community, user, or keyword search.",
            "default": 50
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of comments to scrape per individual post.",
            "default": 50
          },
          "skipComments": {
            "title": "Skip comments",
            "type": "boolean",
            "description": "If enabled, comments will not be scraped from posts — only post metadata.",
            "default": false
          },
          "skipUserPosts": {
            "title": "Skip user posts",
            "type": "boolean",
            "description": "If enabled, only user profile info is scraped, not their submitted posts.",
            "default": false
          },
          "skipCommunityInfo": {
            "title": "Skip community info",
            "type": "boolean",
            "description": "If enabled, subreddit metadata (subscribers, description) will not be scraped.",
            "default": false
          },
          "includeMediaAndScores": {
            "title": "Include media links, upvotes and comment count",
            "type": "boolean",
            "description": "If enabled, includes score, upvote ratio, and media URLs in the output.",
            "default": true
          },
          "enableSentiment": {
            "title": "Enable sentiment analysis (new)",
            "type": "boolean",
            "description": "Scores each post and comment as positive, negative, or neutral using lexicon-based sentiment analysis. Useful for brand monitoring and community mood tracking.",
            "default": true
          },
          "enableTrendScore": {
            "title": "Enable trend velocity score (new)",
            "type": "boolean",
            "description": "Calculates upvotes-per-hour for each post, helping you spot rapidly rising content rather than just high-score content.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration (optional)",
            "type": "object",
            "description": "Optional. Leave empty if you're on the Apify free plan with no proxy access — the actor will run direct with slow, careful pacing instead. If you do have Apify Proxy or your own proxy, add it here for faster, more reliable scraping."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}