{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Keywords",
    "description": "Welcome to Reddit Keywords Scraper. Scrape Posts from Reddit through Reddit search engine by providing your desired keyword, the crawler will return post urls, number of comments, score, title, content, thumbnail and much more. Be sure to leave a review and provide feedback.",
    "version": "2.0",
    "x-build-id": "1Tozcb7WfV1QyB56D"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~reddit-keywords/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-reddit-keywords",
        "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-keywords/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-reddit-keywords",
        "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-keywords/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-reddit-keywords",
        "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": [
          "keywords"
        ],
        "properties": {
          "keywords": {
            "title": "Keywords",
            "minItems": 1,
            "type": "array",
            "description": "List of keywords to search for on Reddit. Each keyword is searched separately. Advanced search syntax is supported: exact phrases (\"machine learning\"), boolean (python AND rust, python OR django, python NOT snake, (python OR django) AND framework), exclusion (-javascript), and field operators (author:name, subreddit:name, flair:tag, selftext:\"phrase\", site:domain).",
            "items": {
              "type": "string"
            }
          },
          "searchPosts": {
            "title": "Search for posts",
            "type": "boolean",
            "description": "Include posts in the keyword search results.",
            "default": true
          },
          "searchComments": {
            "title": "Search for comments",
            "type": "boolean",
            "description": "Include comments in the keyword search results.",
            "default": false
          },
          "searchCommunities": {
            "title": "Search for communities",
            "type": "boolean",
            "description": "Include subreddits in the keyword search results (full community data: subscribers, description, rules-friendly fields).",
            "default": false
          },
          "searchUsers": {
            "title": "Search for users",
            "type": "boolean",
            "description": "Include Reddit accounts (usernames) that match the keyword in the results (e.g. finding accounts named after a brand or topic).",
            "default": false
          },
          "withinCommunity": {
            "title": "Limit search to one or more communities",
            "type": "string",
            "description": "Restrict the keyword search to specific subreddits. Accepts a bare name (developers), r/developers, a full subreddit URL, or a comma-separated list to search several subreddits at once (developers,programming). Leave empty to search all of Reddit. Applies to posts, comments and communities; user search is always global (Reddit does not scope account search to a subreddit)."
          },
          "sort": {
            "title": "Sort search results by",
            "enum": [
              "relevance",
              "hot",
              "top",
              "new",
              "comments"
            ],
            "type": "string",
            "description": "How the keyword search results are ranked.",
            "default": "relevance"
          },
          "timeFilter": {
            "title": "Time range",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Limit results to posts from a specific time window. Applies to the Top sort (as in Reddit's search UI); other sorts ignore it.",
            "default": "all"
          },
          "resultLimit": {
            "title": "Maximum posts per keyword",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of posts to scrape for each keyword (1-1000).",
            "default": 100
          },
          "maxComments": {
            "title": "Maximum comments per keyword",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of comments to scrape per keyword (when 'Search for comments' is enabled).",
            "default": 100
          },
          "maxCommunities": {
            "title": "Maximum communities per keyword",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of subreddits to return per keyword (when 'Search for communities' is enabled).",
            "default": 10
          },
          "maxUsers": {
            "title": "Maximum users per keyword",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of Reddit accounts to return per keyword (when 'Search for users' is enabled). Reddit serves a single results page for account search (no further pagination), so the reliable ceiling is 100.",
            "default": 25
          },
          "maxItems": {
            "title": "Maximum total results",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Hard cap on the total number of records returned for the whole run (all keywords, all result types combined). The run stops as soon as this budget is spent.",
            "default": 100000
          },
          "includeNSFW": {
            "title": "Include NSFW (18+) content",
            "type": "boolean",
            "description": "Include NSFW posts in the results.",
            "default": false
          },
          "onlyWithFlair": {
            "title": "Only posts with a link flair",
            "type": "boolean",
            "description": "Keep only posts that have a link flair set (e.g. 'Discussion', 'News'). Posts without any flair are dropped.",
            "default": false
          },
          "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."
          },
          "minScore": {
            "title": "Minimum score (upvotes minus downvotes)",
            "minimum": -100000,
            "maximum": 1000000,
            "type": "integer",
            "description": "Only keep posts with a score at or above this value. Leave unset to keep all scores."
          },
          "minComments": {
            "title": "Minimum number of comments",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Only keep posts with at least this many comments. Leave unset to keep all posts."
          },
          "maxScore": {
            "title": "Maximum score (upvotes minus downvotes)",
            "minimum": -100000,
            "maximum": 1000000,
            "type": "integer",
            "description": "Only keep posts with a score at or below this value. Useful for finding overlooked/low-visibility posts. Leave unset to keep all scores."
          },
          "minAwards": {
            "title": "Minimum awards received",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Only keep posts (and comments, when 'Search for comments' is enabled) with at least this many total awards. Leave unset to keep all."
          },
          "titleContains": {
            "title": "Title contains keyword",
            "type": "string",
            "description": "Only keep posts whose title contains this text (case-insensitive substring match). Applies on top of the keyword search. 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. Leave empty to keep all posts."
          },
          "flairContains": {
            "title": "Flair contains keyword",
            "type": "string",
            "description": "Only keep posts whose flair text contains this text (case-insensitive substring match). Leave empty to keep all flairs."
          },
          "authorFlairContains": {
            "title": "Author flair contains keyword",
            "type": "string",
            "description": "Only keep posts (and comments, when 'Search for comments' is enabled) whose author flair text contains this text (case-insensitive substring match). Leave empty to keep all."
          },
          "authors": {
            "title": "Only results by these authors",
            "type": "array",
            "description": "Only keep posts (and comments, when 'Search for comments' is enabled) submitted by one of these usernames (bare name or u/-prefixed, case-insensitive). Leave empty to keep results from all authors.",
            "items": {
              "type": "string"
            }
          },
          "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'). Leave empty to keep all domains."
          },
          "distinguished": {
            "title": "Distinguished (official) posts/comments only",
            "enum": [
              "moderator",
              "admin",
              "special",
              "none"
            ],
            "type": "string",
            "description": "Only keep posts (and comments, when 'Search for comments' is enabled) distinguished by Reddit as moderator, admin or special (e.g. Reddit-team), or only regular (non-distinguished) results. Leave unset to keep all."
          },
          "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
          },
          "onlyOriginalContent": {
            "title": "Only original content (OC) posts",
            "type": "boolean",
            "description": "When enabled, only posts the author tagged as original content are kept.",
            "default": false
          },
          "excludeStickied": {
            "title": "Exclude stickied/pinned posts",
            "type": "boolean",
            "description": "When enabled, posts pinned/stickied by moderators (and, when 'Search for comments' is enabled, comments stickied by a moderator) are dropped from the results.",
            "default": false
          },
          "excludeCrossposts": {
            "title": "Exclude crossposts",
            "type": "boolean",
            "description": "When enabled, posts that are crossposted from another subreddit are dropped from the results.",
            "default": false
          },
          "excludeArchived": {
            "title": "Exclude archived posts",
            "type": "boolean",
            "description": "When enabled, posts (and, when 'Search for comments' is enabled, comments) that Reddit has archived (locked from further voting/commenting after 6 months) are dropped from the results.",
            "default": false
          },
          "excludeLocked": {
            "title": "Exclude locked posts",
            "type": "boolean",
            "description": "When enabled, posts that a moderator has locked from further comments (and, when 'Search for comments' is enabled, comments a moderator has locked from further replies) are dropped from the results.",
            "default": false
          },
          "excludeDeleted": {
            "title": "Exclude deleted/removed content",
            "type": "boolean",
            "description": "Drop posts and comments whose author account was deleted or whose content was removed by a moderator/admin (Reddit marks these with the literal '[deleted]' or '[removed]' placeholders).",
            "default": false
          },
          "minUpvoteRatio": {
            "title": "Minimum upvote ratio",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Only keep posts whose upvote ratio (fraction of upvotes among all votes) is at or above this value. Leave unset to keep all ratios."
          },
          "minCommentScore": {
            "title": "Minimum comment score (upvotes minus downvotes)",
            "minimum": -100000,
            "maximum": 1000000,
            "type": "integer",
            "description": "Only keep comments with a score at or above this value. Applies when 'Search for comments' is enabled; ignored otherwise. Leave unset to keep all scores."
          },
          "commentContains": {
            "title": "Comment text contains keyword",
            "type": "string",
            "description": "Only keep comments whose body contains this text (case-insensitive substring match). Applies when 'Search for comments' is enabled; ignored otherwise. Leave empty to keep all comments."
          },
          "onlyOPComments": {
            "title": "Only comments by the original poster",
            "type": "boolean",
            "description": "When enabled, keep only comments written by the post's original poster (self-replies). Applies when 'Search for comments' is enabled; ignored otherwise.",
            "default": false
          },
          "minCommunitySubscribers": {
            "title": "Minimum community subscribers",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Only keep communities (subreddits) with at least this many subscribers. Applies when 'Search for communities' is enabled; ignored otherwise. Leave unset to keep all sizes."
          },
          "subredditType": {
            "title": "Community access type",
            "enum": [
              "public",
              "restricted",
              "private",
              "gold_only",
              "archived",
              "user"
            ],
            "type": "string",
            "description": "Only keep results whose community has this access type (e.g. 'public' to exclude results from private/restricted/gold-only/archived subs you can't freely join, post or comment in). Applies to posts, comments and communities alike. Leave unset to keep all types."
          },
          "minUserKarma": {
            "title": "Minimum total karma",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Only keep Reddit accounts with at least this much total karma. Applies when 'Search for users' is enabled; ignored otherwise. Leave unset to keep all accounts."
          },
          "minPostKarma": {
            "title": "Minimum post karma",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Only keep Reddit accounts with at least this much post (link) karma. Applies when 'Search for users' is enabled; ignored otherwise. Leave unset to keep all accounts."
          },
          "minCommentKarma": {
            "title": "Minimum comment karma",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Only keep Reddit accounts with at least this much comment karma. Applies when 'Search for users' is enabled; ignored otherwise. Leave unset to keep all accounts."
          },
          "postedAfter": {
            "title": "Created on or after (YYYY-MM-DD)",
            "type": "string",
            "description": "Only keep results created on or after this date (UTC). Applies to posts, comments, communities (subreddit creation date) and users (account creation date) alike. Reddit caps each search at roughly 1,000 results and the live index often serves far fewer (~225-250), so a distant date window on a very broad query may not be fully reachable."
          },
          "postedBefore": {
            "title": "Created on or before (YYYY-MM-DD)",
            "type": "string",
            "description": "Only keep results created on or before this date (interpreted as the end of that day, UTC). Applies to posts, comments, communities (subreddit creation date) and users (account creation date) alike."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}