HTML Validator
Pricing
Pay per event
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
Actor stats
0
Bookmarked
2
Total users
1
Monthly active users
7 hours 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.
Who is it for?
- 💻 Web developers — catching HTML errors and standards violations before deployment
- ♿ Accessibility specialists — identifying markup issues that affect screen readers and assistive tools
- 🔍 SEO specialists — fixing HTML problems that can hurt search engine crawling and indexing
- 🧪 QA engineers — automating HTML validation checks across large websites
- 🏢 Digital agencies — running bulk validation audits on client websites
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
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
urls | string[] | 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 to validate HTML on a website
- Go to HTML Validator on Apify Store
- Enter the URLs of the pages you want to validate
- Click Start and wait for results
- Review the validation scores, issues, and error details for each page
- Download results as JSON, CSV, or Excel
How much does it cost to validate HTML?
| Event | Price | Description |
|---|---|---|
| Start | $0.035 | One-time per run |
| URL checked | $0.001 | Per 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 ApifyClientclient = ApifyClient('YOUR_TOKEN')run = client.actor('automation-lab/html-validator').call(run_input={'urls': ['https://example.com'],})items = client.dataset(run['defaultDatasetId']).list_items().itemsprint(f'Validated {len(items)} pages')
cURL
curl "https://api.apify.com/v2/acts/automation-lab~html-validator/runs" \-X POST \-H "Content-Type: application/json" \-H "Authorization: Bearer YOUR_TOKEN" \-d '{"urls": ["https://example.com"]}'
Use with AI agents via MCP
HTML Validator is available as a tool for AI assistants via the Model Context Protocol (MCP).
Setup for Claude Code
$claude mcp add --transport http apify "https://mcp.apify.com"
Setup for Claude Desktop, Cursor, or VS Code
{"mcpServers": {"apify": {"url": "https://mcp.apify.com"}}}
Example prompts
- "Validate HTML on https://example.com"
- "Check our website for HTML errors"
Learn more in the Apify MCP documentation.
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.
Legality
This tool analyzes publicly accessible web content. Automated analysis of public web resources is standard practice in SEO and web development. Always respect robots.txt directives and rate limits when analyzing third-party websites. For personal data processing, ensure compliance with applicable privacy regulations.
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.
Why does a page show a low score even though it looks fine in the browser? Browsers are very forgiving and will render pages even with significant HTML errors. The validator checks for standards compliance issues (missing doctype, missing lang attribute, deprecated elements) that browsers silently tolerate but that affect SEO, accessibility, and cross-browser consistency.
The actor returned an error for my URL. What should I do?
Check that the URL is publicly accessible and returns HTML content. The actor cannot validate pages behind authentication, and non-HTML responses (PDFs, images, API endpoints) will produce errors. Also verify the URL includes the protocol (https://).
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.
Other SEO tools
- Heading Structure Checker — Analyze heading hierarchy (H1-H6) for SEO and accessibility
- Hreflang Checker — Validate hreflang tags for international SEO
- HTTP Headers Security Checker — Analyze HTTP security headers with A+ to F grading
- HTTP Status Checker — Check HTTP status codes, redirects, and response times
- Iframe Detector — Detect and categorize embedded iframes on web pages
- Image Alt Checker — Check images for missing or poor alt text
- Accessibility Checker — Audit web pages for WCAG accessibility compliance
- SEO Title Checker — Validate page titles for SEO best practices
- Broken Link Checker — Find broken links across your website
- Website Health Report — Comprehensive website health and SEO audit


