{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Search Scraper - Posts by Keyword, No API Key",
    "description": "Find Reddit posts by keyword inside the subreddits you choose, with full post text. Sort by new, top or hot, filter by time, add comments. Schedule it for keyword alerts. No login, no API key.",
    "version": "0.1",
    "x-build-id": "agSt4eRruN9qjAoqF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/headply~reddit-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-headply-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/headply~reddit-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-headply-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/headply~reddit-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-headply-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": {
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "Keywords or phrases to find in posts (title, text and flair) of the subreddits below. Each keyword is a separate search and every result is tagged with the keyword that found it. Use quotes for an exact phrase, -word to leave posts out, word* for prefixes and OR between alternatives.",
            "items": {
              "type": "string"
            }
          },
          "searchSubreddits": {
            "title": "Limit search to subreddits",
            "type": "array",
            "description": "Required for keyword search: every keyword is searched inside each of these subreddits (python or r/python). Reddit no longer allows search across all of Reddit without logging in.",
            "items": {
              "type": "string"
            }
          },
          "searchSort": {
            "title": "Search sort",
            "enum": [
              "new",
              "relevance",
              "top",
              "comments"
            ],
            "type": "string",
            "description": "Order of search results. \"Newest first\" suits monitoring a keyword on a schedule.",
            "default": "new"
          },
          "time": {
            "title": "Time range (Top sort and search)",
            "enum": [
              "none",
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Time window for \"Top\" feeds and for search. Ignored by the other sorts.",
            "default": "none"
          },
          "maxItemsPerTarget": {
            "title": "Max posts per subreddit, user or search",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Upper bound on posts returned for each subreddit, user or search keyword. Pages are fetched until this is reached or the feed ends.",
            "default": 50
          },
          "includeComments": {
            "title": "Include comments of each post",
            "type": "boolean",
            "description": "Also scrape the comment tree of every post found in subreddit, user and search feeds (post URLs always include comments).",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Upper bound on comments per post, across all depths. \"Load more\" and \"more replies\" are expanded until this is reached. 0 skips comments.",
            "default": 100
          },
          "commentSort": {
            "title": "Comment sort",
            "enum": [
              "top",
              "new",
              "confidence",
              "controversial",
              "old",
              "qa"
            ],
            "type": "string",
            "description": "Order in which comments are collected. With a comment limit, this decides which comments you get. Use \"New\" with feed mode to follow a thread.",
            "default": "top"
          },
          "onlyNewSinceLastRun": {
            "title": "Only new since last run (feed mode)",
            "type": "boolean",
            "description": "For schedules. Returns and bills only items not delivered by an earlier run with the same monitor name, and keeps an RSS/Atom feed at a fixed link. The first run of a feed delivers the latest posts at the standard price; every later run returns only new items, at the lower new-item price.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Label for this feed's memory and RSS file. Runs with the same name share memory; use one name per schedule or client to keep them separate. Change it to start fresh.",
            "default": "default"
          },
          "rssOutput": {
            "title": "Write RSS/Atom feed",
            "type": "boolean",
            "description": "Also write the results as RSS 2.0 (FEED.xml) and Atom (FEED.atom) to the run's key-value store. In feed mode the feed is also kept at a fixed link (shown in the log and the run summary) that feed readers and n8n/Zapier RSS steps can follow.",
            "default": false
          },
          "startUrls": {
            "title": "Subreddits, users, searches or posts",
            "type": "array",
            "description": "Reddit URLs or shorthand, one per line. Accepts subreddits (r/python, https://www.reddit.com/r/python/new/), users (u/spez), search URLs (https://www.reddit.com/search/?q=n8n&sort=new) and post URLs. Old RSS links work too (https://www.reddit.com/r/python/new/.rss): paste the feed URLs your reader used. r/a+b multireddits are split into one feed per subreddit.",
            "items": {
              "type": "string"
            }
          },
          "postUrls": {
            "title": "Post URLs",
            "type": "array",
            "description": "Reddit post links (https://www.reddit.com/r/<sub>/comments/<id>/<slug>/, redd.it/<id> or t3_<id>). Returns the post and its comment tree, with depth, parent id and \"load more\" expansion up to the comment limit.",
            "items": {
              "type": "string"
            }
          },
          "sort": {
            "title": "Subreddit and user sort",
            "enum": [
              "new",
              "hot",
              "top",
              "rising"
            ],
            "type": "string",
            "description": "Order for subreddit and user feeds when the URL does not say. \"New\" is what RSS feeds used.",
            "default": "new"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Parallel requests. The default is fast and gentle; raise it for large jobs.",
            "default": 5
          },
          "maxRequestRetries": {
            "title": "Max retries per page",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "A page that fails to load is retried automatically up to this many times before it is skipped and listed in the run summary.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Leave as is. The default is the setting that works reliably with Reddit.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}