{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit User Profile Posts and Comments Scraper by Subreddit",
    "description": "Reddit User Profile Posts and Comments Scraper by Subreddit: Uncover competitor or user behavior on Reddit. This actor scrapes public profile data for deeper analysis. Perfect for community research, user profiling, and building audience personas based on real discussions.",
    "version": "0.1",
    "x-build-id": "nL7E2P9eltXC4hAqv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/api-empire~reddit-user-profile-posts-and-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-api-empire-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/api-empire~reddit-user-profile-posts-and-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-api-empire-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/api-empire~reddit-user-profile-posts-and-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-api-empire-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, Profile URLs or keyword:term",
            "type": "array",
            "description": "Targets to scrape. Each item can be a bare username, a u/name handle, a full profile URL, or a keyword search prefixed with `keyword:`.\n\nExamples:\n• spez\n• u/spez\n• https://www.reddit.com/user/spez\n• keyword:python\n\nAdd as many targets as you like.",
            "items": {
              "type": "string"
            }
          },
          "filterSubreddits": {
            "title": "🏷️ Keep Only These Subreddits",
            "type": "array",
            "description": "Restrict output to posts made in these subreddits (case-insensitive; `r/` prefix optional). Posts in any other subreddit are dropped and never charged.\n\nExample: [\"AskReddit\", \"r/python\"] keeps only posts in those two communities.\n\nLeave empty to keep every subreddit.",
            "items": {
              "type": "string"
            }
          },
          "sortOrder": {
            "title": "🗂️ Feed Sort",
            "enum": [
              "new",
              "hot",
              "top",
              "controversial"
            ],
            "type": "string",
            "description": "Order in which the user's submitted feed is read before filtering.",
            "default": "new"
          },
          "maxPosts": {
            "title": "🔢 Post Limit Per Target",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum posts to KEEP per target (after the subreddit filter). Reddit caps a profile feed at ~1000 most-recent items, so older history is unreachable.\n\nDefault: 25.",
            "default": 25
          },
          "fetchSelftext": {
            "title": "📄 Fetch Full Post Body & Media",
            "type": "boolean",
            "description": "When on, each post is enriched with its full untruncated selftext, preview images, subscriber count and video media (one extra request per post).\n\nNote: this enrichment uses Reddit's JSON API, which is frequently bot-walled inside the platform — when blocked, listing-level fields are still returned and the rest stay null (never faked).",
            "default": true
          },
          "maxComments": {
            "title": "💬 Comments To Attach Per Post",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Top-level comments made ON each collected post to attach in a `comments` array.\n\n0 = skip (fastest, default). These are replies to the post, not the user's own authored comments. JSON-API sourced, so may be empty when Reddit walls that endpoint.",
            "default": 0
          },
          "includeSubredditFootprint": {
            "title": "🗺️ Add Community Footprint Summary",
            "type": "boolean",
            "description": "Emit `subredditFootprint` — a ranked list of the subreddits the target posts in most, with post counts and share, in a per-target summary row.",
            "default": true
          },
          "includeActivityTimeline": {
            "title": "🕒 Add UTC Activity Timeline",
            "type": "boolean",
            "description": "Emit `activityByHourUTC` (24 buckets) and `activityByWeekday` (7 buckets, Monday=0) computed from each collected post's timestamp, in the per-target summary row.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy Configuration",
            "type": "object",
            "description": "Proxy settings. By default the actor routes through Apify residential proxies with automatic IP rotation and a residential fallback. Supply a custom proxy only if you need one."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}