{
  "openapi": "3.0.1",
  "info": {
    "title": "🚀 Web Traffic Generator",
    "description": null,
    "version": "1.0",
    "x-build-id": "aUwVr5rafv1DbDJCp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/api-empire~web-traffic-generator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-api-empire-web-traffic-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/api-empire~web-traffic-generator/runs": {
      "post": {
        "operationId": "runs-sync-api-empire-web-traffic-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/api-empire~web-traffic-generator/run-sync": {
      "post": {
        "operationId": "run-sync-api-empire-web-traffic-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": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "🔗 Website URLs",
            "minItems": 1,
            "type": "array",
            "description": "One or more website URLs to send visits to. Paste them in bulk — every visit picks one of these URLs in round-robin order. A URL without http(s):// is treated as https://.",
            "items": {
              "type": "string"
            }
          },
          "numberOfVisitors": {
            "title": "#️⃣ Number of visits",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Total number of browser visits to generate across all URLs.",
            "default": 10
          },
          "simultaneousVisitors": {
            "title": "🧑‍🤝‍🧑 Concurrent visits",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many visits run in parallel. Higher values finish faster but need more memory — increase the run's RAM if you set this above 5.",
            "default": 5
          },
          "stayDurationSeconds": {
            "title": "⌛ Time on page",
            "minimum": 1,
            "maximum": 3600,
            "type": "integer",
            "description": "How long each visit stays on a page, scrolling naturally, before moving on.",
            "default": 10
          },
          "useDesktop": {
            "title": "🖥️ Desktop devices",
            "type": "boolean",
            "description": "Emulate desktop browsers (Windows, macOS, Linux).",
            "default": true
          },
          "useMobile": {
            "title": "📱 Mobile devices",
            "type": "boolean",
            "description": "Emulate mobile phones (Pixel, iPhone, Galaxy).",
            "default": true
          },
          "useTablet": {
            "title": "📟 Tablet devices",
            "type": "boolean",
            "description": "Emulate tablets (iPad, Galaxy Tab).",
            "default": true
          },
          "crawlWebsite": {
            "title": "🕸️ Crawl internal pages",
            "type": "boolean",
            "description": "When enabled, every visit also follows internal links and browses additional pages of the site.",
            "default": true
          },
          "crawlMaxPages": {
            "title": "📄 Max pages per visit",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum number of extra pages a single crawling visit will browse.",
            "default": 20
          },
          "crawlSameDomainOnly": {
            "title": "🔒 Stay on the same domain",
            "type": "boolean",
            "description": "Restrict crawling to pages on the start URL's domain. Disable to also follow external links.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "🛡️ Proxy configuration",
            "type": "object",
            "description": "Proxy used for the fallback tiers. Every visit begins with a direct connection; if a site blocks it, the actor escalates automatically — first to a datacenter proxy, then to a residential proxy — and sticks with the higher tier for the rest of the run.",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxRetries": {
            "title": "🔁 Residential retry attempts",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many times to retry a blocked visit on the residential proxy before giving up on it.",
            "default": 3
          },
          "retryBackoffSeconds": {
            "title": "⏳ Retry backoff",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "Base wait time between residential retry attempts. The wait grows with each attempt.",
            "default": 2
          },
          "navigationTimeoutMs": {
            "title": "⏱️ Navigation timeout",
            "minimum": 5000,
            "maximum": 300000,
            "type": "integer",
            "description": "How long to wait for a page to load before treating the visit as failed. Residential proxies often need 30–60 seconds.",
            "default": 90000
          },
          "headless": {
            "title": "Headless browser",
            "type": "boolean",
            "description": "Run browsers in headless mode. Always keep enabled on the Apify platform.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}