{
  "openapi": "3.0.1",
  "info": {
    "title": "HTML Validator – Bulk W3C Nu Html Checker for URLs & Sitemaps",
    "description": "Validate HTML of many URLs, a sitemap or a same-site crawl with the official W3C Nu Html Checker (vnu.jar) running inside the Actor. Errors and warnings per page with line, column and markup extract. Also checks pasted HTML.",
    "version": "0.1",
    "x-build-id": "2sVoZvnUF9AjsREbC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/adamplaenitz~html-validator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-adamplaenitz-html-validator",
        "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/adamplaenitz~html-validator/runs": {
      "post": {
        "operationId": "runs-sync-adamplaenitz-html-validator",
        "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/adamplaenitz~html-validator/run-sync": {
      "post": {
        "operationId": "run-sync-adamplaenitz-html-validator",
        "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": {
          "urls": {
            "title": "URLs",
            "type": "array",
            "description": "Pages to validate, one per line. Bare domains are checked as https://domain/. Duplicates are removed. If both this field and 'HTML to validate' are empty, the example pages https://apify.com and https://example.com are checked.",
            "items": {
              "type": "string"
            }
          },
          "html": {
            "title": "HTML to validate",
            "type": "string",
            "description": "Optional: paste an HTML document (max. 5 MB) to validate it directly, without fetching a URL. It is returned as one extra result with source 'html-input'."
          },
          "discoverPages": {
            "title": "Find more pages of the same site",
            "enum": [
              "none",
              "sitemap",
              "links"
            ],
            "type": "string",
            "description": "'Only the listed URLs' validates exactly the URLs above. 'Sitemap' reads the sitemap(s) of each site (from robots.txt, otherwise /sitemap.xml). 'Follow links' crawls links on the same site. Both are limited by 'Maximum pages per site'.",
            "default": "none"
          },
          "maxPagesPerSite": {
            "title": "Maximum pages per site",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Upper limit of validated pages per site (host without 'www.') including the start URL, when pages are discovered via sitemap or links.",
            "default": 20
          },
          "maxDepth": {
            "title": "Maximum link depth",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Only for 'Follow links': how many clicks away from the start URL pages may be.",
            "default": 3
          },
          "includeSubdomains": {
            "title": "Include subdomains",
            "type": "boolean",
            "description": "Treat subdomains (e.g. blog.example.com for example.com) as the same site when discovering pages.",
            "default": false
          },
          "includePatterns": {
            "title": "Only discovered URLs matching",
            "type": "array",
            "description": "Optional glob patterns (e.g. '/blog/*' for path + query, or 'https://example.com/docs/*') or /regular expressions/. Discovered pages must match one of them. Start URLs are always validated.",
            "items": {
              "type": "string"
            }
          },
          "excludePatterns": {
            "title": "Skip discovered URLs matching",
            "type": "array",
            "description": "Optional glob patterns or /regular expressions/ for discovered pages that should not be validated (e.g. '/tag/*').",
            "items": {
              "type": "string"
            }
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Discovered pages disallowed by robots.txt (for 'html-validator') are skipped. Start URLs are always validated.",
            "default": true
          },
          "onlyErrors": {
            "title": "List only errors",
            "type": "boolean",
            "description": "The messages list contains only errors (no warnings or info messages). The counts always include all message types.",
            "default": false
          },
          "maxMessagesPerPage": {
            "title": "Maximum messages per page",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Caps the messages list of each page (the counts are always complete; 'messagesTruncated' shows when the list was cut). 0 = counts only.",
            "default": 100
          },
          "includeExtracts": {
            "title": "Include markup extracts",
            "type": "boolean",
            "description": "Adds a short extract of the markup around each problem. Only tags are kept: text content and free-text attribute values (alt, title, content, value …) are replaced by '…', e-mail addresses and phone numbers are masked.",
            "default": true
          },
          "userAgent": {
            "title": "User-Agent",
            "type": "string",
            "description": "Leave empty to identify as 'Mozilla/5.0 (compatible; html-validator/0.1; Apify Actor; +https://apify.com)'."
          },
          "maxConcurrency": {
            "title": "Parallel pages",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many pages are fetched and validated at the same time (1–10, at most 3 per host).",
            "default": 4
          },
          "timeoutSecs": {
            "title": "Timeout per request (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Inactivity timeout for fetching a page (until the response starts and between two data chunks).",
            "default": 30
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}