{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Image & Video Scraper",
    "description": "Pull every image, GIF, gallery and video out of Reddit as direct, full-resolution URLs. Point it at subreddits, user profiles or post links and get one row per media file — width, height, duration, audio flag, file type — with the parent post title, author, score and link. No account needed.",
    "version": "0.0",
    "x-build-id": "Xawy1H9XUgFVNN67w"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apt_marble~reddit-image-video-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apt_marble-reddit-image-video-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/apt_marble~reddit-image-video-scraper/runs": {
      "post": {
        "operationId": "runs-sync-apt_marble-reddit-image-video-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/apt_marble~reddit-image-video-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-apt_marble-reddit-image-video-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": {
          "subreddits": {
            "title": "Subreddits",
            "type": "array",
            "description": "Communities to pull media from. Paste names (pics), r/ handles (r/pics) or full subreddit URLs — all three work.",
            "items": {
              "type": "string"
            }
          },
          "usernames": {
            "title": "Reddit users",
            "type": "array",
            "description": "Profiles whose submitted posts should be scanned for media. Accepts spez, u/spez or a full profile URL.",
            "items": {
              "type": "string"
            }
          },
          "postUrls": {
            "title": "Post URLs",
            "type": "array",
            "description": "Individual Reddit posts to pull media from. Accepts full permalinks, redd.it short links or bare post IDs. These are fetched directly, so the per-source post limit does not apply to them.",
            "items": {
              "type": "string"
            }
          },
          "mediaTypes": {
            "title": "Media types to keep",
            "uniqueItems": true,
            "type": "array",
            "description": "Which kinds of media to save. Image is a standalone picture (including the preview image Reddit generates for a link post), Gallery is one picture out of a multi-image post, Video is Reddit-hosted video, Animated is a GIF, and Embed is third-party media such as a YouTube player — embeds are links to another site, not downloadable files, so they are off by default.",
            "items": {
              "type": "string",
              "enum": [
                "image",
                "gallery",
                "video",
                "animated",
                "embed"
              ],
              "enumTitles": [
                "Image — standalone picture",
                "Gallery — picture from a multi-image post",
                "Video — Reddit-hosted video",
                "Animated — GIF",
                "Embed — YouTube and other third-party players"
              ]
            },
            "default": [
              "image",
              "gallery",
              "video",
              "animated"
            ]
          },
          "sort": {
            "title": "Sort posts by",
            "enum": [
              "hot",
              "new",
              "top",
              "rising",
              "controversial"
            ],
            "type": "string",
            "description": "Which listing to read for subreddits and profiles. Hot is what Reddit is pushing right now, New the most recent posts, Top the highest scoring in the chosen time range, Rising the ones gaining traction, Controversial the most divisive. Profiles do not support Rising, so it falls back to New for them.",
            "default": "hot"
          },
          "time": {
            "title": "Time range",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Time window for the Top and Controversial sorts. Ignored by Hot, New and Rising.",
            "default": "all"
          },
          "maxPostsPerSource": {
            "title": "Max posts with media per source",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many posts that actually contain matching media to save from each subreddit or profile. The run reads further down the listing to find them, and Reddit itself stops any single listing at about 1,000 posts, so that is the hard ceiling.",
            "default": 20
          },
          "minScore": {
            "title": "Minimum score",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Keep only posts with at least this many upvotes (score = upvotes minus downvotes). Leave empty to keep every post."
          },
          "includeNsfw": {
            "title": "Include 18+ posts",
            "type": "boolean",
            "description": "Keep posts marked 18+. Turn this off to drop them.",
            "default": true
          },
          "includePostsWithoutMedia": {
            "title": "Include posts with no media",
            "type": "boolean",
            "description": "Also save text and link posts that carry no matching media, with empty media fields. Off by default, so every row you pay for has a media URL in it.",
            "default": false
          },
          "oneRecordPerAsset": {
            "title": "One row per media file",
            "type": "boolean",
            "description": "On (recommended): every picture, GIF and video gets its own row, so a 20-image gallery produces 20 rows ready to feed into a downloader. Off: one row per post, with all of its media in a single media array.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Parallel sources",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many subreddits, profiles and post batches to read at the same time. Higher is faster on long lists; 4 is a good balance.",
            "default": 4
          },
          "country": {
            "title": "Browse from",
            "enum": [
              "us",
              "gb",
              "ca",
              "au",
              "de",
              "fr",
              "es",
              "it",
              "nl",
              "ie",
              "in",
              "sg",
              "br",
              "jp",
              "pl",
              "se",
              "mx"
            ],
            "type": "string",
            "description": "Which country's view of Reddit to use. Reddit content is the same almost everywhere, so the default suits nearly every run.",
            "default": "us"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}