{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit User Profile Posts And Comments Scraper With Account Age",
    "description": "Scrape any Reddit user’s public posts and comments in one click. Ideal for academic research, sentiment analysis, or community behavior tracking. Clean, structured JSON output makes it easy to extract insights from Reddit user activity.",
    "version": "0.1",
    "x-build-id": "C8beMJGCdUy68T2xj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scraper-engine~reddit-user-profile-posts-and-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scraper-engine-reddit-user-profile-posts-and-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/scraper-engine~reddit-user-profile-posts-and-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scraper-engine-reddit-user-profile-posts-and-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/scraper-engine~reddit-user-profile-posts-and-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scraper-engine-reddit-user-profile-posts-and-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": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "🧑 Reddit Users to Vet",
            "type": "array",
            "description": "Reddit accounts to scrape and score. Each entry may be a bare username (spez), a u/handle (u/spez), a full profile URL (https://www.reddit.com/user/spez), or a keyword search (keyword:python — karma stats apply to user targets only).\n\nAdd as many as you like; each is processed independently.",
            "items": {
              "type": "string"
            }
          },
          "includeAccountStats": {
            "title": "🏅 Attach Account & Karma Stats",
            "type": "boolean",
            "description": "When on, every post row carries an accountStats object (total / post / comment karma, cake-day, account age in days, karma-per-day, comment-vs-post karma ratio, verified-email, gold, mod, followers) plus flat totalKarma / accountAgeDays / hasVerifiedEmail columns.\n\nSource: www.reddit.com about.json, with an old.reddit.com sidebar fallback when about.json is blocked (authorAccountSource records which fired). Turn off for posts-only output.",
            "default": true
          },
          "minKarma": {
            "title": "🎯 Minimum Total Karma",
            "minimum": 0,
            "type": "integer",
            "description": "Drop accounts whose total karma is below this number (0 = no karma filter). Example: minKarma=500 skips throwaway accounts under 500 karma and writes an uncharged account_skipped row explaining why.\n\nFails closed: if karma cannot be read the account is skipped, never silently kept.",
            "default": 0
          },
          "minAccountAgeDays": {
            "title": "📆 Minimum Account Age (days)",
            "minimum": 0,
            "type": "integer",
            "description": "Drop accounts younger than this many days (0 = no age filter). Example: minAccountAgeDays=90 skips accounts created in the last 3 months. Age is derived from the account's cake-day (creation timestamp).",
            "default": 0
          },
          "sortOrder": {
            "title": "🗂️ Post Sort",
            "enum": [
              "new",
              "hot",
              "top",
              "controversial"
            ],
            "type": "string",
            "description": "Order in which a user's submitted posts are collected: new (most recent), hot (currently popular), top (highest scored), controversial (most divisive).",
            "default": "new"
          },
          "maxPosts": {
            "title": "🔢 Posts per Account",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many posts to collect per account (or per keyword search). Reddit exposes roughly the 1000 most-recent items per feed, so older history is unreachable.\n\nDefault: 25.",
            "default": 25
          },
          "fetchSelftext": {
            "title": "📃 Enrich Each Post",
            "type": "boolean",
            "description": "Fetch each post's per-thread JSON to merge in fields the listing omits (full untruncated selftext, preview images, subreddit_subscribers, video media). Adds one request per post; falls back to listing-level data when the per-thread JSON is blocked.",
            "default": true
          },
          "maxComments": {
            "title": "🗨️ Comments per Post",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Attach up to this many top-level comments (made ON each post) in a comments array. 0 = skip comments (fastest). Range 0-100.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy Configuration",
            "type": "object",
            "description": "Proxy routing. Default: residential proxy with up to 3 retries per request. If you supply a custom proxy (proxyUrls or a non-residential Apify group), it is tried first, then residential as fallback."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}