{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Media Archiver — Download Videos, Galleries & GIFs",
    "description": "Download Reddit videos, galleries, GIFs and images as real files. Accepts post URLs, subreddits and user profiles, merges Reddit's separate video and audio tracks into one MP4, saves every gallery image at full resolution, and returns public file links with post metadata.",
    "version": "1.0",
    "x-build-id": "Bd2yutvig5vY7OEwx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/xyrelith-data~reddit-media-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-xyrelith-data-reddit-media-downloader",
        "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/xyrelith-data~reddit-media-downloader/runs": {
      "post": {
        "operationId": "runs-sync-xyrelith-data-reddit-media-downloader",
        "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/xyrelith-data~reddit-media-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-xyrelith-data-reddit-media-downloader",
        "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": {
          "mode": {
            "title": "Where to look",
            "enum": [
              "subreddits",
              "users",
              "postUrls"
            ],
            "type": "string",
            "description": "Pick the source of the posts. Subreddit feeds and user profiles are read newest-first or ranked; exact post URLs are read one by one. Media URLs (i.redd.it, v.redd.it) are also accepted in the post list.",
            "default": "subreddits"
          },
          "subreddits": {
            "title": "Subreddits",
            "type": "array",
            "description": "Communities to pull media from. Accepts bare names, r/ handles and full URLs; combine several with a plus sign. Used when 'Where to look' is Subreddit feeds.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "usernames": {
            "title": "Usernames",
            "type": "array",
            "description": "Reddit profiles whose submitted posts should be scanned for media. Accepts bare names, u/ handles and profile URLs. Used when 'Where to look' is User profiles.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "postUrls": {
            "title": "Post or media URLs",
            "type": "array",
            "description": "Exact Reddit posts to read. Accepts permalinks, redd.it short links, gallery URLs, bare post IDs and direct i.redd.it / v.redd.it links. Used when 'Where to look' is Exact posts.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "sort": {
            "title": "Feed ranking",
            "enum": [
              "hot",
              "new",
              "top",
              "rising"
            ],
            "type": "string",
            "description": "How to rank subreddit and profile posts. New is strict newest-first. Top ranks by score inside the chosen time window. Hot blends score and freshness. Rising favours posts gaining score quickly. Profile feeds have no true hot/rising ranking, so they fall back to newest-first.",
            "default": "hot"
          },
          "time": {
            "title": "Top time window",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "How far back Top and Rising look. Ignored by New and Hot.",
            "default": "week"
          },
          "includeNsfw": {
            "title": "Include 18+ posts",
            "type": "boolean",
            "description": "Keep posts marked 18+ (NSFW). Off by default.",
            "default": false
          },
          "minScore": {
            "title": "Minimum post score",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Keep only posts with at least this score (upvotes minus downvotes). Leave at 0 to keep every post.",
            "default": 0
          },
          "mediaTypes": {
            "title": "Media to keep",
            "type": "array",
            "description": "Which kinds of posts to download. Image is a standalone picture, Gallery is a multi-image post (every slide is saved), Video is a Reddit-hosted video, and GIF covers animated images including Reddit's animated v.redd.it posts. Gallery and GIF items inside a gallery are kept when Gallery is selected.",
            "items": {
              "type": "string",
              "enum": [
                "image",
                "gallery",
                "video",
                "gif"
              ],
              "enumTitles": [
                "Image — standalone picture",
                "Gallery — every slide of a multi-image post",
                "Video — Reddit-hosted video",
                "GIF — animated image"
              ]
            },
            "default": [
              "image",
              "gallery",
              "video",
              "gif"
            ]
          },
          "maxPostsPerSource": {
            "title": "Maximum posts per source",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many posts containing a matching media type to read from each subreddit or profile. The run scans further back to find them, up to about 1,000 posts per source.",
            "default": 100
          },
          "maxFiles": {
            "title": "Maximum files",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after saving this many media files across the whole run. A gallery is cut at the limit.",
            "default": 100
          },
          "maxVideoQuality": {
            "title": "Maximum video quality",
            "enum": [
              "best",
              "1080",
              "720",
              "480",
              "360",
              "270",
              "220"
            ],
            "type": "string",
            "description": "Cap the short side of Reddit-hosted video renditions. The best rendition at or below the cap is downloaded; Best available takes the largest.",
            "default": "best"
          },
          "rehostFiles": {
            "title": "Save files to the key-value store",
            "type": "boolean",
            "description": "On: download the media, merge Reddit video and audio into one MP4, and return a public file link. Off: skip downloads and return the direct media URLs and stream URLs only, which is faster and uses no file storage.",
            "default": true
          },
          "includeThumbnails": {
            "title": "Save a thumbnail per media file",
            "type": "boolean",
            "description": "Add a small JPEG thumbnail for every saved picture or video (generated from the file, or from Reddit's thumbnail when files are not downloaded). Off by default.",
            "default": false
          },
          "maxFileSizeMb": {
            "title": "Maximum file size (MB)",
            "minimum": 1,
            "maximum": 2048,
            "type": "integer",
            "description": "Skip a media file larger than this. Videos above the limit are skipped rather than truncated. 1 to 2048 MB.",
            "default": 250
          },
          "downloadConcurrency": {
            "title": "Parallel downloads",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many files to download and merge at the same time. 1 to 8; higher is faster but uses more memory and disk.",
            "default": 3
          },
          "includeExternalMedia": {
            "title": "Include external direct images",
            "type": "boolean",
            "description": "Also download direct image and GIF links on imgur, Giphy and Gyazo when a Reddit post points to them. Embedded players and article pages are never downloaded.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}