{
  "openapi": "3.0.1",
  "info": {
    "title": "Traffic Generator – YouTube, Web, Etsy, Behance & more",
    "description": "Not sure your analytics, pages and load times hold up under real visits? Send test visits to sites, YouTube videos, Etsy shops or Behance pages you own and get one row per visit: status, analytics hits seen, Core Web Vitals and stress-test latency.",
    "version": "1.0",
    "x-build-id": "eKtU17MMWb1jOi2hI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawl_craft~traffic-generator-youtube-web-etsy-behance/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawl_craft-traffic-generator-youtube-web-etsy-behance",
        "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/crawl_craft~traffic-generator-youtube-web-etsy-behance/runs": {
      "post": {
        "operationId": "runs-sync-crawl_craft-traffic-generator-youtube-web-etsy-behance",
        "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/crawl_craft~traffic-generator-youtube-web-etsy-behance/run-sync": {
      "post": {
        "operationId": "run-sync-crawl_craft-traffic-generator-youtube-web-etsy-behance",
        "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": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "🔗 Page, video or profile URLs",
            "minItems": 1,
            "type": "array",
            "description": "One address per line. Any web page, YouTube video, Etsy shop or listing, or Behance profile or project. Bulk lists are welcome. Only use addresses you own or are authorised to test.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "🧭 Traffic mode",
            "enum": [
              "browser",
              "http",
              "stress"
            ],
            "type": "string",
            "description": "Browser opens a real browser per visit so analytics tools count it. HTTP is much faster but runs no scripts, so only server logs see it. Stress test sends many fast requests and reports latency percentiles and requests per second.",
            "default": "browser"
          },
          "visits_per_url": {
            "title": "🔢 Visits per URL",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many visits every URL gets. Total visits = URLs × this number, and the run ends by itself. Free plan: up to 10 visits per run in total.",
            "default": 1
          },
          "dwell_seconds": {
            "title": "⌛ Time on page (seconds)",
            "type": "string",
            "description": "How long a visitor stays per visit, split across its pages. A number such as 30, or a range such as 15-40 (a random value in the range is used). Browser mode only.",
            "default": "15-40"
          },
          "pages_per_visit": {
            "title": "📄 Pages per visit",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "1 = landing page only. 3 = landing page plus 2 internal pages clicked during the visit. Browser mode only.",
            "default": 1
          },
          "scroll": {
            "title": "📜 Scroll and move the mouse",
            "type": "boolean",
            "description": "Scrolls and moves the mouse like a reader during the time on page, and records how far the visitor scrolled.",
            "default": true
          },
          "youtube_autoplay": {
            "title": "🎬 Play YouTube videos",
            "type": "boolean",
            "description": "Presses play on YouTube videos and reports how many seconds really played. YouTube alone decides whether a view counts.",
            "default": true
          },
          "device_mix": {
            "title": "📱 Device mix",
            "enum": [
              "mixed",
              "desktop",
              "mobile"
            ],
            "type": "string",
            "description": "Which kinds of devices the visitors use.",
            "default": "mixed"
          },
          "mobile_share": {
            "title": "📊 Mobile share",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Share of visitors on mobile devices when the device mix is mixed. 0 = none, 1 = all.",
            "default": 0.45
          },
          "locales": {
            "title": "🌍 Visitor languages",
            "type": "array",
            "description": "Pick one or more languages. Each visit uses one of them at random as the visitor language.",
            "items": {
              "type": "string",
              "enum": [
                "en-US",
                "en-GB",
                "en-CA",
                "en-AU",
                "en-IN",
                "de-DE",
                "fr-FR",
                "fr-CA",
                "es-ES",
                "es-MX",
                "es-AR",
                "pt-BR",
                "pt-PT",
                "it-IT",
                "nl-NL",
                "sv-SE",
                "da-DK",
                "nb-NO",
                "fi-FI",
                "pl-PL",
                "cs-CZ",
                "hu-HU",
                "ro-RO",
                "el-GR",
                "tr-TR",
                "ru-RU",
                "uk-UA",
                "ar-SA",
                "he-IL",
                "hi-IN",
                "bn-BD",
                "id-ID",
                "ms-MY",
                "th-TH",
                "vi-VN",
                "zh-CN",
                "zh-TW",
                "ja-JP",
                "ko-KR",
                "fil-PH"
              ],
              "enumTitles": [
                "English (US) (en-US)",
                "English (UK) (en-GB)",
                "English (Canada) (en-CA)",
                "English (Australia) (en-AU)",
                "English (India) (en-IN)",
                "German (de-DE)",
                "French (fr-FR)",
                "French (Canada) (fr-CA)",
                "Spanish (Spain) (es-ES)",
                "Spanish (Mexico) (es-MX)",
                "Spanish (Argentina) (es-AR)",
                "Portuguese (Brazil) (pt-BR)",
                "Portuguese (Portugal) (pt-PT)",
                "Italian (it-IT)",
                "Dutch (nl-NL)",
                "Swedish (sv-SE)",
                "Danish (da-DK)",
                "Norwegian (nb-NO)",
                "Finnish (fi-FI)",
                "Polish (pl-PL)",
                "Czech (cs-CZ)",
                "Hungarian (hu-HU)",
                "Romanian (ro-RO)",
                "Greek (el-GR)",
                "Turkish (tr-TR)",
                "Russian (ru-RU)",
                "Ukrainian (uk-UA)",
                "Arabic (ar-SA)",
                "Hebrew (he-IL)",
                "Hindi (hi-IN)",
                "Bengali (bn-BD)",
                "Indonesian (id-ID)",
                "Malay (ms-MY)",
                "Thai (th-TH)",
                "Vietnamese (vi-VN)",
                "Chinese (Simplified) (zh-CN)",
                "Chinese (Traditional) (zh-TW)",
                "Japanese (ja-JP)",
                "Korean (ko-KR)",
                "Filipino (fil-PH)"
              ]
            },
            "default": [
              "en-US"
            ]
          },
          "referrers": {
            "title": "🚪 Traffic sources",
            "type": "object",
            "description": "Where visitors come from, as address: weight pairs. The word direct means no referrer. Higher weight = more visits from that source.",
            "default": {
              "direct": 30,
              "https://www.google.com/": 45,
              "https://www.bing.com/": 5,
              "https://duckduckgo.com/": 4,
              "https://www.facebook.com/": 8,
              "https://t.co/": 4,
              "https://www.linkedin.com/": 4
            }
          },
          "concurrency": {
            "title": "⚡ Parallel visitors",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Visitors active at the same time in browser and HTTP mode. Lower it if the target refuses visits.",
            "default": 5
          },
          "stress_concurrency": {
            "title": "🔥 Parallel requests (stress test)",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Requests in flight at the same time in stress mode. Only raise it on sites you own.",
            "default": 20
          },
          "headless": {
            "title": "👻 Hidden browser",
            "type": "boolean",
            "description": "On runs the browser without a visible window. Off opens a window for every visit (on the platform it uses a virtual screen).",
            "default": true
          },
          "retry_blocked_headful": {
            "title": "🪟 Retry blocked visits in a visible window",
            "type": "boolean",
            "description": "When a bot wall stops a hidden-browser visit, run that visit again in a visible Chrome window.",
            "default": true
          },
          "browser_channel": {
            "title": "🧩 Browser build",
            "enum": [
              "chromium",
              "chrome"
            ],
            "type": "string",
            "description": "Bundled browser, or the installed Google Chrome when it is available.",
            "default": "chromium"
          },
          "screenshot": {
            "title": "📸 Save screenshots",
            "type": "boolean",
            "description": "Saves one PNG per browser visit to the key-value store and adds its link to the visit row.",
            "default": false
          },
          "block_resource_types": {
            "title": "🚫 Block resource types",
            "type": "array",
            "description": "Skip these kinds of files to save bandwidth. Video playback on YouTube is never blocked.",
            "items": {
              "type": "string",
              "enum": [
                "image",
                "media",
                "font",
                "stylesheet"
              ],
              "enumTitles": [
                "🌄 Images",
                "🎥 Audio and video",
                "🔤 Fonts",
                "🎨 Stylesheets"
              ]
            },
            "default": []
          },
          "block_url_patterns": {
            "title": "⛔ Block URL patterns",
            "type": "array",
            "description": "Any request whose address contains one of these texts is not loaded, for example .mp4 or ads.example.com. One per line.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "timeout_seconds": {
            "title": "⏳ Page timeout (seconds)",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "How long to wait for a page to answer before the visit counts as failed.",
            "default": 45
          },
          "max_retries": {
            "title": "🔄 Extra attempts per visit",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "How many more times a visit that ended in an error such as a timeout or crash is tried again.",
            "default": 1
          },
          "end_after_seconds": {
            "title": "🛑 Stop after N seconds",
            "minimum": 0,
            "type": "integer",
            "description": "Kill switch: no new visits start after this many seconds. 0 = off.",
            "default": 0
          },
          "max_consecutive_failures": {
            "title": "🚨 Stop after N failures in a row",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Ends the run with a clear reason when this many visits fail one after another, for example a dead target or proxy. Everything collected is kept.",
            "default": 12
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy",
            "type": "object",
            "description": "Runs start without a proxy. If the target refuses visits, the Actor switches to stronger proxies on its own and keeps using them for the rest of the run. Choose Apify Proxy or add your own proxy addresses only if you want to start with a proxy.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}