{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Community Posts Scraper",
    "description": "Scrape public YouTube Community posts from channel handles, channel URLs, channel IDs or post URLs, with text, media, likes, timestamps, linked videos and channel metadata. No cookies needed.",
    "version": "0.6",
    "x-build-id": "TJsQ0Ysm9VddJ4Agn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~youtube-community-posts-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-youtube-community-posts-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~youtube-community-posts-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-youtube-community-posts-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~youtube-community-posts-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-youtube-community-posts-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": {
          "channelUrls": {
            "title": "YouTube channels",
            "maxItems": 100,
            "type": "array",
            "description": "Use this when you want recent public Community posts from one or more YouTube channels. Accepts a channel URL such as 'https://www.youtube.com/@MrBeast', a channel ID such as 'UCX6OQ3DkcsbYNE6H8uQQuVA', or a handle such as '@MrBeast'. The Actor reads the channel Posts feed page by page until maxPosts or maxPagesPerChannel. This is NOT a video URL or a specific community-post URL; use postUrls for an individual post.",
            "items": {
              "type": "string"
            }
          },
          "postUrls": {
            "title": "Individual community post URLs",
            "maxItems": 100,
            "type": "array",
            "description": "Use this when you need known public YouTube Community posts rather than a channel feed. Each item must be a URL like 'https://www.youtube.com/post/Ugkx…'. The actor fetches the full public post record, including text, images, likes, channel data, and any linked video. Leave this empty to scrape channel feeds only. This is NOT a standard watch URL, Shorts URL, or a comment URL.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxPosts": {
            "title": "Maximum posts",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Use this when you need to cap the total number of saved community posts across every input. Enter an integer from 1 to 2000; for example, 20 returns at most twenty deduplicated posts. Defaults to 20 and also caps billable post events at the same number. This is NOT a per-channel limit, so several channels share this total. Free Apify plans are limited to 10 posts per run.",
            "default": 20
          },
          "maxPagesPerChannel": {
            "title": "Maximum pages per channel",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "Use this when a channel has a long Community feed and you want to bound pagination. Enter an integer from 1 to 250; for example, 5 reads up to five pages (about 8 to 11 posts each) per channel. Defaults to 5, and RUN_SUMMARY names any channel where this cap stopped paging. This is NOT an exact post count because page sizes vary.",
            "default": 5
          },
          "exactPublishedDate": {
            "title": "Read exact publish dates",
            "type": "boolean",
            "description": "Use this when you need the exact publish date and time of each post instead of YouTube's relative text such as '3 months ago'. When on, the Actor opens every post's own page, which is slower and uses more platform usage. When off, `publishedAt` is null and `publishedAtApprox` holds a labeled estimate. This is NOT a date filter.",
            "default": false
          },
          "newPostsOnly": {
            "title": "Only posts new since the last run",
            "type": "boolean",
            "description": "Use this when you monitor channels on a schedule and want only posts you have not received before. The Actor remembers the posts it returned for each channel and skips them next time, and stops paging a channel once a whole page is already known. The first run returns everything up to your limits. This is NOT a date filter.",
            "default": false
          },
          "sourceMode": {
            "title": "Advanced: data source",
            "enum": [
              "auto",
              "direct",
              "managed"
            ],
            "type": "string",
            "description": "Use this only to force one source. 'auto' (default) reads YouTube's public pages directly and switches to a backup source page by page when that fails. 'direct' never uses the backup source (a failure is reported, not hidden). 'managed' always uses the backup source (no poll data and no comment counts). This is NOT a quality setting: leave on auto unless you are testing.",
            "default": "auto"
          },
          "connectionMode": {
            "title": "Advanced: connection",
            "enum": [
              "auto",
              "none",
              "datacenter"
            ],
            "type": "string",
            "description": "Use this only to control how the direct source connects. 'auto' (default) starts without a proxy and switches this run to the datacenter proxy if YouTube blocks it; 'none' never uses a proxy; 'datacenter' always uses the datacenter proxy. This is NOT a country or residential setting.",
            "default": "auto"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}