{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Community Posts Scraper With Keyword & Date Monitoring",
    "description": "An automation actor that extracts posts, polls, and comments from YouTube community tabs. It gathers post text, timestamps, likes, and engagement data, enabling audience analysis, sentiment tracking, and content strategy optimization for brands and creators.",
    "version": "0.1",
    "x-build-id": "nyz5BXqdceaCfMinQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/simpleapi~youtube-community-posts-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-simpleapi-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/simpleapi~youtube-community-posts-scraper/runs": {
      "post": {
        "operationId": "runs-sync-simpleapi-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/simpleapi~youtube-community-posts-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-simpleapi-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",
        "required": [
          "channelUrls"
        ],
        "properties": {
          "channelUrls": {
            "title": "📡 Channels to monitor",
            "type": "array",
            "description": "One or more YouTube channel URLs to watch. Accepts @handle URLs (youtube.com/@MrBeast) or /channel/UC... URLs. Add one per line, or paste a single comma-separated string. Each channel's Community/Posts tab is scanned.",
            "items": {
              "type": "string"
            }
          },
          "maxPosts": {
            "title": "🎯 New posts to emit per channel",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Posts to return per channel (1–10,000). With keyword/date filters on, the actor scans deeper into the feed to collect this many matches. In delta mode this is the size of the RECENT window it checks each run (only unseen posts in that window are emitted).",
            "default": 10
          },
          "deltaMode": {
            "title": "🆕 Delta mode (new posts only)",
            "type": "boolean",
            "description": "When ON, remembers every postId it has emitted in a persistent named store ('community-seen-postids', keyed per channelId) and skips them on later runs — so a scheduled run returns only posts published since last time. First run returns all matches; the very next identical run returns 0. Turn OFF for a full snapshot every run.",
            "default": false
          },
          "keywordFilter": {
            "title": "🔑 Keyword filter",
            "type": "string",
            "description": "Keep only posts whose text contains this phrase (case-insensitive substring match). Leave empty to keep every post."
          },
          "dateFrom": {
            "title": "📅 Posted on/after (approximate)",
            "type": "string",
            "description": "ISO date (YYYY-MM-DD). Drops posts older than this. NOTE: YouTube only exposes relative times ('2 weeks ago'), so the age is APPROXIMATE — treat the boundary as fuzzy by a few days. Leave empty for no lower bound."
          },
          "dateTo": {
            "title": "📅 Posted on/before (approximate)",
            "type": "string",
            "description": "ISO date (YYYY-MM-DD). Drops posts newer than this. Same approximate caveat as the 'on/after' date — derived from relative published times. Leave empty for no upper bound."
          },
          "countryCode": {
            "title": "🌍 Country (geo context)",
            "enum": [
              "US",
              "GB",
              "CA",
              "AU",
              "IN",
              "DE",
              "FR",
              "BR",
              "JP",
              "MX",
              "ES",
              "IT",
              "NL",
              "RU",
              "KR"
            ],
            "type": "string",
            "description": "Two-letter country code sent as `gl` in the YouTube InnerTube client context, so the feed is fetched as if from that country. Defaults to US.",
            "default": "US"
          },
          "proxy": {
            "title": "🌐 Proxy",
            "type": "object",
            "description": "Optional. Runs direct by default. Enable an Apify proxy group or a custom URL for higher volume; if it's blocked the actor falls back to Apify RESIDENTIAL and retries on a fresh IP."
          },
          "requestTimeout": {
            "title": "⏱️ Request timeout (s)",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Per-request timeout in seconds (1–300).",
            "default": 15
          },
          "maxRetries": {
            "title": "🔁 Max retries",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many times to retry a failing fetch before switching proxy (1–10).",
            "default": 3
          },
          "retryDelay": {
            "title": "⏳ Retry delay (s)",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "Initial backoff between retries in seconds; doubles each attempt (0–60).",
            "default": 2
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}