{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit API Scraper : User Profiles",
    "description": "Reddit API Scraper — Scrape Reddit user profiles and extract usernames, profile details, karma, account dates, avatars, activity, and profile metadata. Build structured datasets for audience research, community analysis, user discovery, and Reddit insights.",
    "version": "0.1",
    "x-build-id": "es3ICxwk5wdDKaP6a"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapier~reddit-api-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapier-reddit-api-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/scrapier~reddit-api-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapier-reddit-api-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/scrapier~reddit-api-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapier-reddit-api-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",
        "properties": {
          "usernames": {
            "title": "🧑‍💻 Usernames or profile URLs",
            "type": "array",
            "description": "Reddit usernames to look up (e.g. spez, u/spez) or full profile URLs (e.g. https://www.reddit.com/user/spez). Add multiple with + Add or Bulk edit, one per line. Each user's public profile and activity is collected once.",
            "items": {
              "type": "string"
            }
          },
          "includePosts": {
            "title": "📝 Include submitted posts",
            "type": "boolean",
            "description": "When on, fetches posts submitted by each user (from their public post history) and adds one row per post. Default: true.",
            "default": true
          },
          "includeComments": {
            "title": "💬 Include comments",
            "type": "boolean",
            "description": "When on, fetches comments made by each user (from their public comment history) and adds one row per comment. Default: true.",
            "default": true
          },
          "maxItemsPerUser": {
            "title": "🔢 Max posts/comments per user",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of posts to fetch per user AND maximum number of comments to fetch per user (each capped independently at this number, 0–1000). Example: maxItemsPerUser=20 with both toggles on → up to 20 posts + up to 20 comments per user. Set to 0 to skip content and collect only the profile block. Default: 20.",
            "default": 20
          },
          "sort": {
            "title": "🔀 Content sort order",
            "enum": [
              "new",
              "hot",
              "top",
              "controversial"
            ],
            "type": "string",
            "description": "How each user's posts and comments are ordered: New (latest first, exact), Top (highest scoring, exact), Hot (approximated from recent top-scoring activity), or Controversial (comments: genuinely most divisive by Reddit's own controversiality flag; posts: approximated from vote balance). Default: New.",
            "default": "new"
          },
          "searchKeywords": {
            "title": "🔑 Search keywords (legacy)",
            "type": "array",
            "description": "Optional. Original keyword-search mode: searches for each word/phrase within the subreddits listed below and returns matching posts, grouped by keyword. Runs alongside the user lookups above, not instead of them. Same field as the base Reddit API Scraper actor. Requires at least one entry in 'Restrict legacy search to subreddits' below — a subreddit-free, Reddit-wide scan isn't supported.",
            "items": {
              "type": "string"
            }
          },
          "subredditNames": {
            "title": "📍 Restrict legacy search to subreddits",
            "type": "array",
            "description": "Required when using 'Search keywords (legacy)' above — the keyword search runs within these subreddits. Same field as the base actor.",
            "items": {
              "type": "string"
            }
          },
          "resultsLimitPerKeyword": {
            "title": "📊 Legacy results limit per keyword",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum posts to fetch per legacy search keyword (1–1000). Same field as the base actor. Default: 10.",
            "default": 10
          },
          "sorting": {
            "title": "📅 Legacy search sorting",
            "enum": [
              "new",
              "hot",
              "top",
              "relevance"
            ],
            "type": "string",
            "description": "How legacy keyword-search results are ordered: New/Relevance (latest first, exact) or Hot/Top (highest scoring, exact). Default: New.",
            "default": "new"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}