# SEO Audit Tool (`misceres/seo-audit-tool`) Actor

Search Engine Optimization tool to carry out an SEO audit on any website. Finds broken links, missing images, and provides information about possible page improvements.

- **URL**: https://apify.com/misceres/seo-audit-tool.md
- **Developed by:** [Misceres](https://apify.com/misceres) (community)
- **Categories:** SEO tools, Open source
- **Features:** Full permissions
- **Stats:** 3,610 total users, 4 monthly users, 71.8% runs succeeded, 64 bookmarks
- **User rating**: 3.81 out of 5 stars

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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

- [Features](#features)
- [Input](#input)
- [Results](#results)
- [Example result](#example-result)

### Features

This SEO audit tool can crawl all the web pages on your website and alert you to errors or issues that could affect SEO performance.

### Input

Web URL is the most important input that you should set, as this is address is where the tool will start crawling.

### Results

All results are stored in Apify datasets. Each result has the following attributes:

- url - URL of page
- title - title of page
- isLoaded - true if page was loaded properly
- isGoogleAnalyticsObject - check if Google Analytics object is included in the page
- isGoogleAnalyticsFunc - check if Google Analytics function is included in the page
- isCharacterEncode - check if page has meta tag with charset attribute
- isMetaDescription - check if page has meta description
- metaDescription - value from meta description
- isMetaDescriptionEnoughLong - check if length of meta description is long enough
- isDoctype - check if doctype is included in page
- isTitle - check if title element is included in page
- isTitleEnoughLong - check if title is long enough
- isH1 - check if H1 element is present on page
- h1 - value from H1 element
- isH1OnlyOne - check that there is only one H1 on page
- isH2 - check if H2 element is present on page
- linksCount - number of links on page
- isTooEnoughLinks - check if there are enough links on page
- internalNoFollowLinks - list of no-follow links on page
- internalNoFollowLinksCount - number of no-follow links on page
- notOptimizedImages - list of unoptimized images (does not include alt tag)
- notOptimizedImagesCount - number of unoptimized images
- wordsCount - number of words on page
- isContentEnoughLong - check if content is long enough
- isViewport - check if meta tag viewport is set on page
- isAmp - check if amp tag is set on page
- isNotIframe - check that there is no iframe
- brokenLinks - list of broken links on page
- brokenLinksCount - number of broken links on page
- brokenImages - list of broken images on page
- brokenImagesCount - number of broken image links on page
- jsonLd - data from JSON-LD specifications
- microdata - data from microdata specifications

### Example result

```javascript
{
  "url": "https://www.apify.com/",
  "title": "Web Scraping, Data Extraction and Automation - Apify",
  "isLoaded": true,
  "isGoogleAnalyticsObject": true,
  "isGoogleAnalyticsFunc": false,
  "isCharacterEncode": true,
  "isMetaDescription": true,
  "metaDescription": "Apify extracts data from websites, crawls lists of URLs and automates workflows on the web. Turn any website into an API in a few minutes!",
  "isMetaDescriptionEnoughLong": true,
  "isDoctype": true,
  "isTitle": true,
  "isTitleEnoughLong": true,
  "isH1": true,
  "h1": "The web scraping and automation platform",
  "isH1OnlyOne": true,
  "isH2": true,
  "linksCount": 91,
  "isTooEnoughlinks": true,
  "internalNoFollowLinks": [],
  "internalNoFollowLinksCount": 0,
  "notOptimizedImgs": [],
  "notOptimizedImagesCount": 0,
  "wordsCount": 1373,
  "isContentEnoughLong": false,
  "isViewport": true,
  "isAmp": true,
  "isNotIframe": false,
  "brokenLinks": [],
  "brokenLinksCount": 0,
  "brokenImages": [],
  "brokenImagesCount": 0,
  "jsonLd": {
    "isJsonLd": false,
    "jsonLdData": {}
  },
  "microdata": {
    "isMicrodata": false,
    "microdata": []
  }
}
```

# Actor input Schema

## `startUrl` (type: `string`):

URL of webpage, where we run SEO audit

## `proxy` (type: `object`):

Use proxies to access the given website

## `maxRequestsPerCrawl` (type: `integer`):

Maximum number of pages to visit. Defaults to unlimited pages

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

Max depth to crawl. Defaults to unlimited depth

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

Provide a manual User-Agent to test against mobile and desktop browsers

## `viewPortWidth` (type: `integer`):

Change the viewport width to trigger responsive breakpoints

## `viewPortHeight` (type: `integer`):

Change the viewport height to trigger responsive breakpoints

## `pageTimeout` (type: `integer`):

Change the page navigation timeout, in milliseconds

## `maxRequestRetries` (type: `integer`):

How many retries before considering a failure

## `handlePageTimeoutSecs` (type: `integer`):

Number in seconds for how long each page should wait for processing

## `seoParams` (type: `object`):

Override the internal SEO params

## Actor input object example

```json
{
  "startUrl": "https://apify.com",
  "proxy": {
    "useApifyProxy": true
  },
  "maxRequestsPerCrawl": 100,
  "maxDepth": 2,
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36",
  "viewPortWidth": 1440,
  "viewPortHeight": 900,
  "pageTimeout": 30000,
  "maxRequestRetries": 2,
  "handlePageTimeoutSecs": 2,
  "seoParams": {
    "maxTitleLength": 70,
    "minTitleLength": 10,
    "maxMetaDescriptionLength": 140,
    "maxLinksCount": 3000,
    "maxWordsCount": 350,
    "outputLinks": false,
    "workingStatusCodes": [
      200,
      301,
      302,
      304
    ]
  }
}
```

# 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 = {
    "startUrl": "https://apify.com",
    "proxy": {
        "useApifyProxy": true
    },
    "maxRequestsPerCrawl": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("misceres/seo-audit-tool").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 = {
    "startUrl": "https://apify.com",
    "proxy": { "useApifyProxy": True },
    "maxRequestsPerCrawl": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("misceres/seo-audit-tool").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 '{
  "startUrl": "https://apify.com",
  "proxy": {
    "useApifyProxy": true
  },
  "maxRequestsPerCrawl": 10
}' |
apify call misceres/seo-audit-tool --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,misceres/seo-audit-tool"
        }
    }
}
```

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/jjjNZa4tG4SzDEFcp/builds/tahoSchzvG2ighnvr/openapi.json
