HTML Validator avatar

HTML Validator

Pricing

Pay per event

Go to Apify Store
HTML Validator

HTML Validator

This actor validates HTML structure on web pages. It checks for DOCTYPE declaration, character encoding, language attribute, deprecated HTML elements, viewport meta tag, multiple head/body elements, excessive inline styles, and empty structural elements. Each page gets a validation score.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Categories

Share

Validate HTML structure on web pages. Checks doctype, charset, language, deprecated elements, viewport, and structural issues.

What does HTML Validator do?

This actor validates HTML structure on web pages. It checks for DOCTYPE declaration, character encoding, language attribute, deprecated HTML elements, viewport meta tag, multiple head/body elements, excessive inline styles, and empty structural elements. Each page gets a validation score from 0 to 100, along with a detailed list of issues found categorized by severity (error or warning).

Process hundreds of URLs in a single run to audit entire websites quickly. Results are returned as structured JSON, making it easy to integrate into automated quality assurance pipelines.

Use cases

  • Web developers -- validate HTML before deployments to catch structural errors early
  • SEO specialists -- audit HTML structure across client websites, since poor markup can hurt search rankings
  • Accessibility auditors -- verify doctype and lang attributes required for WCAG compliance
  • QA engineers -- validate HTML quality after CMS migrations or platform changes
  • Agency teams -- monitor code quality across multiple client sites on an ongoing basis
  • Technical writers -- verify that documentation pages have proper HTML structure for consistent rendering across browsers

Why use HTML Validator?

  • Batch processing -- validate hundreds of URLs in a single run
  • Structured output -- get machine-readable JSON with scores, issue counts, and categorized problems
  • API access -- integrate validation into CI/CD pipelines or monitoring workflows
  • Fast and lightweight -- HTTP-only requests, no browser overhead
  • Pay-per-event pricing -- only pay for what you use, starting at fractions of a cent per URL
  • No setup required -- no local tools to install, just provide URLs and run
  • Detailed issue reports -- each issue includes a rule name, severity level, and human-readable description for easy triage

Input parameters

ParameterTypeRequiredDefaultDescription
urlsstring[]Yes--List of web page URLs to validate HTML structure

Example input

{
"urls": [
"https://www.google.com",
"https://en.wikipedia.org/wiki/Web_scraping",
"https://example.com"
]
}

Output example

{
"url": "https://example.com",
"title": "Example Domain",
"htmlVersion": "HTML5",
"hasDoctype": true,
"charset": "utf-8",
"language": null,
"score": 85,
"issueCount": 1,
"errorCount": 1,
"warningCount": 0,
"issues": [
{ "rule": "lang-missing", "severity": "error", "description": "Missing lang attribute on <html>" }
],
"error": null,
"checkedAt": "2026-03-01T12:00:00.000Z"
}

How much does it cost?

EventPriceDescription
Start$0.035One-time per run
URL checked$0.001Per page validated

Example costs:

  • 10 URLs: $0.035 + 10 x $0.001 = $0.045
  • 100 URLs: $0.035 + 100 x $0.001 = $0.135
  • 1,000 URLs: $0.035 + 1,000 x $0.001 = $1.035

Using the Apify API

Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const run = await client.actor('automation-lab/html-validator').call({
urls: ['https://example.com'],
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Python

from apify_client import ApifyClient
client = ApifyClient('YOUR_TOKEN')
run = client.actor('automation-lab/html-validator').call(run_input={
'urls': ['https://example.com'],
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(f'Validated {len(items)} pages')

Integrations

HTML Validator integrates with your existing workflow tools through the Apify platform. Connect it to Make (formerly Integromat), Zapier, or n8n to trigger validation runs automatically and route results to other apps. Send validation reports to Slack channels, log results in Google Sheets, or use webhooks to notify your deployment pipeline when HTML issues are found. You can also call the actor directly via the Apify API from any HTTP client.

Common integration patterns include:

  • CI/CD pipeline -- trigger a validation run after each deployment via webhook and fail the build if the score drops below a threshold
  • Weekly audit report -- schedule a run via Apify Scheduler and export results to Google Sheets for stakeholder review
  • Real-time alerts -- use a Zapier or Make integration to send a Slack message whenever a page scores below 70

Tips and best practices

  • Start with your most important pages -- homepage, landing pages, and high-traffic content pages are the best candidates for validation.
  • Use scheduled runs to monitor HTML quality over time, catching regressions introduced by CMS updates or new deployments.
  • Filter results by severity -- focus on errors first (missing doctype, missing lang) before addressing warnings.
  • Combine with other actors -- pair HTML Validator with Mobile Friendly Checker and OG Meta Extractor for a complete site audit.
  • Export results to a spreadsheet to share validation reports with your team or clients.
  • Track scores over time -- save results from each run and compare scores across weeks to measure improvement or catch regressions.

FAQ

What HTML issues does it check for? It checks for missing DOCTYPE, missing charset, missing lang attribute, deprecated elements, missing viewport meta tag, multiple head/body elements, excessive inline styles, and empty structural elements. Each issue includes a severity level (error or warning) and a human-readable description.

How is the validation score calculated? The score starts at 100 and decreases based on the number and severity of issues found. Errors deduct more points than warnings. A score of 90+ indicates good HTML quality, while scores below 70 suggest significant structural problems that should be addressed.

Does it validate CSS or JavaScript? No. This actor focuses on HTML structure only. It does not parse or validate CSS stylesheets or JavaScript code.

Can I validate pages behind a login? No. The actor makes standard HTTP requests without authentication. It can only validate publicly accessible pages.

How many URLs can I validate in one run? There is no hard limit on the number of URLs per run. The actor processes URLs concurrently for speed. Runs with thousands of URLs complete in minutes.

What is the scoring scale? The score ranges from 0 to 100. A score of 90 or above indicates good HTML quality with only minor issues. Scores between 70 and 89 suggest moderate problems. Scores below 70 indicate significant structural issues that should be prioritized for fixing.

Does it check for accessibility issues? It checks accessibility-related HTML requirements like the lang attribute and proper document structure, but it is not a comprehensive accessibility auditor. For full WCAG compliance testing, use a dedicated accessibility tool alongside this actor.