{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Profile Crawler",
    "description": "Scrape reddit's profiles with posts and profile information.",
    "version": "2.0",
    "x-build-id": "XXgZcQ9jT50877441"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~reddit-profile-crawler/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-reddit-profile-crawler",
        "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/crawlerbros~reddit-profile-crawler/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-reddit-profile-crawler",
        "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/crawlerbros~reddit-profile-crawler/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-reddit-profile-crawler",
        "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": [
          "usernames"
        ],
        "properties": {
          "usernames": {
            "title": "Reddit Usernames",
            "minItems": 1,
            "type": "array",
            "description": "List of Reddit usernames to scrape. Accepts bare names (spez), u/ prefixed (u/spez) or profile URLs.",
            "items": {
              "type": "string"
            }
          },
          "includeProfileInfo": {
            "title": "Include profile info record",
            "type": "boolean",
            "description": "Emit a user_profile record with karma breakdown (post/comment/awardee/awarder), premium, verified email, moderator and employee flags, avatar, bio, account age.",
            "default": true
          },
          "includeTrophies": {
            "title": "Include trophies",
            "type": "boolean",
            "description": "Also fetch the user's trophy case (trophy names + icon URLs) from their profile page. Adds one page load per user; trophies are omitted when the user has none.",
            "default": false
          },
          "includeModeratedSubreddits": {
            "title": "Include moderated subreddits",
            "type": "boolean",
            "description": "Also fetch the list of communities the user moderates (subreddit name, subscribers, type, mod permissions) and attach it to the user_profile record. Omitted when the user moderates nothing.",
            "default": false
          },
          "sections": {
            "title": "Profile sections",
            "type": "array",
            "description": "Which sections of the user's history to scrape. 'Overview' returns the combined posts + comments feed. Leave the default ['posts'] for posts only.",
            "items": {
              "type": "string",
              "enum": [
                "overview",
                "posts",
                "comments"
              ],
              "enumTitles": [
                "Overview (posts + comments)",
                "Posts",
                "Comments"
              ]
            },
            "default": [
              "posts"
            ]
          },
          "maxPosts": {
            "title": "Maximum posts per user",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of posts to scrape per user (from the posts and overview sections).",
            "default": 100
          },
          "maxComments": {
            "title": "Maximum comments per user",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of comments to scrape per user (from the comments and overview sections).",
            "default": 100
          },
          "sort": {
            "title": "Sort history by",
            "enum": [
              "new",
              "hot",
              "top",
              "controversial"
            ],
            "type": "string",
            "description": "How to sort the user's history.",
            "default": "new"
          },
          "timeFilter": {
            "title": "Time filter (for 'top' and 'controversial' sort)",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Time filter when sorting history by 'top' or 'controversial'.",
            "default": "all"
          },
          "includeNSFW": {
            "title": "Include NSFW (18+) content",
            "type": "boolean",
            "description": "Include NSFW posts in the user's history.",
            "default": false
          },
          "onlyWithFlair": {
            "title": "Only posts with flair",
            "type": "boolean",
            "description": "Keep only posts that have a link flair set. Has no effect on comments (comments don't carry link flair).",
            "default": false
          },
          "subreddits": {
            "title": "Restrict to subreddits",
            "type": "array",
            "description": "Only keep posts/comments made in these subreddits (case-insensitive). Accepts bare names (python), r/ prefixed (r/python), or subreddit URLs. Leave empty to include every subreddit in the user's history.",
            "items": {
              "type": "string"
            }
          },
          "keyword": {
            "title": "Keyword filter",
            "type": "string",
            "description": "Only keep posts/comments whose title, self-text or comment body contains this text (case-insensitive substring match). Leave empty to disable."
          },
          "titleContains": {
            "title": "Title contains keyword",
            "type": "string",
            "description": "Only keep posts whose title contains this text (case-insensitive substring match). Has no effect on comments. Leave empty to keep all titles."
          },
          "contentContains": {
            "title": "Post text contains keyword",
            "type": "string",
            "description": "Only keep self (text) posts whose body contains this text (case-insensitive substring match). Link/image/video posts have no body text and are excluded when this is set. Has no effect on comments. Leave empty to keep all posts."
          },
          "flairContains": {
            "title": "Flair contains keyword",
            "type": "string",
            "description": "Only keep posts whose link flair text contains this text (case-insensitive substring match). Has no effect on comments. Leave empty to keep all flairs."
          },
          "authorFlairContains": {
            "title": "Author flair contains keyword",
            "type": "string",
            "description": "Only keep posts whose author flair text contains this text (case-insensitive substring match). Has no effect on comments. Leave empty to keep all."
          },
          "domain": {
            "title": "Domain contains",
            "type": "string",
            "description": "Only keep posts whose link domain contains this text (case-insensitive, e.g. 'youtube.com' or 'self.python'). Has no effect on comments. Leave empty to keep all domains."
          },
          "distinguished": {
            "title": "Distinguished (official) posts only",
            "enum": [
              "moderator",
              "admin",
              "special",
              "none"
            ],
            "type": "string",
            "description": "Only keep posts distinguished by Reddit as moderator, admin or special (e.g. Reddit-team) posts, or only regular (non-distinguished) posts. Has no effect on comments. Leave unset to keep all posts."
          },
          "minAwards": {
            "title": "Minimum awards received",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Only keep posts with at least this many total awards. Has no effect on comments. Leave unset to keep all posts."
          },
          "onlyOriginalContent": {
            "title": "Only original content (OC) posts",
            "type": "boolean",
            "description": "When enabled, only posts the author tagged as original content are kept. Has no effect on comments.",
            "default": false
          },
          "excludeArchived": {
            "title": "Exclude archived posts",
            "type": "boolean",
            "description": "When enabled, posts that Reddit has archived (locked from further voting/commenting after 6 months) are dropped from the results. Has no effect on comments.",
            "default": false
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop posts whose title, self-text body or flair contains any of these keywords or phrases (case-insensitive substring match) — useful for filtering out megathreads, giveaways or spam boilerplate. Has no effect on comments. Leave empty to keep all posts.",
            "items": {
              "type": "string"
            }
          },
          "minContentLength": {
            "title": "Minimum post body length (characters)",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Only keep self (text) posts whose body is at least this many characters long. Link/image/video posts have no body and are excluded when this is set. Has no effect on comments. Leave unset to keep all lengths."
          },
          "maxContentLength": {
            "title": "Maximum post body length (characters)",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Only keep self (text) posts whose body is at most this many characters long. Has no effect on comments. Leave unset to keep all lengths."
          },
          "postType": {
            "title": "Only posts of this type",
            "enum": [
              "self",
              "link",
              "image",
              "video",
              "gallery",
              "poll"
            ],
            "type": "string",
            "description": "Keep only posts of the selected content type. Leave unset to keep all types. Has no effect on comments."
          },
          "minScore": {
            "title": "Minimum score (upvotes minus downvotes)",
            "minimum": -1000000,
            "maximum": 1000000,
            "type": "integer",
            "description": "Only keep posts/comments with a score at or above this value. Leave unset to keep all scores."
          },
          "maxScore": {
            "title": "Maximum score (upvotes minus downvotes)",
            "minimum": -1000000,
            "maximum": 1000000,
            "type": "integer",
            "description": "Only keep posts/comments with a score at or below this value. Useful for finding overlooked/low-visibility items. Leave unset to keep all scores."
          },
          "minPostComments": {
            "title": "Minimum comments on the post",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Only keep posts that have at least this many comments (the post's own comment count — not to be confused with 'Maximum comments per user' above, which caps how many comment records are scraped). Has no effect on comments."
          },
          "maxPostComments": {
            "title": "Maximum comments on the post",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Only keep posts that have at most this many comments. Useful for finding under-discussed posts. Has no effect on comments."
          },
          "minUpvoteRatio": {
            "title": "Minimum upvote ratio",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Only keep posts whose upvote ratio (fraction of votes that are upvotes, 0-1) is at or above this value. Useful for filtering out controversial/divisive posts. Has no effect on comments."
          },
          "excludeStickied": {
            "title": "Exclude stickied/pinned posts",
            "type": "boolean",
            "description": "When enabled, posts pinned/stickied in their community are dropped from the results.",
            "default": false
          },
          "excludeRemoved": {
            "title": "Exclude removed/deleted posts",
            "type": "boolean",
            "description": "When enabled, posts removed by a moderator, Reddit, or deleted by their author (marker: removed_by_category) are dropped from the results.",
            "default": false
          },
          "excludeCrossposts": {
            "title": "Exclude crossposts",
            "type": "boolean",
            "description": "When enabled, posts that are crossposts from another subreddit are dropped, keeping only the user's original submissions.",
            "default": false
          },
          "excludeSpoilers": {
            "title": "Exclude spoiler-tagged posts",
            "type": "boolean",
            "description": "When enabled, posts marked as a spoiler by their author are dropped from the results.",
            "default": false
          },
          "excludeLocked": {
            "title": "Exclude locked posts",
            "type": "boolean",
            "description": "When enabled, posts with comments locked by a moderator are dropped from the results.",
            "default": false
          },
          "excludeDeletedAuthor": {
            "title": "Exclude posts with a deleted author",
            "type": "boolean",
            "description": "When enabled, posts whose author account was deleted (shown as [deleted]/[removed]) are dropped from the results.",
            "default": false
          },
          "postedAfter": {
            "title": "Items created on or after (YYYY-MM-DD)",
            "type": "string",
            "description": "Only keep items created on or after this date (UTC)."
          },
          "postedBefore": {
            "title": "Items created on or before (YYYY-MM-DD)",
            "type": "string",
            "description": "Only keep items created on or before this date (interpreted as the end of that day, UTC)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}