{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Search & Brand Monitoring: Posts & Comments",
    "description": "Reddit search scraper and Reddit keyword search: find the posts and comments that mention any keyword, brand or competitor across Reddit, with score, text, subreddit and author. A Reddit search API with no login, fast, pay per result.",
    "version": "1.0",
    "x-build-id": "6HL39BQszVSMO3gT9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/deepmine~reddit-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-deepmine-reddit-search-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/deepmine~reddit-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-deepmine-reddit-search-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/deepmine~reddit-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-deepmine-reddit-search-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": {
          "searches": {
            "title": "🔍 Search terms",
            "type": "array",
            "description": "Keywords, brand or product names to find, one per line, e.g. Shopify. Each is searched across all of Reddit (or one subreddit, under More ways to search).",
            "items": {
              "type": "string",
              "pattern": "\\S"
            }
          },
          "searchType": {
            "title": "🔎 Search for",
            "enum": [
              "posts",
              "comments",
              "communities",
              "users"
            ],
            "type": "string",
            "description": "What the search terms look for. Comments finds comments that use your words anywhere on Reddit (Search sort: relevance, new or top; Search period and Search only in this subreddit apply), each with its post and community.",
            "default": "posts"
          },
          "searchSort": {
            "title": "🔃 Sort",
            "enum": [
              "relevance",
              "new",
              "top",
              "comments",
              "hot"
            ],
            "type": "string",
            "description": "Order of results: Relevance, New (latest mentions first, best for monitoring), Top, Most comments or Hot.",
            "default": "relevance"
          },
          "searchTime": {
            "title": "📅 Period",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "How far back to look. Comments older than this are skipped (free).",
            "default": "all"
          },
          "matchMode": {
            "title": "✅ Match",
            "enum": [
              "any",
              "all",
              "phrase"
            ],
            "type": "string",
            "description": "How closely a post or comment must match your search terms.\n\n• Reddit's match: whatever Reddit's search finds (it also matches word stems and other fields, so some results only touch your words).\n• Every word: the post's title and text (or the comment) must hold every word of the search term, in any order.\n• Exact phrase: the words in a row, as typed (case, punctuation and line breaks don't matter).\n\nResults that don't match aren't delivered and aren't charged. A post's own comments (Include comments) always come with it.",
            "default": "any"
          },
          "maxItemsPerSource": {
            "title": "📊 Max results per search term",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Most posts (or comments, communities or users) per search term. Reddit stops a post search at about 250 per sort; Maximize coverage gets more.",
            "default": 100
          },
          "withinSubreddit": {
            "title": "Search only in this subreddit",
            "type": "string",
            "description": "Optional subreddit name (e.g. CRM) to limit search terms to. With Comments, other communities' comments are skipped (free)."
          },
          "maximizeCoverage": {
            "title": "Maximize coverage",
            "type": "boolean",
            "description": "Reddit stops a search at about 250 posts per sort. On: each search is also read in other sorts and periods (new, top by year, month, week...) and merged without duplicates.",
            "default": false
          },
          "startUrls": {
            "title": "Reddit search URLs",
            "type": "array",
            "description": "Optional: Reddit search links, one per row (reddit.com/search/?q=...&sort=new); each keeps its own sort, period and type. Other Reddit links (a subreddit, a post) work too.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "URL",
                  "type": "string",
                  "description": "A Reddit link.",
                  "pattern": "\\S"
                }
              }
            }
          },
          "postedAfter": {
            "title": "Posted after",
            "type": "string",
            "description": "Only posts and comments from after this date: 2026-09-01, 2026-09-01T12:00:00Z, or a period like '7 days' or '12 hours'."
          },
          "postedBefore": {
            "title": "Posted before",
            "type": "string",
            "description": "Only posts and comments from before this date (same formats)."
          },
          "minScore": {
            "title": "Minimum score",
            "minimum": -100000,
            "maximum": 10000000,
            "type": "integer",
            "description": "Skip posts with a lower score (upvotes minus downvotes), e.g. 10. Empty = no minimum."
          },
          "includeNSFW": {
            "title": "Include NSFW (18+)",
            "type": "boolean",
            "description": "Keep posts and communities marked 18+.",
            "default": true
          },
          "includeComments": {
            "title": "💬 Include comments",
            "type": "boolean",
            "description": "Add each post's comments, replies included, right after the post. Each comment is one result.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "💬 Max comments per post",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Most comments to read per post, replies included, in Reddit's thread order (e.g. 4 for a quick look, 500 for whole threads).",
            "default": 100
          },
          "maxResults": {
            "title": "🧮 Max results (total)",
            "minimum": 1,
            "maximum": 10000000,
            "type": "integer",
            "description": "Most rows for the whole run: every source, post, comment, user and community counted together. Empty = no total cap (Max posts per source and your spending limit still apply)."
          },
          "includeCommunityRules": {
            "title": "Community rules",
            "type": "boolean",
            "description": "For community search results, also read each community's rules (one extra Reddit call per community; free).",
            "default": true
          },
          "commentDepth": {
            "title": "Comment depth",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How deep in reply chains to go: 1 = top-level comments only, 10 = Reddit's maximum.",
            "default": 10
          },
          "commentSort": {
            "title": "Comment sort",
            "enum": [
              "confidence",
              "top",
              "new",
              "controversial",
              "old",
              "qa"
            ],
            "type": "string",
            "description": "Order of comments, as on Reddit.",
            "default": "confidence"
          },
          "writeTables": {
            "title": "Posts-only, Comments-only, Communities-only and Users-only tables",
            "type": "boolean",
            "description": "Also write the free per-type tables (Output tab). Left empty: Console runs write them, runs started through the API or a schedule don't (every row is in the default dataset either way)."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Leave as is: Reddit answers Apify's datacenter proxy, the cheapest option. If you pick Residential, the run still reads through datacenter and uses your residential IPs only to retry a call Reddit refuses there.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}