{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Keyword Search with Advanced Filters",
    "description": "Search Reddit by keyword and filter the matches by subreddit, score, date range, NSFW status, and author before they reach your dataset.",
    "version": "1.0",
    "x-build-id": "F6jydNjg5CPCJcjzP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nimbryxo-studio~reddit-keyword-search-with-advanced-filters/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nimbryxo-studio-reddit-keyword-search-with-advanced-filters",
        "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/nimbryxo-studio~reddit-keyword-search-with-advanced-filters/runs": {
      "post": {
        "operationId": "runs-sync-nimbryxo-studio-reddit-keyword-search-with-advanced-filters",
        "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/nimbryxo-studio~reddit-keyword-search-with-advanced-filters/run-sync": {
      "post": {
        "operationId": "run-sync-nimbryxo-studio-reddit-keyword-search-with-advanced-filters",
        "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. Each runs as a separate search.",
            "items": {
              "type": "string"
            }
          },
          "resultLimit": {
            "title": "Result limit per keyword",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Max posts per keyword (1-1000). Default 100. Source caps are real: rendered search returns one page at a time, Translate partial 24/page, Redlib 7/page, Arctic 100/page, RSS 100/request (retired after 2026-11-13). Fewer results are reported as partial rather than silently truncated.",
            "default": 100
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "hot",
              "top",
              "new",
              "comments"
            ],
            "type": "string",
            "description": "How to sort the search results.",
            "default": "relevance"
          },
          "relativeWindow": {
            "title": "Relative time window",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Restrict results to a relative window. Maps to Reddit's t= and Arctic after= filters. Use all for no window.",
            "default": "all"
          },
          "onlyNew": {
            "title": "Only new since last run",
            "type": "boolean",
            "description": "Emit only records newer than the stored watermark for this monitorId. Forces sort=new so sources return recent records first. Requires a stable monitorId for scheduled runs; when omitted, a stable id is derived from the keyword set.",
            "default": false
          },
          "monitorId": {
            "title": "Monitor ID",
            "type": "string",
            "description": "Key used to store the onlyNew watermark and seen IDs. Use the same value on every scheduled run of the same monitor."
          },
          "searchComments": {
            "title": "Search comments by keyword",
            "type": "boolean",
            "description": "Also search comment bodies in the rendered Reddit search, Redlib, and Arctic (subreddit-scoped), with RSS parent-post discovery + hydration as a fallback. Emits recordType=comment records.",
            "default": false
          },
          "commentLimit": {
            "title": "Comment limit per keyword",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum matching comments per keyword when searchComments is enabled (1-1000).",
            "default": 50
          },
          "subredditFilter": {
            "title": "Subreddit filter (allowlist)",
            "type": "array",
            "description": "Only emit posts/comments from these subreddits (with or without `r/`). Empty = all. When set, the engine prefers subreddit-scoped sources (Translate listing, rendered subreddit search, Arctic).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "subredditBlocklist": {
            "title": "Subreddit blocklist",
            "type": "array",
            "description": "Drop posts/comments from these subreddits.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minScore": {
            "title": "Min score (filter)",
            "minimum": -10000,
            "maximum": 10000000,
            "type": "integer",
            "description": "Drop records below this score. Applied when the source exposes a score; archive scores are timestamped snapshots and are filtered as snapshots. Sources without any score are reported as metrics_unavailable instead of silently passing/dropping."
          },
          "maxAgeDays": {
            "title": "Max post age in days (filter)",
            "minimum": 1,
            "maximum": 36500,
            "type": "integer",
            "description": "Drop records older than N days."
          },
          "excludeNsfw": {
            "title": "Exclude NSFW",
            "type": "boolean",
            "description": "Drop NSFW records. Posts whose NSFW flag is unknown are not emitted as safe; comments without their own flag are kept fail-soft and counted as nsfwUnknown in the status record.",
            "default": false
          },
          "authorBlocklist": {
            "title": "Author blocklist",
            "type": "array",
            "description": "Drop posts/comments by these usernames (case-insensitive).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywordRequireAll": {
            "title": "Require all keywords (AND)",
            "type": "boolean",
            "description": "When multiple keywords are given, keep only records whose title, content, or comment body contains ALL of them. Default: each keyword runs independently (OR).",
            "default": false
          },
          "dateFrom": {
            "title": "Date from (YYYY-MM-DD)",
            "type": "string",
            "description": "Drop records with `created_at` before this date (inclusive). Format: YYYY-MM-DD or ISO timestamp."
          },
          "dateTo": {
            "title": "Date to (YYYY-MM-DD)",
            "type": "string",
            "description": "Drop records with `created_at` after this date (inclusive end-of-day). Format: YYYY-MM-DD or ISO timestamp."
          },
          "includeArchive": {
            "title": "Include Arctic Shift archive fallback",
            "type": "boolean",
            "description": "Use Arctic Shift for subreddit-scoped backfill, comment hydration, and by-ID enrichment of rendered-search posts/comments. Enrichment fills missing content, domain, flair, media, crosspost, edited and body_html fields; it never overwrites live metrics. Archive metrics are snapshots, not live.",
            "default": true
          },
          "redditOAuthToken": {
            "title": "Optional Reddit OAuth token",
            "type": "string",
            "description": "Optional user-supplied OAuth Bearer token. Never required; when present, oauth.reddit.com is tried first for live metrics. The actor does not obtain tokens for you."
          },
          "redlibInstances": {
            "title": "Redlib instances",
            "type": "array",
            "description": "Optional Redlib hostnames to try in order (without https://). Defaults to redlib-1.privadency.com and red.artemislena.eu (the same defaults as the code and README).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "resolveChallenges": {
            "title": "Resolve browser challenges",
            "type": "boolean",
            "description": "Allow Playwright to solve Reddit/Redlib challenges and render the search page. Disable to skip the browser path and keep the HTTP-only sources (Translate, Redlib HTTP, Arctic); the rendered global search and the Redlib browser fallback are then unavailable.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional Apify proxy configuration, used by both HTTP sources and the Playwright browser session. Live HTML availability varies by IP; residential proxies improve success on datacenter runs.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}