{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Comment Search Scraper - Comments by Keyword",
    "description": "Search public Reddit comments by keyword and get one row per comment: text, author, score, date, link, post and subreddit. 10,000 comments for \"chatgpt\" in 11 minutes. Label each phrase, filter by subreddit, sort or dates, or get only new comments each run. $1.29 per 1,000 comments, no login.",
    "version": "0.2",
    "x-build-id": "9Y5qkNKEzDWau2JeN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/studioxl~reddit-comment-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-studioxl-reddit-comment-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/studioxl~reddit-comment-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-studioxl-reddit-comment-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/studioxl~reddit-comment-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-studioxl-reddit-comment-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",
        "required": [
          "queries"
        ],
        "properties": {
          "queries": {
            "title": "Search phrases",
            "minItems": 1,
            "maxItems": 10,
            "type": "array",
            "description": "What to search Reddit comments for, one phrase per line (up to 10). Add your own label in front with a colon and a space, for example \"Brand A: notion alternative\"; every row then carries \"Brand A\" in the label column. A comment that matches several phrases is saved and charged once.",
            "default": [
              "notion alternative"
            ],
            "items": {
              "type": "string"
            }
          },
          "subreddits": {
            "title": "Only these subreddits",
            "maxItems": 10,
            "type": "array",
            "description": "Leave empty to search all of Reddit. Add names like \"startups\" or \"r/SaaS\" to keep only comments from those communities. Each phrase is searched in each subreddit (20 searches at most).",
            "items": {
              "type": "string",
              "maxLength": 80
            }
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "new",
              "top"
            ],
            "type": "string",
            "description": "Order of the search results. Pick Newest to monitor a keyword, Top for the most upvoted comments.",
            "default": "relevance"
          },
          "timeFilter": {
            "title": "Time range",
            "enum": [
              "all",
              "hour",
              "day",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Only keep comments written within this period.",
            "default": "all"
          },
          "maxComments": {
            "title": "Max comments",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Most comments to save in this run, across all phrases (1 to 10,000). The limit is shared fairly between phrases. You pay only for saved comments.",
            "default": 50
          },
          "maxCommentsPerQuery": {
            "title": "Max comments per phrase",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Optional. Stop each phrase after this many comments, for example 200. 0 means no per-phrase limit (the total is still shared fairly).",
            "default": 0
          },
          "dateFrom": {
            "title": "Written after",
            "type": "string",
            "description": "Optional. Keep comments written on or after this date, for example 2026-01-01 or \"7 days\"."
          },
          "dateTo": {
            "title": "Written before",
            "type": "string",
            "description": "Optional. Keep comments written on or before this date, for example 2026-03-31."
          },
          "includeNsfw": {
            "title": "Include NSFW comments",
            "type": "boolean",
            "description": "Off by default. Turn on to keep comments from posts or communities marked NSFW (18+). In our tests none of 27,823 comments were NSFW, including 350 collected with this setting on, so it rarely changes the output.",
            "default": false
          },
          "onlyNewSinceLastRun": {
            "title": "Only new comments since the last run",
            "type": "boolean",
            "description": "For scheduled runs: skip comments this feed already delivered in earlier runs. Skipped comments are not charged. The first run of a feed delivers everything it finds.",
            "default": false
          },
          "feedName": {
            "title": "Feed name",
            "type": "string",
            "description": "Runs with the same feed name share one memory of delivered comments. Use a different name per feed, for example \"notion-mentions\". Letters, digits and dashes.",
            "default": "my-comment-feed"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}