{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Comments Search Scraper",
    "description": "Search public Reddit comments by keyword and get clean, structured records for social listening and research. Works with Apify MCP and the API.",
    "version": "1.1",
    "x-build-id": "Vei8ruHNvhDmaewYk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~reddit-comments-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-reddit-comments-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/khadinakbar~reddit-comments-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-reddit-comments-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/khadinakbar~reddit-comments-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-reddit-comments-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": {
          "queries": {
            "title": "Comment search phrases",
            "type": "array",
            "description": "Use this to find public Reddit comments that mention one or more phrases. Pass phrases such as \"AI coding assistant\" or \"best standing desk\". Up to 20 phrases; each phrase can return about 250 comments. This is not a Reddit URL, username or post link.",
            "default": [
              "artificial intelligence"
            ],
            "items": {
              "type": "string"
            }
          },
          "subreddits": {
            "title": "Subreddits (optional)",
            "type": "array",
            "description": "Use this to search inside specific communities. Pass names such as \"MachineLearning\" or \"r/MachineLearning\", up to 10. Leave empty to search all of Reddit. Each phrase is searched in every community you list, so 2 phrases and 3 communities make 6 searches.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "subreddit": {
            "title": "Single subreddit (older field)",
            "type": "string",
            "description": "Older way to limit the search to one community. Still works; it is added to the subreddits list. Prefer the subreddits list.",
            "default": ""
          },
          "author": {
            "title": "Only comments by this user",
            "type": "string",
            "description": "Use this to keep only comments written by one Reddit user. Pass a name such as \"spez\" or \"u/spez\". Leave empty for any author.",
            "default": ""
          },
          "maxComments": {
            "title": "Maximum comments",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Use this to cap the comments saved across all phrases and communities, from 1 to 1,000. You are charged only for comments saved, so this also caps your cost. Runs above 800 start with more memory automatically.",
            "default": 100
          },
          "sort": {
            "title": "Result order",
            "enum": [
              "relevance",
              "new",
              "top",
              "comments"
            ],
            "type": "string",
            "description": "Use this to choose how matches are ordered. \"Newest first\" is best together with a date range because the search stops as soon as results get older than your range. \"comments\" is an older option that behaves like best match.",
            "default": "relevance"
          },
          "time": {
            "title": "Search time window",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Use this for a quick time window. For exact dates use the date range fields below. \"hour\" is widened to the past day, so check the createdAt field for exact cutoffs.",
            "default": "all"
          },
          "dateFrom": {
            "title": "Earliest date",
            "type": "string",
            "description": "Use this to keep only comments written on or after a date, in the form 2026-10-01 (UTC). Leave empty for no start date.",
            "default": ""
          },
          "dateTo": {
            "title": "Latest date",
            "type": "string",
            "description": "Use this to keep only comments written on or before a date, in the form 2026-10-31 (UTC). Leave empty for no end date.",
            "default": ""
          },
          "maxDaysOld": {
            "title": "Maximum age in days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Use this to keep only comments from the last N days, for example 30. If you also set an earliest date, the later of the two applies. Leave empty for no age limit."
          },
          "minScore": {
            "title": "Minimum comment score",
            "minimum": -1000,
            "maximum": 1000000,
            "type": "integer",
            "description": "Use this to keep only comments with at least this Reddit score, for example 5. Comments whose score is hidden are skipped when this is set. Comments below the score are not saved and not charged."
          },
          "exactPhrase": {
            "title": "Require the exact phrase",
            "type": "boolean",
            "description": "Use this to keep only comments that contain your phrase word for word. When off, a comment is kept if it contains every word of your phrase in any order. Comments that fail are not saved and not charged.",
            "default": false
          },
          "commentType": {
            "title": "Top-level comments or replies",
            "enum": [
              "all",
              "top-level",
              "replies"
            ],
            "type": "string",
            "description": "Use this to keep only top-level comments (direct answers to the post) or only replies to other comments. Rows from the backup source cannot tell the two apart and are skipped when you pick one.",
            "default": "all"
          },
          "includeNsfw": {
            "title": "Include adult-marked comments",
            "type": "boolean",
            "description": "Use this only when adult-marked public content fits your research. Off by default. It does not give access to private communities.",
            "default": false
          },
          "responseFormat": {
            "title": "Response detail",
            "enum": [
              "concise",
              "detailed"
            ],
            "type": "string",
            "description": "Use \"concise\" for core fields or \"detailed\" to add the time the containing post was created. It does not change matching or cost.",
            "default": "concise"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}