{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Intelligence API",
    "description": "Crawl any public website and turn it into AI-ready intelligence. Extract screenshots, Markdown, HTML, metadata, links, PDFs, compliance evidence, RAG chunks, and structured JSON for sales research, audits, website snapshots, and automation.",
    "version": "0.0",
    "x-build-id": "cJ2iHjsBVrcxZgaAn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ladra~Website-Intelligence-API/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ladra-Website-Intelligence-API",
        "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/ladra~Website-Intelligence-API/runs": {
      "post": {
        "operationId": "runs-sync-ladra-Website-Intelligence-API",
        "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/ladra~Website-Intelligence-API/run-sync": {
      "post": {
        "operationId": "run-sync-ladra-Website-Intelligence-API",
        "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": {
          "startUrl": {
            "title": "Start URL",
            "type": "string",
            "description": "The website URL where crawling starts. Legacy alias for url."
          },
          "url": {
            "title": "URL",
            "type": "string",
            "description": "Website URL for the v2 extract API shape. If startUrl is omitted, this value is used."
          },
          "intent": {
            "title": "Intent",
            "enum": [
              "website_snapshot",
              "rag",
              "sales_research",
              "documentation",
              "ecommerce",
              "compliance",
              "website_clone"
            ],
            "type": "string",
            "description": "High-level extraction intent. Existing low-level options can still override this preset.",
            "default": "website_snapshot"
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "snapshot",
              "rag",
              "ux_audit",
              "compliance_evidence"
            ],
            "type": "string",
            "description": "Snapshot mode controls defaults and summary outputs.",
            "default": "snapshot"
          },
          "qualityMode": {
            "title": "Quality mode",
            "enum": [
              "fast",
              "balanced",
              "complete"
            ],
            "type": "string",
            "description": "Preset for speed and output depth. Fast favors text outputs, balanced captures desktop screenshots, complete enables richer report defaults.",
            "default": "balanced"
          },
          "crawlStrategy": {
            "title": "Crawl strategy",
            "enum": [
              "auto",
              "sitemap",
              "links",
              "manual_only",
              "compliance_first"
            ],
            "type": "string",
            "description": "Controls how URLs are selected. Compliance-first prioritizes legal, security, trust, status, contact, and support pages.",
            "default": "auto"
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of pages to capture.",
            "default": 25
          },
          "crawlDepth": {
            "title": "Crawl depth",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum link depth from the start URL.",
            "default": 2
          },
          "sameDomainOnly": {
            "title": "Same domain only",
            "type": "boolean",
            "description": "Only crawl URLs on the start URL hostname.",
            "default": true
          },
          "useSitemap": {
            "title": "Use sitemap",
            "type": "boolean",
            "description": "Seed the crawler with URLs from sitemap.xml when available.",
            "default": true
          },
          "urls": {
            "title": "Manual URLs",
            "type": "array",
            "description": "Optional explicit URLs to capture in addition to the start URL. These bypass include URL patterns but still respect same-domain, asset, and robots filters.",
            "items": {
              "type": "string"
            }
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Read robots.txt, use its sitemap declarations, and skip disallowed URLs.",
            "default": true
          },
          "maxSitemapUrls": {
            "title": "Max sitemap URLs",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum URLs to collect from sitemap files before applying max page limits.",
            "default": 5000
          },
          "includeUrlPatterns": {
            "title": "Include URL patterns",
            "type": "array",
            "description": "Optional path or URL fragments that URLs must match.",
            "items": {
              "type": "string"
            }
          },
          "excludeUrlPatterns": {
            "title": "Exclude URL patterns",
            "type": "array",
            "description": "Optional path or URL fragments to skip.",
            "items": {
              "type": "string"
            },
            "default": [
              "/cart",
              "/checkout",
              "/account",
              "/wp-admin"
            ]
          },
          "includeScreenshots": {
            "title": "Include screenshots",
            "type": "boolean",
            "description": "Capture desktop full-page screenshots.",
            "default": true
          },
          "includeMobileScreenshots": {
            "title": "Include mobile screenshots",
            "type": "boolean",
            "description": "Capture an additional mobile full-page screenshot.",
            "default": false
          },
          "includeLightModeScreenshots": {
            "title": "Include light mode screenshots",
            "type": "boolean",
            "description": "Capture additional screenshots after forcing the page to light color scheme.",
            "default": false
          },
          "includeDarkModeScreenshots": {
            "title": "Include dark mode screenshots",
            "type": "boolean",
            "description": "Capture additional screenshots after forcing the page to dark color scheme.",
            "default": false
          },
          "screenshotFullPage": {
            "title": "Full-page screenshots",
            "type": "boolean",
            "description": "Capture full-page screenshots. Disable to capture only the visible viewport.",
            "default": true
          },
          "includeScreenshotThumbnails": {
            "title": "Include screenshot thumbnails",
            "type": "boolean",
            "description": "Create viewport thumbnail images for each captured screenshot variant.",
            "default": false
          },
          "includeHtml": {
            "title": "Include HTML",
            "type": "boolean",
            "description": "Save rendered page HTML files.",
            "default": false
          },
          "includeMarkdown": {
            "title": "Include Markdown",
            "type": "boolean",
            "description": "Extract readable page content and save it as Markdown.",
            "default": true
          },
          "includePdf": {
            "title": "Include PDF",
            "type": "boolean",
            "description": "Capture each page as a PDF when supported.",
            "default": false
          },
          "includeMetadata": {
            "title": "Include metadata",
            "type": "boolean",
            "description": "Extract titles, descriptions, headings, links, CTAs, hashes, and page type.",
            "default": true
          },
          "includeRagChunks": {
            "title": "Include RAG chunks",
            "type": "boolean",
            "description": "Create simple AI-ready text chunks from Markdown.",
            "default": false
          },
          "enableAiAnalysis": {
            "title": "Enable AI analysis",
            "type": "boolean",
            "description": "Run optional AI-style page analysis tasks such as webpage summaries and CTA highlighting.",
            "default": false
          },
          "aiProvider": {
            "title": "AI provider",
            "enum": [
              "heuristic",
              "openai"
            ],
            "type": "string",
            "description": "Choose heuristic local analysis or OpenAI Responses API analysis.",
            "default": "heuristic"
          },
          "aiTasks": {
            "title": "AI tasks",
            "type": "array",
            "description": "AI tasks to run. Supported values: summarize_page, highlight_cta.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "aiPrompt": {
            "title": "AI prompt",
            "type": "string",
            "description": "Optional natural-language prompt, for example: Highlight the CTA, or Summarize this webpage."
          },
          "aiModel": {
            "title": "OpenAI model",
            "type": "string",
            "description": "OpenAI model used when AI provider is OpenAI.",
            "default": "gpt-5.5"
          },
          "openaiApiKey": {
            "title": "OpenAI API key",
            "type": "string",
            "description": "Optional OpenAI API key. If omitted, the Actor uses the OPENAI_API_KEY environment variable."
          },
          "aiMaxInputChars": {
            "title": "AI max input characters",
            "minimum": 1000,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum page text characters sent to the AI provider per page.",
            "default": 12000
          },
          "removeCookieBanners": {
            "title": "Remove cookie banners",
            "type": "boolean",
            "description": "Attempt to accept, reject, close, or remove common cookie consent overlays before capture.",
            "default": true
          },
          "removePopups": {
            "title": "Remove popups",
            "type": "boolean",
            "description": "Attempt to close or remove common modal, popup, newsletter, and overlay elements before capture.",
            "default": true
          },
          "detectBrokenLinks": {
            "title": "Detect broken links",
            "type": "boolean",
            "description": "Check links found on captured pages and report failed or HTTP 4xx/5xx links.",
            "default": false
          },
          "checkExternalLinks": {
            "title": "Check external links",
            "type": "boolean",
            "description": "When broken-link detection is enabled, also check outbound external links.",
            "default": false
          },
          "maxLinksToCheckPerPage": {
            "title": "Max links to check per page",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Caps broken-link checks per captured page.",
            "default": 50
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Requested maximum pages to crawl at the same time. The resource profile controls how strictly this is capped.",
            "default": 1
          },
          "resourceProfile": {
            "title": "Resource profile",
            "enum": [
              "safe",
              "speed",
              "manual"
            ],
            "type": "string",
            "description": "Controls how aggressively the Actor manages memory and concurrency. Safe caps heavy runs conservatively, speed allows more concurrency, and manual honors maxConcurrency with warnings.",
            "default": "safe"
          },
          "assetLoading": {
            "title": "Asset loading",
            "enum": [
              "auto",
              "full",
              "block_heavy"
            ],
            "type": "string",
            "description": "Controls image, media, and font requests. Auto blocks heavy assets only for text-only runs, full loads all assets, and block heavy blocks them even if screenshots are enabled.",
            "default": "auto"
          },
          "includeZipArchive": {
            "title": "Include ZIP archive",
            "type": "boolean",
            "description": "Create a ZIP archive containing generated screenshots, Markdown, JSON, CSV, and summary files.",
            "default": false
          },
          "enableChangeDetection": {
            "title": "Enable change detection",
            "type": "boolean",
            "description": "Compare this run against a previous snapshot provided as JSON input or URL.",
            "default": false
          },
          "previousSnapshot": {
            "title": "Previous snapshot JSON",
            "type": "object",
            "description": "Previous dataset export or object containing pages/items/capturedPages for hash-based comparison."
          },
          "previousSnapshotUrl": {
            "title": "Previous snapshot URL",
            "type": "string",
            "description": "Optional URL returning previous snapshot JSON for hash-based comparison."
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Optional endpoint that receives a POST when the snapshot completes."
          },
          "enableVisualDiff": {
            "title": "Enable visual diff",
            "type": "boolean",
            "description": "Compare current desktop screenshots against previous snapshot screenshot URLs.",
            "default": false
          },
          "visualDiffThreshold": {
            "title": "Visual diff threshold",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Pixelmatch threshold from 0 to 1. Lower values are more sensitive.",
            "default": 0.1
          },
          "includeAuditReport": {
            "title": "Include audit PDF report",
            "type": "boolean",
            "description": "Generate audit-report.html and audit-report.pdf summary files.",
            "default": false
          },
          "detectCompliancePages": {
            "title": "Detect compliance pages",
            "type": "boolean",
            "description": "Classify privacy, legal, security, trust, and related pages.",
            "default": true
          },
          "detectMissingPages": {
            "title": "Detect missing recommended pages",
            "type": "boolean",
            "description": "Create a missing-page checklist in compliance evidence mode.",
            "default": true
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle"
            ],
            "type": "string",
            "description": "Page load state to wait for before capture.",
            "default": "networkidle"
          },
          "advanced": {
            "title": "Advanced options",
            "type": "object",
            "description": "Optional lower-level overrides for intent presets, such as includePdf, includeScreenshots, waitUntil, resourceProfile, assetLoading, maxConcurrency, enableVisualDiff, and enableChangeDetection."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}