{
  "openapi": "3.0.1",
  "info": {
    "title": "RuTube Video Scraper",
    "description": "Extract public video stats from RuTube: views, likes, dislikes, comments, author info, subscribers. Works from a list of video URLs.",
    "version": "1.0",
    "x-build-id": "iOoyCwmHo7LPLuKVl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sashaebashu~rutube-video-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sashaebashu-rutube-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/sashaebashu~rutube-video-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sashaebashu-rutube-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/sashaebashu~rutube-video-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sashaebashu-rutube-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": {
          "videoUrls": {
            "title": "RuTube Video URLs",
            "type": "array",
            "description": "List of RuTube video links. Supported formats: https://rutube.ru/video/<hash>/, https://rutube.ru/shorts/<hash>/, https://rutube.ru/play/embed/<id>. Query strings and anchors are ignored.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "RuTube Video URLs (request list)",
            "type": "array",
            "description": "Alternative way to provide video URLs using the request-list editor. Combined with the field above.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "channelUrls": {
            "title": "RuTube Channel URLs",
            "type": "array",
            "description": "Channel links (e.g. https://rutube.ru/channel/23704195/) — the actor collects that channel's videos and scrapes full stats for each. Use maxVideosPerSource to cap.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Search terms — the actor collects matching videos and scrapes full stats for each. Use maxVideosPerSource to cap. NOTE: RuTube search requires a Russian IP — from outside Russia, set Proxy below to the Residential group with country RU (channel URLs and direct video links work without a proxy).",
            "items": {
              "type": "string"
            }
          },
          "searchPeriod": {
            "title": "Search: published within",
            "enum": [
              "all",
              "day",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Only return search results published within this period. Applies to search queries only, not to channel or video URLs.",
            "default": "all"
          },
          "maxVideosPerSource": {
            "title": "Max videos per channel / query",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How many videos to collect from each channel or search query. RuTube's search itself returns at most 100 videos per query — to go further, split the query or narrow it with the period filter.",
            "default": 50
          },
          "maxItems": {
            "title": "Max Videos",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of videos to process in a single run. Helps control cost and run time.",
            "default": 1000
          },
          "engagementScore": {
            "title": "Add engagement score (vs author's median)",
            "type": "boolean",
            "description": "Score each video against its author's OWN median reach, so standout videos surface regardless of the channel's size. Adds authorMedianViews, viewsVsAuthorMedian and engagementVsAuthorMedian to each row (values > 1 beat the channel's typical performance). Best with channel URLs (many videos per author). Off by default.",
            "default": false
          },
          "freshnessStamps": {
            "title": "Add freshness stamps",
            "type": "boolean",
            "description": "Adds `firstSeenAt` (when the video first appeared in your runs with this input), `lastConfirmedAt` (when it was last seen) and `timesSeen`.",
            "default": false
          },
          "anomalyDetection": {
            "title": "Flag anomalies",
            "type": "boolean",
            "description": "Score each video against comparable videos from the same author in this run and flag the ones far outside the usual range: `anomalyScore`, `isAnomaly`, `anomalyReason`. Needs at least 5 comparable videos; with fewer, the video is compared with the whole run. Results are written at the end of the run in this mode.",
            "default": false
          },
          "anomalyThreshold": {
            "title": "Anomaly threshold",
            "minimum": 1,
            "maximum": 20,
            "type": "number",
            "description": "How far from typical an item must be to count as an anomaly. 3.5 is the usual choice; lower values flag more items.",
            "default": 3.5
          },
          "alertRules": {
            "title": "Alert rules",
            "type": "array",
            "description": "One rule per line, e.g. `views >= 100000 and likes >= 1000`. Combine conditions with `and`. Operators: > >= < <= == != contains. Matching rows get `alertTriggered: true` and the matched rules in `alerts`; the matches are also saved to the ALERTS record.",
            "items": {
              "type": "string"
            }
          },
          "onlyAlerts": {
            "title": "Only rows that trigger an alert",
            "type": "boolean",
            "description": "Return only the rows that match at least one alert rule. Other rows are not written and not charged.",
            "default": false
          },
          "mcpSyncConnector": {
            "title": "Sync results to",
            "type": "string",
            "description": "Write the results straight into the tool your team already uses — Notion, Google Sheets, Airtable or any MCP server with a write tool."
          },
          "mcpSyncTool": {
            "title": "Sync: tool",
            "type": "string",
            "description": "Name of the connector tool that adds rows, e.g. create_records."
          },
          "mcpSyncArguments": {
            "title": "Sync: tool arguments",
            "type": "object",
            "description": "Use {{rows}} for a batch of rows, or {{row}} and {{row.views}} for one row per call, e.g. {\"table\": \"Results\", \"records\": \"{{rows}}\"}. Every row carries a stable `key`."
          },
          "mcpSyncUpdateTool": {
            "title": "Sync: update tool (optional)",
            "type": "string",
            "description": "Tool that updates existing rows. When set, videos synced by earlier runs are updated in place instead of being added again; their record id is available as {{row.externalId}}."
          },
          "mcpSyncUpdateArguments": {
            "title": "Sync: update tool arguments (optional)",
            "type": "object",
            "description": "Same placeholders as above. Defaults to the sync tool arguments."
          },
          "mcpSyncFields": {
            "title": "Sync: fields",
            "type": "array",
            "description": "Which fields to send. Leave empty for the main columns.",
            "items": {
              "type": "string"
            }
          },
          "mcpSyncBatchSize": {
            "title": "Sync: rows per call",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many rows go into one {{rows}} call.",
            "default": 10
          },
          "mcpNotifyConnector": {
            "title": "Notify when done",
            "type": "string",
            "description": "Post a one-message summary to Slack, Teams, Telegram, email or any messaging MCP server when the run finishes or fails."
          },
          "mcpNotifyTarget": {
            "title": "Notify: channel or recipient",
            "type": "string",
            "description": "For example #alerts or name@company.com. Used when the message arguments are filled in automatically."
          },
          "mcpNotifyOn": {
            "title": "Notify: when",
            "enum": [
              "always",
              "failure",
              "alerts"
            ],
            "type": "string",
            "description": "Every run, only failed runs, or only runs that found alerts or changes.",
            "default": "always"
          },
          "mcpNotifyTool": {
            "title": "Notify: tool (optional)",
            "type": "string",
            "description": "Picked automatically when empty (send_message, post_message and similar)."
          },
          "mcpNotifyArguments": {
            "title": "Notify: tool arguments (optional)",
            "type": "object",
            "description": "Use {{summary}}, {{status}}, {{itemCount}} and {{runUrl}}, e.g. {\"channel\": \"#alerts\", \"text\": \"{{summary}}\"}."
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings. RuTube usually works fine with direct requests, so the default is no proxy. If RuTube starts geo-blocking or rate-limiting your run, enable Apify Proxy and pick the Residential group with country RU.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}