{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube View Generator",
    "description": "Generate real browser views on YouTube videos: rotating residential proxies, unique fingerprints, configurable watch time, ad skipping, and search or referrer traffic sources. Use only on videos you own or are authorized to promote.",
    "version": "1.0",
    "x-build-id": "xYcg3qxIy3vnHxcFt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/one_house~youtube-view-generator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-one_house-youtube-view-generator",
        "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/one_house~youtube-view-generator/runs": {
      "post": {
        "operationId": "runs-sync-one_house-youtube-view-generator",
        "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/one_house~youtube-view-generator/run-sync": {
      "post": {
        "operationId": "run-sync-one_house-youtube-view-generator",
        "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": [
          "videoUrls",
          "views"
        ],
        "properties": {
          "videoUrls": {
            "title": "YouTube videos",
            "type": "array",
            "description": "Video links or IDs. Watch links, youtu.be share links, Shorts, and embeds all work.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "views": {
            "title": "Number of views",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many separate playbacks to generate. Views are spread evenly across the videos you listed.",
            "default": 5
          },
          "concurrency": {
            "title": "Parallel views",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many videos play at the same time. What limits this is CPU, and memory is how you buy it here — about one core per 4 GB. Allow roughly 2 GB per parallel view: 4 GB for two, 8 GB for four. Packing more players onto the same memory works, but they start slowly and stall more often.",
            "default": 2
          },
          "watchMode": {
            "title": "Watch time mode",
            "enum": [
              "seconds",
              "percent"
            ],
            "type": "string",
            "description": "Set the watch time as a fixed number of seconds, or as a share of the video's length.",
            "default": "seconds"
          },
          "minWatchSeconds": {
            "title": "Min watch seconds",
            "minimum": 5,
            "maximum": 3600,
            "type": "integer",
            "description": "Used when the watch time mode is Seconds.",
            "default": 30
          },
          "maxWatchSeconds": {
            "title": "Max watch seconds",
            "minimum": 5,
            "maximum": 3600,
            "type": "integer",
            "description": "Each view picks a random length between the minimum and maximum, so the plays are not identical.",
            "default": 90
          },
          "minWatchPercent": {
            "title": "Min watch percent",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Used when the watch time mode is Percent of video length.",
            "default": 30
          },
          "maxWatchPercent": {
            "title": "Max watch percent",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Watching a larger share of the video takes proportionally more time and proxy traffic.",
            "default": 70
          },
          "trafficSource": {
            "title": "Traffic source",
            "enum": [
              "direct",
              "youtube-search",
              "external"
            ],
            "type": "string",
            "description": "How each view reaches the video. Search finds it in YouTube results and clicks the result; External arrives with a referrer from another site.",
            "default": "direct"
          },
          "searchKeyword": {
            "title": "Search keyword",
            "type": "string",
            "description": "Required for the YouTube search traffic source. Use a phrase your video actually ranks for — if it is not in the first results the view falls back to opening the link directly."
          },
          "referer": {
            "title": "Referrer URL",
            "type": "string",
            "description": "Required for the External traffic source. The address the view should appear to come from."
          },
          "lowestQuality": {
            "title": "Force lowest quality",
            "type": "boolean",
            "description": "Pin playback to 144p. Video is the largest source of proxy traffic and a view counts the same at any resolution, so leaving this on cuts cost sharply.",
            "default": true
          },
          "skipAds": {
            "title": "Skip ads",
            "type": "boolean",
            "description": "Press Skip as soon as it appears. Time spent on an ad is not counted as watch time either way.",
            "default": true
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "mobile",
              "tablet",
              "auto"
            ],
            "type": "string",
            "description": "Device profile for the browser fingerprint.",
            "default": "desktop"
          },
          "delayBetweenViewsSecs": {
            "title": "Delay between views",
            "minimum": 0,
            "maximum": 300,
            "type": "integer",
            "description": "Seconds to wait before starting another view. Spacing plays out looks more natural than a burst.",
            "default": 0
          },
          "maxRetries": {
            "title": "Max retries per view",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many times to retry a view on a different proxy IP when YouTube refuses the request or the stream stalls. Retries are what turn a bad proxy address into a delivered view, so lowering this mostly lowers the success rate.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxies are strongly recommended: without them every view arrives from the same address and looks like a single viewer.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}