# Mobile-Friendly Test in Bulk: Real Chrome \[USD 2/1K] (`usefulapi/mobile-friendly-test`) Actor

Test a list of URLs for mobile-friendliness in a real phone-sized Chrome: viewport, content width, text size, tap targets and plugins, with the numbers, plus HTTP status, robots.txt, noindex and canonical. USD 2 per 1,000 pages.

- **URL**: https://apify.com/usefulapi/mobile-friendly-test.md
- **Developed by:** [Useful API](https://apify.com/usefulapi) (community)
- **Categories:** SEO tools, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 page testeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Mobile-Friendly Test in Bulk: real phone-sized Chrome

Give it a list of URLs. Each page is opened in a real headless Chromium at a phone size (412 x 915 CSS px, touch, mobile) and measured. You get a yes or no for mobile-friendliness, the list of checks that failed, and the numbers behind every check, plus the indexing facts that decide whether search engines can use the page: HTTP status, redirect chain, robots.txt for Googlebot and Bingbot, noindex, X-Robots-Tag and canonical.

Google retired its own Mobile-Friendly Test tool. This Actor checks the same five kinds of problem that tool reported, but with limits we chose and calibrated ourselves on real pages, and it shows the measured numbers behind each check, so you can see why a page failed. It does not reproduce Google's old verdict or Bing's verdict (see the FAQ).

### What is checked

| Check | What is measured | Fails when |
|---|---|---|
| Viewport tag | the `<meta name="viewport">` content, and the layout width the browser actually used | no tag, a fixed width, or the browser lays the page out wider than the screen |
| Content wider than the screen | document scroll width against the 412 px screen, and the elements that stick out | content is more than 1 px wider than the screen |
| Text too small | share of visible text characters under 12 CSS px (after the page's own zoom) | more than 30% of the text is under 12 px |
| Tap targets | links, buttons and form controls under 48 x 48 px that sit closer than 8 px to another one (`tapTargetIssues`), with up to 5 examples | our own rule: at least 10 tiny (under 32 px) crowded targets that make up at least half of all targets |
| Plugins | `object`, `embed` and `applet` elements, and which are Flash, Silverlight or Java | any Flash, Silverlight or Java element |

`mobileFriendly` is `true` when none of the five fails, `false` when at least one fails (`failedChecks` lists them), and `null` when the page could not be tested (see `status`). A blocked pinch zoom (`user-scalable=no`, `maximum-scale` under 2) is reported in `warnings` and does not fail a page.

The limits are ours, not Google's (Google never published its exact numbers). They are listed in the `thresholds` object in the run's `OUTPUT` record, and every row carries the measured values, so you can apply your own limits to the raw numbers. Links inside running text (a link with sentence text around it) are not counted as tap targets, as in WCAG 2.2.

**The tap-target verdict is our own calibration.** A plain "under 48 px and closer than 8 px" rule failed many large, well-built sites in our test runs (apple.com, wikipedia.org, stripe.com among them), because their footers and menus hold many small links. So the check only fails a page when most of its tap targets are tiny and crowded. The plain 48 px / 8 px count is still reported in `tapTargetIssues` if you want the stricter reading.

### Input

```json
{
  "urls": ["https://www.bbc.com/", "https://news.ycombinator.com/", "example.com/pricing"],
  "screenshots": false,
  "maxUrls": 1000
}
```

- `urls`: full URLs (the path matters) or bare domains (opened as https://, with fallbacks to www. and http://). Duplicates are dropped. IP addresses, localhost, odd ports and URLs with a user name get a free `invalid_input` row.
- `screenshots`: saves the first phone screen of each tested page as a JPEG (412 x 915, about 55 KB in our test) and puts a signed link in `screenshotUrl`. Screenshots live in their own key-value store and expire after 7 days. The `OUTPUT` record has a ZIP link for all of them.
- `maxUrls`: stop after this many URLs.

### Output (one row per URL, trimmed from a real run)

```json
{
  "input": "https://www.berkshirehathaway.com/",
  "status": "ok",
  "httpStatus": 200,
  "mobileFriendly": false,
  "failedChecks": ["viewport", "contentWiderThanScreen", "textTooSmall"],
  "warnings": [],
  "checks": {
    "viewport": { "pass": false, "problem": "no_viewport_tag", "metaViewport": null, "layoutViewportWidth": 980, "pageScale": 0.42 },
    "contentWidth": { "pass": false, "viewportWidth": 412, "scrollWidth": 981, "overflowPx": 569, "widestElements": [{ "selector": "p", "right": 972, "width": 964 }] },
    "textSize": { "pass": false, "smallTextShare": 0.998, "textChars": 1197, "smallestFontPx": 4.2, "minFontPx": 12, "examples": [{ "selector": "a", "fontPx": 6.7, "chars": 643 }] },
    "tapTargets": { "pass": true, "tapTargets": 9, "smallerThan48": 9, "tapTargetIssues": 0, "crowdedTargets": 0 },
    "plugins": { "pass": true, "pluginElements": 0, "incompatible": 0 }
  },
  "indexability": {
    "indexable": true,
    "robotsTxt": { "robotsTxt": "missing", "ourBot": { "allowed": true }, "googlebot": { "allowed": true }, "bingbot": { "allowed": true } },
    "metaRobots": null, "xRobotsTag": null,
    "canonical": { "status": "missing", "url": null }
  },
  "redirects": [{ "url": "https://www.berkshirehathaway.com/", "status": 200 }],
  "finalUrl": "https://www.berkshirehathaway.com/",
  "title": "BERKSHIRE HATHAWAY INC.",
  "loadMs": 1180
}
```

(Shortened: the lists of examples are cut to one entry. Real rows also carry `billedAs`.)

#### Statuses

`ok` (tested), `not_found` (404 or 410), `http_error` (other 4xx or 5xx, also when the browser got an error the plain request did not), `blocked` (a bot wall or a refusal such as a Cloudflare challenge: we do not work around it), `blocked_by_robots` (the site's robots.txt does not allow our crawler, or it did not answer twice or answered with a server error, which RFC 9309 says to treat as closed; we did not open the page, and the Googlebot and Bingbot verdicts are still reported), `dns_not_found`, `unreachable` (no answer, refused, bad certificate), `timeout` (the page did not finish in time), `not_html` (a PDF, JSON, an image...), `private_address` (the URL or a redirect points to a private address; never fetched), `invalid_input`. A bad URL never fails the run: it becomes a row. When your maximum cost per run is reached, the run stops before the next URL: the URLs not started get no row, and `OUTPUT` says so (`stoppedEarly`, `urlsNotStarted`).

### Pricing (pay per event)

| Event | Price | When |
|---|---|---|
| Run start | USD 0.005 per GB of memory (the Actor runs at 4 GB: USD 0.02 per run) | once per run |
| Page tested | USD 0.002 (USD 2 per 1,000) | the browser opened and measured the page |
| URL checked, no test | USD 0.0005 | dead, blocked, robots-blocked, error, not a page, timeout |
| Screenshot saved | USD 0.0005 | only with `screenshots` on |

Worked example: 1,000 URLs of which 850 are tested and 150 are dead or blocked: 0.02 + 850 x 0.002 + 150 x 0.0005 = USD 1.795. The same run with screenshots: add 850 x 0.0005 = USD 0.425, USD 2.22 in all. A run of 10 tested URLs costs 0.02 + 10 x 0.002 = USD 0.04. Invalid input rows are free. Set a maximum cost per run and the Actor stops cleanly before reaching it (rows are kept, `stoppedEarly` says why). The minimum you can set is USD 0.03.

The run start covers starting a browser machine: Apify bills the seconds it takes to load the Actor (about 20 s on a fresh server) and the browser start, before any URL is opened.

### Limits and honest notes

- Our crawler identifies itself: the user agent is an Android Chrome string ending in `(compatible; UsefulApiBot/1.0; +https://apify.com/usefulapi)`, as Googlebot Smartphone does with its own token. We obey robots.txt for `UsefulApiBot` (else the `*` group). A site that allows only Googlebot will come back `blocked_by_robots` even if Google can crawl it, and a site that shows a bot check comes back `blocked`.
- A page must finish loading in about 12 seconds and each URL has a hard limit of 20 seconds, so very slow pages return `timeout`.
- Two URLs at most per host at a time, with a short pause. The browser runs three pages in parallel.
- A list where most URLs hang until their time limit can stop early with `stoppedEarly` set: each such URL is billed only USD 0.0005 but holds a browser slot for 20 seconds. Rows already written are kept; run the rest again.
- Everything is measured at one phone size (412 x 915). Pages that change layout after user actions, behind logins or after consent walls are measured as the first load shows them.
- Tap-target and text rules are heuristics with our limits (above). Another tool with other limits can give another verdict on the same page: in our side-by-side test of four pages, another Store Actor gave the same verdict on three and differed on stripe.com, where we fail the tap-target check (84 of 139 targets are footer links 20 px high, 4 px apart).
- The Actor reads no contact data. An email address or an international phone number that turns up in a URL, and also a local-format phone number in a page title or an error text, is replaced by `[removed]` (pattern matching).
- Private addresses are never contacted: every browser connection goes through a local proxy that resolves the host itself and refuses private, loopback, link-local and metadata addresses and ports other than 80, 443, 8080 and 8443.
- Screenshots and unnamed storage expire after 7 days.

### FAQ

**Is this Google's verdict, or Bing's?** Neither. Google's tool is gone, and its exact limits were never published; Bing runs its own test with its own rules. This is our measurement of the same kinds of problem in a real Chromium, with our limits, so a page can pass here and fail elsewhere (or the other way round). The `robotsTxt` and `indexable` fields tell you separately whether Googlebot and Bingbot may crawl and index the URL.

**Why is a big site marked not friendly because of tap targets?** Because most of its links are tiny and close together on a phone. Check `checks.tapTargets.examples`.

**Does it store anything about my URLs?** Only the run's own dataset and key-value store in your account.

### Related Actors

- [Bulk SEO Audit API](https://apify.com/usefulapi/seo-url-audit): titles, meta, schema, hreflang and redirects for a URL list, without a browser.
- [Tech Stack Detector](https://apify.com/usefulapi/tech-stack-detector): the CMS, frameworks and tools a site runs on.

# Actor input Schema

## `urls` (type: `array`):

One per line: a full URL such as https://example.com/pricing, or a bare domain such as example.com (opened as https://). Each page is opened in a phone-sized Chrome. Duplicates are dropped.

## `screenshots` (type: `boolean`):

Saves the first screen of every tested page as a JPEG (412 x 915 CSS px) and adds a link in the row (screenshotUrl). Charged per screenshot. Screenshots expire after 7 days: download them within 7 days.

## `maxUrls` (type: `integer`):

Stop after this many URLs (the rest of the list is ignored). Leave empty for all.

## Actor input object example

```json
{
  "urls": [
    "https://www.bbc.com/",
    "https://news.ycombinator.com/",
    "https://example.com/"
  ],
  "screenshots": false
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `checks` (type: `string`):

No description

## `indexing` (type: `string`):

No description

## `summary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "urls": [
        "https://www.bbc.com/",
        "https://news.ycombinator.com/",
        "https://example.com/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("usefulapi/mobile-friendly-test").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "urls": [
        "https://www.bbc.com/",
        "https://news.ycombinator.com/",
        "https://example.com/",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("usefulapi/mobile-friendly-test").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    "https://www.bbc.com/",
    "https://news.ycombinator.com/",
    "https://example.com/"
  ]
}' |
apify call usefulapi/mobile-friendly-test --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,usefulapi/mobile-friendly-test"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/rZiSMeJZuEVioQ2AP/builds/x1KmJumqCkaf1n3JR/openapi.json
