# Mobile-Friendly Test – Bulk Responsive, Crawl & Index Checker (`gazidev/mobile-friendly-test`) Actor

Bulk-check URLs for mobile-friendliness with the criteria of Google's retired test (viewport, content wider than screen, small text, close tap targets, plugins) plus crawlability (robots.txt) and indexability (noindex, X-Robots-Tag, canonical). Pass/fail, score and phone screenshot.

- **URL**: https://apify.com/gazidev/mobile-friendly-test.md
- **Developed by:** [Cemal Atakli](https://apify.com/gazidev) (community)
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 url checkeds

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 – Bulk Responsive, Crawl & Index Checker

Google retired its **Mobile-Friendly Test** in December 2023. This Actor brings it back as a bulk tool: paste a list of URLs and get, for every page, a **mobile-friendly pass/fail**, a **0–100 score**, the exact **issues** (viewport, content wider than screen, text too small, tap targets too close, plugins), whether the page **can be crawled** (robots.txt) and **indexed** (noindex, X-Robots-Tag, canonical), the **redirect chain**, and a **phone screenshot**.

Each page is rendered in real headless Chromium that emulates a phone (Pixel 7, iPhone 14 or Galaxy S20: screen size, pixel ratio, touch, mobile user agent). It uses **the same criteria as Google's retired test, computed independently**. It is not Google's or Bing's verdict, and no third-party API is called.

### What you can do with it

- **SEO audits:** check hundreds of landing pages for mobile-first indexing problems in one run.
- **Agencies:** a mobile-friendliness and indexability report with screenshots for every client URL.
- **QA after a redesign:** schedule it daily and alert on pages that stop passing.
- **Crawl and index sanity checks:** find pages blocked by robots.txt, `noindex` left on by mistake, wrong canonicals and redirect hops.
- **AI agents:** one structured verdict per URL, ready for an LLM summary or a ticket.

### Checks

| Check | Fails when |
|---|---|
| `viewportMetaPresent` | No `<meta name="viewport">`, so phones render a 980 px desktop layout and shrink it |
| `viewportWidthDevice` | The viewport is not `width=device-width` (for example `width=1024`) |
| `contentWiderThanScreen` | Content is wider than the layout viewport (`scrollWidth > clientWidth`) |
| `smallTextRatio` | More than 40% of visible text is under 12 px **as shown on screen** (zoom included), the Lighthouse font-size bar |
| `tapTargetsTooClose` | More than 10% of tap targets are under 24×24 px and crowded by a neighbour (WCAG 2.2 SC 2.5.8 spacing). In-sentence links are exempt. The count under Google's 48 px recommendation is reported too |
| `usesIncompatiblePlugins` | Flash, Java applets or Silverlight (`<object>`, `<embed>`, `<applet>`) |
| `horizontalScroll` | The user has to pan sideways at the initial zoom |
| `fixedWidthLayout` | A fixed viewport width, or a top-level container with a fixed `min-width` wider than the phone |

A page is **`mobileFriendly: true`** when the first six checks pass. These six are the criteria of Google's retired test. The **score** weights all eight checks: viewport 25, device width 15, content width 15, text 15, tap targets 15, plugins 5, horizontal scroll 5, fixed width 5. Warnings that do not fail the page include blocked pinch-zoom (`user-scalable=no`), a canonical that points elsewhere, `noindex`, and a non-HTML content type.

**Crawl and index:**

- `crawlingAllowed` evaluates robots.txt for the crawler you choose (Googlebot Smartphone, Bingbot or `*`). It uses Google's rules: the longest match wins, `*` and `$` wildcards work, a 4xx robots.txt means no restrictions, and a 5xx or unreachable robots.txt means the whole site is blocked.
- `indexingAllowed` checks meta robots (`robots` plus `googlebot` or `bingbot`) and the `X-Robots-Tag` header, including bot-specific forms such as `googlebot: noindex`.
- `indexable` = crawl allowed + no noindex + HTTP 2xx.

### Input example

```json
{
  "urls": ["https://apify.com", "https://example.com", "https://www.berkshirehathaway.com"],
  "device": "pixel-7",
  "screenshot": true,
  "checkIndexability": true,
  "userAgent": "googlebot-smartphone"
}
```

| Field | Default | Notes |
|---|---|---|
| `urls` | 2 sample URLs | `https://` is added if missing; duplicates are skipped |
| `device` | `pixel-7` | `iphone-14`, `galaxy-s20` |
| `screenshot` | `true` | First phone screen as JPEG in the key-value store, with a public URL |
| `checkIndexability` | `true` | Meta robots, X-Robots-Tag, canonical, `indexable` |
| `userAgent` | `googlebot-smartphone` | Changes **only** the robots.txt group and meta robots name that are evaluated. The page is always loaded with the phone's normal browser user agent |
| `ignoreRobots` | `false` | See "Is this polite?" below |
| `maxConcurrency` | 5 | Lowered automatically to fit memory |
| `timeoutSecs` | 30 | Slow pages are checked as rendered so far |

### Output example

```json
{
  "url": "https://www.berkshirehathaway.com",
  "finalUrl": "https://www.berkshirehathaway.com/",
  "httpStatus": 200,
  "mobileFriendly": false,
  "score": 25,
  "issues": [
    "Viewport not set: No <meta name=\"viewport\"> tag: phones render the page at 980px and shrink it",
    "Viewport not set to device-width: No viewport tag, so the width is not device-width",
    "Text too small to read: 100% of visible text is smaller than 12px on screen; e.g. \"3555 Farnam Street\" 5.5px",
    "Clickable elements too close together: 3 of 11 tap targets are smaller than 24x24px and crowded by a neighbour ...",
    "Fixed-width layout: Fixed width: no viewport tag (980px desktop layout)"
  ],
  "passedChecks": ["contentWiderThanScreen", "usesIncompatiblePlugins", "horizontalScroll"],
  "crawlingAllowed": true,
  "robotsRule": "robots.txt returned HTTP 404: no restrictions",
  "indexingAllowed": true,
  "indexable": true,
  "warnings": [],
  "checks": {"smallTextRatio": {"pass": false, "value": 0.998, "details": "..."}, "...": {}},
  "metaRobots": null,
  "xRobotsTag": null,
  "canonical": null,
  "redirectChain": [],
  "screenshotUrl": "https://api.apify.com/v2/key-value-stores/.../records/00003-www-berkshirehathaway-com.jpg",
  "device": "pixel-7",
  "viewport": "412x915@2.625x",
  "loadTimeMs": 1299,
  "checkedAt": "2026-11-04T12:20:46Z"
}
```

Other fields: `robotsTxt` (URL, status, matched group and rule), `canonicalIsSelf`, `title`, `lang`, `visualScale`, `checkTimeMs`, `screenshotKey`, `input`, `index` and `error`. The dataset has three views: **Mobile-friendly results** (with screenshots), **Crawl & index status** and **Errors**. The run summary is in the key-value store record `OUTPUT`.

### Pricing

Pay only for pages that got a verdict:

| Event | Price |
|---|---|
| URL checked | $0.002 |
| Phone screenshot (optional, on by default) | $0.0005 |
| Actor start | $0.00005 |

1,000 URLs with screenshots cost **$2.50**; without screenshots, $2. These are **free**: invalid URLs, DNS, TLS and timeout failures, pages that answer HTTP 4xx/5xx (an error or bot-block page has no meaningful verdict), URLs skipped because of robots.txt, and retries. You can cap the cost with *Maximum total charge*: the run stops gracefully before it would go over.

| Actor | Price (public Store listing, Nov 2026) | Notes |
|---|---|---|
| **This Actor** | $0.002 / URL (+ $0.0005 screenshot) | Own Chromium rendering, robots.txt + noindex + canonical, redirect chain, screenshot, 3 phones |
| dev00/bing-mobile-Friendliness-checker | $0.004 / URL | Wraps Bing's webmaster test |

### Is this polite? (robots.txt)

The Actor reads each site's robots.txt once. It reports crawlability **and respects it for its own visit**. If robots.txt disallows `User-agent: *` for a URL, that URL is reported (`crawlingAllowed`, the matched rule) but not rendered, and it is not charged. For **your own site**, you can turn on *Ignore robots.txt*. Page loads on the same host start at least 1 second apart. Ads, trackers and video are blocked, so test visits barely touch your analytics.

### Use with AI agents / Apify MCP

Call it from Claude, ChatGPT or any MCP client through the [Apify MCP server](https://mcp.apify.com). Example: *"Run a mobile-friendly test on these 30 landing pages and list the ones that fail, with the reason."* Each row has a boolean verdict, a score and plain-English `issues`, which suits LLM summaries.

### FAQ

**Is this Google's verdict?** No. Google retired its tool and its API. This Actor applies the same published criteria in a real mobile Chromium, so results are very close for most pages, but it is an independent measurement. Bing's tool can also differ slightly.

**Why is the tap-target rule 24 px and not 48 px?** Google's 48 px guideline is a recommendation. Applied strictly, it fails almost every modern site (footer link lists, for example). The pass/fail uses the WCAG 2.2 minimum (24 px or enough spacing), and `checks.tapTargetsTooClose.details` also counts targets under 48 px.

**A site returns 403.** Some sites block datacenter traffic. The row is free. You can try the *Proxy* option with Apify datacenter proxy. CAPTCHAs are not solved.

**Does it test desktop?** No, it tests the mobile view only. For full Lighthouse performance and SEO audits, use a Lighthouse Actor.

**Can I test pages behind a login?** No, only public URLs.

# Actor input Schema

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

Pages to test, one per line. `https://` is added if missing. Duplicates are skipped. Invalid URLs get a free error row.

## `device` (type: `string`):

Phone emulated by headless Chromium (screen size, pixel ratio, touch, mobile user agent).

## `screenshot` (type: `boolean`):

Save a JPEG of the first phone screen to the key-value store and return its public URL (charged as `screenshot`).

## `checkIndexability` (type: `boolean`):

Also report meta robots, X-Robots-Tag, canonical and an `indexable` verdict.

## `userAgent` (type: `string`):

Which robots.txt group and meta robots name (`googlebot` / `bingbot`) are evaluated for `crawlingAllowed` and `indexingAllowed`. The page itself is always loaded with the phone's normal browser user agent.

## `ignoreRobots` (type: `boolean`):

By default a URL whose robots.txt disallows all generic crawlers (`User-agent: *`) is reported but not rendered (free row). Turn this on only for sites you own or may test.

## `maxConcurrency` (type: `integer`):

How many pages are tested at the same time. Lowered automatically to fit the run memory. Pages on the same host are always started at least 1 s apart.

## `timeoutSecs` (type: `integer`):

Maximum time to load one page. Slow pages are checked as rendered so far.

## `maxRetries` (type: `integer`):

Retries for a page that failed to load (network error, timeout). Retries are free.

## `proxyConfiguration` (type: `object`):

Optional. Most sites work without a proxy. Datacenter Apify Proxy or your own proxy URLs are supported (residential is not).

## Actor input object example

```json
{
  "urls": [
    "https://apify.com",
    "https://example.com"
  ],
  "device": "pixel-7",
  "screenshot": true,
  "checkIndexability": true,
  "userAgent": "googlebot-smartphone",
  "ignoreRobots": false,
  "maxConcurrency": 5,
  "timeoutSecs": 30,
  "maxRetries": 1,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

## `indexability` (type: `string`):

No description

## `errors` (type: `string`):

No description

## `screenshots` (type: `string`):

No description

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

No description

## `results` (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://apify.com",
        "https://example.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("gazidev/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://apify.com",
        "https://example.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("gazidev/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://apify.com",
    "https://example.com"
  ]
}' |
apify call gazidev/mobile-friendly-test --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,gazidev/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/kZfayRL8G4Wu2TCgu/builds/jbMTnOeNmyeMj38rD/openapi.json
