{
  "openapi": "3.0.1",
  "info": {
    "title": "Hybrid Vision Spider | AI-Powered Universal Web Scraper",
    "description": "AI-driven hybrid web scraper that merges Playwright and Vision intelligence to extract structured data from any dynamic site. Schema-aware, proxy-ready, budget-safe, and fully compatible with Apify datasets.",
    "version": "1.1",
    "x-build-id": "eowFjLo4ZptdBcoQa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tuguidragos~hybrid-vision-spider-ai-powered-universal-web-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tuguidragos-hybrid-vision-spider-ai-powered-universal-web-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/tuguidragos~hybrid-vision-spider-ai-powered-universal-web-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tuguidragos-hybrid-vision-spider-ai-powered-universal-web-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/tuguidragos~hybrid-vision-spider-ai-powered-universal-web-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tuguidragos-hybrid-vision-spider-ai-powered-universal-web-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": {
          "urlList": {
            "title": "URLs to Scrape",
            "type": "string",
            "description": "Enter one URL per line. The actor will visit each page and extract the data you specify below."
          },
          "urls": {
            "title": "Or use Request List (Advanced)",
            "type": "array",
            "description": "For advanced users: add custom headers, methods, or userData to requests.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL",
                  "description": "Web address to scrape"
                }
              },
              "required": [
                "url"
              ]
            }
          },
          "extractTitle": {
            "title": "Extract Page Title",
            "type": "boolean",
            "description": "Get the main title/heading of the page",
            "default": true
          },
          "extractDescription": {
            "title": "Extract Description",
            "type": "boolean",
            "description": "Get the meta description or main content summary",
            "default": false
          },
          "extractEmail": {
            "title": "Extract Email Addresses",
            "type": "boolean",
            "description": "Find and extract email addresses from the page",
            "default": false
          },
          "extractPhone": {
            "title": "Extract Phone Numbers",
            "type": "boolean",
            "description": "Find and extract phone numbers from the page",
            "default": false
          },
          "extractLinks": {
            "title": "Extract Links",
            "type": "boolean",
            "description": "Get all important links from the page",
            "default": false
          },
          "extractImages": {
            "title": "Extract Images",
            "type": "boolean",
            "description": "Get image URLs from the page",
            "default": false
          },
          "extractPrice": {
            "title": "Extract Prices",
            "type": "boolean",
            "description": "Find and extract price values (USD, EUR, etc.)",
            "default": false
          },
          "extractSocialLinks": {
            "title": "Extract Social Media Links",
            "type": "boolean",
            "description": "Find links to Facebook, Twitter, LinkedIn, Instagram, etc.",
            "default": false
          },
          "extractAddress": {
            "title": "Extract Address",
            "type": "boolean",
            "description": "Find physical addresses on the page",
            "default": false
          },
          "customSchema": {
            "title": "Custom Schema (Advanced)",
            "type": "object",
            "description": "For advanced users only. Define a JSON Schema to extract custom fields. Example: {\"type\":\"object\",\"properties\":{\"productName\":{\"type\":\"string\"},\"price\":{\"type\":\"number\"}}}. Leave empty to use checkboxes above."
          },
          "mode": {
            "title": "Scraping Mode",
            "enum": [
              "html-only",
              "hybrid",
              "vision-only"
            ],
            "type": "string",
            "description": "html-only: Fast and free, uses pattern matching. hybrid: Tries HTML first, uses AI if needed. vision-only: Full AI extraction for complex pages.",
            "default": "html-only"
          },
          "openAiApiKey": {
            "title": "OpenAI API Key",
            "type": "string",
            "description": "Required for 'hybrid' and 'vision-only' modes. Get your key at platform.openai.com/api-keys"
          },
          "model": {
            "title": "AI Model",
            "enum": [
              "gpt-4o-mini",
              "gpt-4o",
              "gpt-4-turbo"
            ],
            "type": "string",
            "description": "gpt-4o-mini is fastest and cheapest. gpt-4-turbo is most accurate but expensive.",
            "default": "gpt-4o-mini"
          },
          "maxResults": {
            "title": "Maximum Results",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after extracting this many items. Set to 0 for unlimited.",
            "default": 100
          },
          "maxVisionPages": {
            "title": "Max AI Pages",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum pages to process with AI. Each page costs tokens.",
            "default": 10
          },
          "visionTokenBudget": {
            "title": "AI Token Budget",
            "minimum": 1000,
            "type": "integer",
            "description": "Maximum tokens to spend on AI calls. 50,000 tokens ≈ $0.03-$0.50 depending on model.",
            "default": 50000
          },
          "engine": {
            "title": "Browser",
            "enum": [
              "chromium",
              "firefox"
            ],
            "type": "string",
            "description": "Which browser to use for rendering pages. Chromium is faster, Firefox has better compatibility.",
            "default": "chromium"
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Use proxies to avoid blocks. Residential proxies work better but cost more.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "callbackUrl": {
            "title": "Webhook URL",
            "pattern": "^https?://.+",
            "type": "string",
            "description": "Optional: receive progress updates at this URL (HTTPS recommended)"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}