{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper Lite",
    "description": "Pay-per-result, unlimited Reddit web scraper that crawls posts, comments, communities, and users without requiring login. It allows limiting scraping by the number of posts or items and exports all extracted data into multiple dataset formats",
    "version": "1.0",
    "x-build-id": "oa7SsGiNvEiaJBqsY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapeai~reddit-scraper-lite/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapeai-reddit-scraper-lite",
        "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/scrapeai~reddit-scraper-lite/runs": {
      "post": {
        "operationId": "runs-sync-scrapeai-reddit-scraper-lite",
        "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/scrapeai~reddit-scraper-lite/run-sync": {
      "post": {
        "operationId": "run-sync-scrapeai-reddit-scraper-lite",
        "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": [
          "proxy"
        ],
        "properties": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "If you already have URL(s) of page(s) you wish to scrape, you can set them here. If you want to use the search field below, remove all startUrls here.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL",
                  "description": "Reddit URL to scrape"
                }
              }
            }
          },
          "skipComments": {
            "title": "Skip comments",
            "type": "boolean",
            "description": "This will skip scrapping comments when going through posts",
            "default": false
          },
          "skipUserPosts": {
            "title": "Skip user posts",
            "type": "boolean",
            "description": "This will skip scrapping user posts when going through user activity",
            "default": false
          },
          "skipCommunity": {
            "title": "Skip community",
            "type": "boolean",
            "description": "This will skip scrapping community info but will still get community posts if they were not skipped.",
            "default": false
          },
          "ignoreStartUrls": {
            "title": "Ignore start URLs",
            "type": "boolean",
            "description": "Mainly used as a fix for ignoring starUrl on Zapier",
            "default": false
          },
          "searchPosts": {
            "title": "Search for posts",
            "type": "boolean",
            "description": "Will search for posts with the provided search",
            "default": true
          },
          "searchComments": {
            "title": "Search for comments",
            "type": "boolean",
            "description": "Will search for comments with the provided search",
            "default": false
          },
          "searchCommunities": {
            "title": "Search for communities",
            "type": "boolean",
            "description": "Will search for communities with the provided search",
            "default": false
          },
          "searchUsers": {
            "title": "Search for users",
            "type": "boolean",
            "description": "Will search for users with the provided search",
            "default": false
          },
          "sort": {
            "title": "Sort search",
            "enum": [
              "relevance",
              "hot",
              "top",
              "new",
              "rising",
              "comments"
            ],
            "type": "string",
            "description": "Sort search by Relevance, Hot, Top, New or Comments",
            "default": "new"
          },
          "includeNSFW": {
            "title": "Include NSFW content",
            "type": "boolean",
            "description": "You can choose to include or exclude NSFW content from your search",
            "default": true
          },
          "maxItems": {
            "title": "Maximum number of items to be saved",
            "type": "integer",
            "description": "The maximum number of items that will be saved in the dataset. If you are scrapping for Communities&Users, remember to consider that each category inside a community is saved as a separated item.",
            "default": 10
          },
          "maxPostCount": {
            "title": "Limit of posts scraped inside a single page",
            "type": "integer",
            "description": "The maximum number of posts that will be scraped for each Posts Page or Communities&Users URL",
            "default": 10
          },
          "maxComments": {
            "title": "Limit of comments scraped inside a single page",
            "type": "integer",
            "description": "The maximum number of comments that will be scraped for each Comments Page. If you don't want to scrape comments you can set this to zero.",
            "default": 10
          },
          "maxCommunitiesCount": {
            "title": "Limit of `Communities`'s pages scraped",
            "type": "integer",
            "description": "The maximum number of Communities's pages that will be scraped if your search or startUrl is a Communities type.",
            "default": 2
          },
          "maxUserCount": {
            "title": "Limit of `Users`'s pages scraped",
            "type": "integer",
            "description": "The maximum number of Users's pages that will be scraped.",
            "default": 2
          },
          "scrollTimeout": {
            "title": "Page scroll timeout (seconds)",
            "type": "integer",
            "description": "Set the timeout in seconds in which the page will stop scrolling down to load new items",
            "default": 40
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Either use Apify proxy, or provide your own proxy servers.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "subreddit": {
            "title": "Subreddit to scrape",
            "type": "string",
            "description": "Name of the subreddit to scrape (without r/ prefix). Defaults to 'news'",
            "default": "news"
          },
          "debugMode": {
            "title": "Debug Mode",
            "type": "boolean",
            "description": "Activate to see detailed logs",
            "default": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}