# SEO Site Checker (Pay per Event) (`eiv/seo-site-checker`) Actor

Crawl any website and extract 70+ on-site SEO metrics — meta tags, Core Web Vitals, structured data, mobile-friendliness, security headers, and page speed. Get a complete SEO audit with per-check scores and actionable recommendations.

- **URL**: https://apify.com/eiv/seo-site-checker.md
- **Developed by:** [Eimantas V](https://apify.com/eiv) (community)
- **Categories:** SEO tools, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 results

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## SEO Site Checker

An advanced Apify Actor that performs comprehensive on-site SEO analysis for any website. Crawl one or hundreds of pages and receive a detailed, structured JSON report covering 70+ SEO metrics across meta tags, content quality, technical health, Core Web Vitals, security, and mobile-friendliness — plus an overall SEO score.

---

### What It Checks

#### Meta & Social
| Check | Description |
|---|---|
| Meta Title Test | Presence, length (50–60 chars), and duplicate words |
| Meta Description Test | Presence and length (120–160 chars) |
| Google Search Preview | Simulated title/URL/description as shown in SERPs |
| Open Graph Tags | og:title, og:description, og:image, and all og: properties |
| Twitter Card Tags | twitter:card, twitter:title, twitter:description, and all twitter: properties |
| Hreflang Tags | Language/region targeting links |
| Canonical Tag | Presence and validity of canonical URL |
| Noindex Tag | Whether the page blocks indexing |
| Nofollow Tag | Whether the page sets global nofollow |
| Meta Refresh | Detects harmful meta refresh redirects |
| Charset Declaration | Presence of charset (UTF-8) |
| Language Attribute | HTML lang attribute |

#### Headings & Content
| Check | Description |
|---|---|
| Heading Tags Test (H1–H6) | Extracts all headings, checks hierarchy, flags missing/multiple H1 |
| Most Common Keywords | Top 20 keywords with frequency count and density % |
| Keywords Cloud | Weighted keyword cloud data |
| Related Keywords | Suggested semantic variations of top keywords |
| Word Count | Total word count on the page |
| Paragraph Count | Number of `<p>` tags |
| Lorem Ipsum Test | Detects placeholder text |
| Strong Tags | Count of `<strong>` and `<b>` elements |
| iFrames | Count of embedded iframes |
| Spell Check | Basic spell-check error count |

#### Links
| Check | Description |
|---|---|
| Internal Links | List and count of internal links |
| External Links | List and count of external links |
| Nofollow Links | Count of rel="nofollow" links |
| Average Anchor Text Length | Mean character length of link anchor texts |
| Unsafe Cross-Origin Links | `target="_blank"` links missing `rel="noopener noreferrer"` |
| Competitor Domains | External domains inferred as potential competitors |

#### Images
| Check | Description |
|---|---|
| Image Alt Test | Images missing alt attributes |
| Modern Image Format Test | WebP/AVIF adoption rate |
| Responsive Image Test | Images using srcset/sizes |
| Image Aspect Ratio Test | Images with potentially incorrect width/height ratios |
| Image Caching Test | Heuristic cache-buster detection on image URLs |
| Lazy Loading | Count of images with `loading="lazy"` |

#### Technical SEO
| Check | Description |
|---|---|
| Robots.txt Test | Existence, Disallow rules, sitemap references, and block-all detection |
| Sitemap Test | Auto-discovery of sitemap.xml / sitemap_index.xml, page count |
| SEO Friendly URL Test | Length, casing, underscores, parameters, special characters, depth |
| Doctype Test | HTML5 DOCTYPE vs. legacy |
| Structured Data Test | JSON-LD, Microdata, RDFa, Schema.org detection |
| Custom 404 Page Test | Whether the server returns a proper 404 for missing pages |
| URL Redirects Test | Redirect chain depth and type (301/302) |
| Noindex Tag Test | `<meta name="robots" content="noindex">` |
| Canonical Tag Test | `<link rel="canonical">` presence and validity |
| Meta Refresh Test | Harmful meta-refresh redirect detection |
| Deprecated HTML Tags Test | marquee, blink, font, center, frame, frameset, etc. |
| Nested Tables Test | Layout tables nested inside tables |
| Frameset Test | Obsolete frameset element detection |
| Flash Test | Flash object/embed detection |
| Inline CSS Test | Count of elements with `style=""` attributes |
| AMP Link | `<link rel="amphtml">` presence |

#### Performance & Speed
| Check | Description |
|---|---|
| Site Loading Speed Test | Total page load time (DOMContentLoaded, load event) |
| Largest Contentful Paint (LCP) | Core Web Vital — Good ≤2.5s, Poor >4s |
| Cumulative Layout Shift (CLS) | Core Web Vital — Good ≤0.1, Poor >0.25 |
| First Contentful Paint (FCP) | Time to first visible content |
| Time to First Byte (TTFB) | Server response latency |
| JS Execution Time | Estimated JavaScript processing time |
| HTML Page Size Test | Total transfer size of all resources |
| DOM Size Test | Number of DOM elements (recommended ≤1,500) |
| HTML Compression/GZIP Test | Content-Encoding header (gzip/brotli) |
| Render Blocking Resources Test | Scripts and stylesheets in `<head>` without async/defer |
| JavaScript Minification Test | Detects unminified JS files |
| CSS Minification Test | Detects unminified CSS files |
| JavaScript Caching Test | Cache indicator detection on JS resources |
| CSS Caching Test | Cache indicator detection on CSS resources |
| Image Caching Test | Cache indicator detection on image resources |
| Page Cache Test | Cache-Control / ETag / Expires headers |
| CDN Usage Test | Detects Cloudflare, CloudFront, Fastly, Akamai, Azure CDN |
| Page Objects | Counts JS, CSS, image, font, and total resource files |

#### Security
| Check | Description |
|---|---|
| HTTPS Test | Whether the page is served over HTTPS |
| SSL Certificate Test | Certificate validity, issuer, and days until expiry |
| HSTS Test | Strict-Transport-Security header configuration |
| Mixed Content Test | HTTP resources loaded on an HTTPS page |
| HTTP/2 Test | HTTP/2 protocol detection |
| Server Signature Test | Whether the Server header exposes version info |
| Directory Browsing Test | Detects open directory listings |
| Plaintext Emails Test | Email addresses exposed in page source |
| Unsafe Cross-Origin Links Test | `target="_blank"` without `rel="noopener"` |
| Safe Browsing Test | Google Safe Browsing malware/phishing check (requires API key) |

#### Mobile & Responsive
| Check | Description |
|---|---|
| Meta Viewport Test | Presence and content of `<meta name="viewport">` |
| Media Query Responsive Test | CSS media query count |
| Mobile Responsive | Flex/Grid layout and viewport combination heuristic |
| Apple Touch Icon | Presence of Apple home-screen icon |
| Mobile Snapshot | Optional JPEG screenshot at 375×812 (iPhone) viewport |

#### Analytics & Social Presence
| Check | Description |
|---|---|
| Google Analytics Test | GA4 / UA tracking code detection |
| Google Tag Manager | GTM container detection |
| Facebook Pixel | Meta Pixel detection |
| Hotjar | Hotjar tracking detection |
| Social Media Links | Facebook, Twitter/X, LinkedIn, Instagram, YouTube link extraction |

#### Domain & DNS
| Check | Description |
|---|---|
| Favicon Test | `<link rel="icon">` detection |
| SPF Records Test | DNS TXT record for email spoofing prevention |
| Ads.txt Validation | `ads.txt` existence and basic validity |
| Domain Length | Character count of the domain name |

---

### Input

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `startUrls` | `array` | ✅ | — | One or more URLs to analyse |
| `maxDepth` | `integer` | | `1` | Link crawl depth from each start URL |
| `maxPagesPerCrawl` | `integer` | | `10` | Maximum pages to analyse in total |
| `waitForNetworkIdle` | `boolean` | | `true` | Wait for JS to settle before analysis |
| `checkMobileView` | `boolean` | | `false` | Capture mobile screenshot (slower) |
| `safeBrowsingApiKey` | `string` | | — | Google Safe Browsing API key |
| `proxyConfiguration` | `object` | | — | Apify proxy settings |

#### Input Example

```json
{
  "startUrls": [
    { "url": "https://example.com" },
    { "url": "https://example.com/blog" }
  ],
  "maxDepth": 1,
  "maxPagesPerCrawl": 5,
  "waitForNetworkIdle": true,
  "checkMobileView": false
}
````

***

### Output

Each analysed page produces one item in the dataset. Below is an annotated example.

```json
{
  "url": "https://example.com",
  "finalUrl": "https://example.com/",
  "statusCode": 200,
  "crawledAt": "2024-06-01T12:00:00.000Z",

  "title": "Example Domain",
  "titleLength": 14,
  "description": "This domain is for use in illustrative examples.",
  "descriptionLength": 48,
  "iframes": 0,
  "language": "en",
  "hasHreflang": false,
  "domainLength": 11,
  "viewportPresent": false,
  "mobileResponsive": false,
  "charsetPresent": true,
  "hasFavicon": false,

  "h1": ["Example Domain"],
  "h1Count": 1,
  "h2Count": 0,
  "h3Count": 0,
  "wordCount": 42,
  "paragraphCount": 2,
  "hasLoremIpsum": false,
  "hasAppleTouchIcon": false,
  "jsFileCount": 0,
  "cssFileCount": 0,
  "strongTagCount": 0,
  "internalLinksCount": 0,
  "externalLinksCount": 1,
  "averageAnchorTextLength": 15,
  "imagesWithoutAlt": 0,

  "hasGoogleAnalytics": false,
  "hasHTTPS": true,
  "hasJSONLD": false,
  "hasMicrodata": false,
  "metaRobots": null,
  "canonicalUrl": null,
  "hasSitemap": false,
  "hasOpenGraph": false,
  "hasTwitterCards": false,
  "hasAMP": false,
  "hasSchema": false,

  "meta": {
    "title": "Example Domain",
    "titleLength": 14,
    "titleDuplicateWords": [],
    "titleTest": { "passed": false, "score": 20, "message": "Meta title is too short (14 chars). Aim for 50–60 characters." },
    "description": "This domain is for use in illustrative examples.",
    "descriptionLength": 48,
    "descriptionTest": { "passed": false, "score": 40, "message": "Meta description too short (48 chars). Aim for 120–160 characters." },
    "viewport": null,
    "viewportPresent": false,
    "charset": "utf-8",
    "charsetPresent": true,
    "robots": null,
    "noindex": false,
    "nofollow": false,
    "metaRefresh": null,
    "canonical": null,
    "canonicalTest": { "passed": false, "score": 40, "message": "No canonical tag found." },
    "language": "en",
    "hreflang": [],
    "hasHreflang": false,
    "openGraph": { "present": false, "tags": [] },
    "twitterCard": { "present": false, "tags": [] },
    "searchPreview": {
      "title": "Example Domain",
      "url": "example.com/",
      "description": "This domain is for use in illustrative examples."
    },
    "allMetaTags": [
      { "name": "viewport", "content": "..." }
    ]
  },

  "headings": {
    "h1": ["Example Domain"],
    "h2": [], "h3": [], "h4": [], "h5": [], "h6": [],
    "counts": { "h1": 1, "h2": 0, "h3": 0, "h4": 0, "h5": 0, "h6": 0 },
    "test": { "passed": true, "score": 100, "message": "Heading structure is correct: one H1 with proper hierarchy." },
    "issues": []
  },

  "content": {
    "wordCount": 42,
    "paragraphCount": 2,
    "iframeCount": 0,
    "strongTagCount": 0,
    "hasLoremIpsum": false,
    "keywords": {
      "topKeywords": [
        { "word": "domain", "count": 4, "density": 9.52 },
        { "word": "example", "count": 3, "density": 7.14 }
      ],
      "cloud": [
        { "word": "domain", "weight": 100 },
        { "word": "example", "weight": 75 }
      ],
      "relatedKeywords": ["domains", "examples", "domaining"]
    },
    "spellCheck": { "errorCount": 0, "errors": [] }
  },

  "links": {
    "internal": [],
    "internalCount": 0,
    "external": ["https://www.iana.org/domains/reserved"],
    "externalCount": 1,
    "nofollowCount": 0,
    "averageAnchorLength": 15,
    "unsafeCrossOriginLinks": [],
    "unsafeCrossOriginCount": 0,
    "competitorDomains": ["iana.org"]
  },

  "images": {
    "total": 0,
    "withAlt": 0,
    "withoutAlt": 0,
    "withoutAltList": [],
    "altTest": { "passed": true, "score": 100, "message": "All images have alt attributes." },
    "modernFormatCount": 0,
    "hasModernFormats": false,
    "responsiveCount": 0,
    "lazyLoadCount": 0,
    "aspectRatioIssues": []
  },

  "technical": {
    "robotsTxt": {
      "exists": true,
      "url": "https://example.com/robots.txt",
      "disallowedPaths": [],
      "sitemapUrls": [],
      "hasDisallowAll": false,
      "test": { "passed": true, "score": 100, "message": "robots.txt is accessible and configured correctly." }
    },
    "sitemap": {
      "exists": false,
      "sitemapUrl": null,
      "pageCount": 0,
      "test": { "passed": false, "score": 0, "message": "No sitemap.xml found." }
    },
    "url": {
      "seoFriendly": true,
      "length": 19,
      "issues": [],
      "test": { "passed": true, "score": 100, "message": "URL is SEO-friendly." }
    },
    "doctype": { "present": true, "type": "HTML5", "test": { "passed": true, "score": 100, "message": "HTML5 DOCTYPE declared." } },
    "structuredData": {
      "hasJSONLD": false,
      "hasMicrodata": false,
      "hasRDFa": false,
      "hasSchema": false,
      "data": []
    },
    "hasAMP": false,
    "custom404": { "exists": true, "test": { "passed": true, "score": 100, "message": "Custom 404 page configured." } },
    "noindexTag": false,
    "noindexHeader": false
  },

  "performance": {
    "loadTime": 312,
    "ttfb": 45,
    "domContentLoaded": 180,
    "pageSize": 1648,
    "htmlSize": 1256,
    "domSize": 14,
    "compression": { "enabled": true, "type": "gzip", "test": { "passed": true, "score": 100, "message": "GZIP compression is enabled." } },
    "serverCaching": { "enabled": true, "cacheControl": "max-age=86400", "etag": "\"abc123\"", "test": { "passed": true, "score": 100, "message": "Server-side caching headers configured." } },
    "cdn": { "detected": false, "provider": null, "test": { "passed": false, "score": 40, "message": "No CDN detected." } },
    "coreWebVitals": {
      "lcp": 285,
      "cls": 0,
      "fcp": 210,
      "ttfb": 45,
      "lcpTest": { "passed": true, "score": 100, "message": "LCP is 285ms — Good (≤2.5s)." },
      "clsTest": { "passed": true, "score": 100, "message": "CLS is 0.000 — Good (≤0.1)." }
    },
    "renderBlocking": { "jsCount": 0, "cssCount": 0, "resources": [], "test": { "passed": true, "score": 100, "message": "No render-blocking resources." } },
    "resources": { "jsFiles": 0, "cssFiles": 0, "images": 0, "fonts": 0, "total": 0 },
    "jsExecutionTime": 12
  },

  "security": {
    "https": { "present": true, "test": { "passed": true, "score": 100, "message": "Site uses HTTPS." } },
    "ssl": {
      "valid": true,
      "issuer": "DigiCert Inc",
      "subject": "*.example.com",
      "expiresIn": 120,
      "validTo": "Oct  2 12:00:00 2024 GMT",
      "test": { "passed": true, "score": 100, "message": "SSL certificate is valid (expires in 120 days)." }
    },
    "hsts": {
      "present": true,
      "maxAge": 31536000,
      "includeSubdomains": true,
      "preload": false,
      "test": { "passed": true, "score": 100, "message": "HSTS is properly configured." }
    },
    "mixedContent": { "present": false, "items": [], "count": 0, "test": { "passed": true, "score": 100, "message": "No mixed content detected." } },
    "http2": true,
    "serverSignature": { "exposed": false, "value": null, "test": { "passed": true, "score": 100, "message": "Server signature not exposing version." } },
    "directoryBrowsing": { "enabled": false, "test": { "passed": true, "score": 100, "message": "Directory browsing disabled." } },
    "plaintextEmails": { "found": false, "emails": [], "test": { "passed": true, "score": 100, "message": "No plaintext emails found." } },
    "safeBrowsing": { "checked": false, "safe": null, "test": { "passed": true, "score": 50, "message": "Safe Browsing check skipped (no API key)." } }
  },

  "mobile": {
    "hasViewport": false,
    "viewport": null,
    "viewportTest": { "passed": false, "score": 0, "message": "Viewport meta tag is missing." },
    "isResponsive": false,
    "mediaQueryCount": 0,
    "mediaQueryTest": { "passed": false, "score": 20, "message": "No CSS media queries found." },
    "hasAppleTouch": false,
    "mobileSnapshot": null
  },

  "analytics": {
    "hasGoogleAnalytics": false,
    "hasGoogleTagManager": false,
    "hasFacebookPixel": false,
    "hasHotjar": false,
    "analyticsTest": { "passed": false, "score": 40, "message": "No analytics tracking detected." },
    "socialLinks": {
      "facebook": null,
      "twitter": null,
      "linkedin": null,
      "instagram": null,
      "youtube": null
    }
  },

  "domain": {
    "name": "example.com",
    "length": 11,
    "favicon": { "present": false, "url": null, "test": { "passed": false, "score": 40, "message": "No favicon found." } },
    "spf": { "present": false, "record": null, "test": { "passed": false, "score": 40, "message": "No SPF DNS record found." } },
    "adsTxt": { "exists": false, "valid": null, "test": { "passed": false, "score": 40, "message": "ads.txt not found." } }
  },

  "errors": {
    "jsErrors": [],
    "jsErrorTest": { "passed": true, "score": 100, "message": "No JavaScript errors detected." },
    "consoleErrors": [],
    "consoleErrorTest": { "passed": true, "score": 100, "message": "No console errors detected." },
    "deprecatedTags": [],
    "nestedTables": 0,
    "hasFrameset": false,
    "inlineCssCount": 3,
    "flash": false
  },

  "seoScore": {
    "total": 61,
    "grade": "D",
    "breakdown": {
      "meta": 47,
      "content": 72,
      "technical": 65,
      "performance": 88,
      "security": 79,
      "mobile": 23
    },
    "issues": [
      { "severity": "warning", "category": "meta", "message": "Meta title is too short (14 chars). Aim for 50–60 characters." },
      { "severity": "warning", "category": "meta", "message": "Meta description too short (48 chars). Aim for 120–160 characters." },
      { "severity": "warning", "category": "meta", "message": "No canonical tag found." },
      { "severity": "warning", "category": "meta", "message": "Open Graph meta tags are missing." },
      { "severity": "critical", "category": "mobile", "message": "Viewport meta tag is missing." },
      { "severity": "warning", "category": "technical", "message": "No sitemap.xml found." }
    ],
    "passed": [
      { "category": "technical", "message": "robots.txt is accessible and configured correctly." },
      { "category": "security", "message": "Site uses HTTPS." },
      { "category": "security", "message": "SSL certificate is valid (expires in 120 days)." },
      { "category": "performance", "message": "LCP is 285ms — Good (≤2.5s)." },
      { "category": "performance", "message": "CLS is 0.000 — Good (≤0.1)." }
    ]
  }
}
```

***

### SEO Score

Each page receives an overall score from **0–100** with a grade (A–F), plus a breakdown across six categories:

| Category | Weight | What it covers |
|---|---|---|
| Meta | 20% | Title, description, canonical, OG, noindex, language |
| Content | 15% | Headings, word count, image alt text, Lorem ipsum |
| Technical | 20% | Robots, sitemap, doctype, structured data, 404, deprecated tags |
| Performance | 20% | LCP, CLS, compression, caching, CDN, minification, render-blocking |
| Security | 15% | HTTPS, SSL, HSTS, mixed content, server signature, emails |
| Mobile | 10% | Viewport, media queries, Apple touch icon |

Every check also produces a `passed / failed` status, a `0–100` sub-score, and a human-readable message explaining how to fix any detected issue.

***

### Limits & Notes

- **JavaScript rendering** is fully supported via headless Chromium.
- **Core Web Vitals** (LCP, CLS, FCP) are measured live using the browser's PerformanceObserver API.
- **Safe Browsing check** requires a Google Safe Browsing API key (optional).
- **Spell check** currently returns placeholder counts; extend with a dictionary library for full coverage.
- **Backlinks** are not checked — this requires a third-party SEO data provider (Ahrefs, Moz, SEMrush).
- Maximum crawl depth and page count are configurable in the input.

# Actor input Schema

## `startUrls` (type: `array`):

One or more website URLs to analyse for SEO. Each URL is crawled and analysed independently.

## `maxDepth` (type: `integer`):

How many link-levels deep to crawl from each start URL. Use 1 to analyse start URLs only.

## `maxPagesPerCrawl` (type: `integer`):

Maximum number of pages to analyse across all start URLs.

## `waitForNetworkIdle` (type: `boolean`):

Wait for network activity to settle before analysis. Improves accuracy on JavaScript-heavy pages.

## `checkMobileView` (type: `boolean`):

Capture a mobile viewport screenshot for manual review.

## `safeBrowsingApiKey` (type: `string`):

Optional. Provide a Google Safe Browsing API key to enable malware/phishing checks.

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

Optional proxy settings. Useful for bypassing geo-restrictions or anti-bot measures.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://example.com"
    }
  ],
  "maxDepth": 1,
  "maxPagesPerCrawl": 10,
  "waitForNetworkIdle": true,
  "checkMobileView": false
}
```

# Actor output Schema

## `results` (type: `string`):

One item per analysed page containing 70+ SEO metrics, scores, and actionable recommendations.

# 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 = {
    "startUrls": [
        {
            "url": "https://example.com"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("eiv/seo-site-checker").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 = { "startUrls": [{ "url": "https://example.com" }] }

# Run the Actor and wait for it to finish
run = client.actor("eiv/seo-site-checker").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://example.com"
    }
  ]
}' |
apify call eiv/seo-site-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=eiv/seo-site-checker",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "SEO Site Checker (Pay per Event)",
        "description": "Crawl any website and extract 70+ on-site SEO metrics — meta tags, Core Web Vitals, structured data, mobile-friendliness, security headers, and page speed. Get a complete SEO audit with per-check scores and actionable recommendations.",
        "version": "0.0",
        "x-build-id": "827rNt5ty7660kxIN"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/eiv~seo-site-checker/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-eiv-seo-site-checker",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/eiv~seo-site-checker/runs": {
            "post": {
                "operationId": "runs-sync-eiv-seo-site-checker",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/eiv~seo-site-checker/run-sync": {
            "post": {
                "operationId": "run-sync-eiv-seo-site-checker",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "startUrls"
                ],
                "properties": {
                    "startUrls": {
                        "title": "Start URLs",
                        "type": "array",
                        "description": "One or more website URLs to analyse for SEO. Each URL is crawled and analysed independently.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "maxDepth": {
                        "title": "Crawl Depth",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "How many link-levels deep to crawl from each start URL. Use 1 to analyse start URLs only.",
                        "default": 1
                    },
                    "maxPagesPerCrawl": {
                        "title": "Max Pages per Crawl",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum number of pages to analyse across all start URLs.",
                        "default": 10
                    },
                    "waitForNetworkIdle": {
                        "title": "Wait for Network Idle",
                        "type": "boolean",
                        "description": "Wait for network activity to settle before analysis. Improves accuracy on JavaScript-heavy pages.",
                        "default": true
                    },
                    "checkMobileView": {
                        "title": "Capture Mobile Screenshot",
                        "type": "boolean",
                        "description": "Capture a mobile viewport screenshot for manual review.",
                        "default": false
                    },
                    "safeBrowsingApiKey": {
                        "title": "Google Safe Browsing API Key",
                        "type": "string",
                        "description": "Optional. Provide a Google Safe Browsing API key to enable malware/phishing checks."
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Optional proxy settings. Useful for bypassing geo-restrictions or anti-bot measures."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
