Viewport Meta Validator
Pricing
$2.99/month + usage
Viewport Meta Validator
Viewport meta validator that fetches any website and checks its mobile viewport tag for missing settings, fixed widths, and zoom-blocking restrictions that hurt Google rankings.
Viewport Meta Validator: Check Mobile Viewport Tags Across Any Website
Viewport Meta Validator checks any list of URLs for correct <meta name="viewport"> configuration. A missing or broken viewport tag is one of the most common reasons websites fail Google's mobile-friendliness test, which feeds directly into mobile search rankings.
Use cases
- SEO audits: scan full URL lists for missing or broken viewport tags before a ranking review
- Site migrations: confirm viewport tags survived a CMS switch or template change
- Quality assurance: catch viewport problems in staging before going live
- Agency reporting: export structured viewport data for client SEO reports
- Monitoring: run on a schedule to catch regressions after code deploys
Input
| Parameter | Type | Default | Description |
|---|---|---|---|
url | string | none | Single URL to check. Include the full URL with protocol. |
urls | array | none | List of URLs to check, one per line. Combined with url if both are provided. |
maxUrls | integer | 100 | Cap on how many URLs to process per run. Hard maximum is 1000. |
requestTimeoutSecs | integer | 30 | How long to wait for each page before timing out. |
proxyConfiguration | object | Datacenter (Anywhere) | Proxy type and location for requests. Supports Datacenter, Residential, Special, and custom proxies. Optional. |
Example input
{"urls": ["https://apify.com","https://news.ycombinator.com"],"maxUrls": 50,"proxyConfiguration": { "useApifyProxy": true }}
What data does this actor extract?
Each URL produces one record:
{"url": "https://apify.com","statusCode": 200,"hasViewportMeta": true,"viewportCount": 1,"viewportContent": "width=device-width, initial-scale=1","directives": { "width": "device-width", "initial-scale": "1" },"isValid": true,"isMobileFriendly": true,"issues": [],"recommendations": [],"checkedAt": "2025-01-15T10:30:00.000Z","error": null}
| Field | Type | Description |
|---|---|---|
url | string | Final URL after redirects |
statusCode | integer | HTTP response code |
hasViewportMeta | boolean | Whether the page has a viewport meta tag |
viewportCount | integer | Number of viewport tags found (should be 1) |
viewportContent | string | Raw content attribute value |
directives | object | Parsed viewport properties as key-value pairs |
isValid | boolean | Passes all best-practice checks |
isMobileFriendly | boolean | Meets Google mobile-friendliness requirements |
issues | array | Problems found with the viewport tag |
recommendations | array | Suggested fixes for each issue |
checkedAt | string | ISO 8601 timestamp |
error | string | Error message if the page could not be fetched |
What gets checked
The validator runs each viewport tag through six rules:
- Tag presence: pages with no viewport tag at all get flagged immediately
- width=device-width: fixed-width values like
width=320break responsive layouts on modern screens - initial-scale=1: values other than 1 cause inconsistent zoom behavior on first load
- user-scalable=no: blocks pinch-to-zoom, an accessibility violation Google penalizes in mobile rankings
- maximum-scale restrictions: values below 2 prevent users from zooming in at all
- Duplicate tags: multiple viewport tags cause unpredictable browser behavior; only the first one is used
How it works
- Accepts one URL or a list via the
urlandurlsinputs - Fetches each page with a realistic browser User-Agent and optional proxy support
- Parses the HTML and locates all
<meta name="viewport">tags - Extracts and parses the
contentattribute into individual directives - Runs each directive through the validation rules above
- Pushes one structured record per URL to the dataset
Integrations
Connect Viewport Meta Validator with other tools using Apify integrations. Export results to Google Sheets for client reports, trigger Slack alerts when issues are found, or chain it with a URL scraper to validate your full site in one workflow. You can also use webhooks to trigger downstream tasks when results land.
FAQ
Does this actor work on JavaScript-rendered pages?
It fetches raw HTML, which covers most real-world cases. Viewport tags live in the static <head> on the vast majority of sites. For heavy single-page apps that inject meta tags via JavaScript, a browser-based approach would be needed.
How many URLs can it process per run?
Up to 1000 (set with maxUrls). For bigger crawls, split your list across multiple runs or feed URLs in from an Apify dataset.
What does a passing viewport tag look like?
The minimum is <meta name="viewport" content="width=device-width, initial-scale=1">. Missing either of those two properties will trigger an issue.
Why does user-scalable=no matter for SEO? Google's mobile crawler reads the viewport tag when assessing mobile-friendliness. Pages that block zoom get flagged by Lighthouse and can lose ground in mobile search. It's one of the easier fixes with real ranking impact.
Can I run this on a schedule? Yes. Set up a scheduled run in Apify Console and point it at your URL list. Any new issues that appear between runs show up in the dataset for comparison.
Start checking viewport tags
Run Viewport Meta Validator on your URL list and export the results straight to a spreadsheet or drop them into your SEO reporting workflow.
