# 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
- **Stats:** 3,457 total users, 23 monthly users, 79.0% runs succeeded, 61 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/platform/actors/running/actors-in-store#pay-per-usage

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

- [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("💾 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 '{
  "startUrl": "https://apify.com",
  "proxy": {
    "useApifyProxy": true
  },
  "maxRequestsPerCrawl": 10
}' |
apify call misceres/seo-audit-tool --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "SEO Audit Tool",
        "description": "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.",
        "version": "0.1",
        "x-build-id": "tahoSchzvG2ighnvr"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/misceres~seo-audit-tool/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-misceres-seo-audit-tool",
                "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/misceres~seo-audit-tool/runs": {
            "post": {
                "operationId": "runs-sync-misceres-seo-audit-tool",
                "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/misceres~seo-audit-tool/run-sync": {
            "post": {
                "operationId": "run-sync-misceres-seo-audit-tool",
                "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": [
                    "startUrl",
                    "proxy"
                ],
                "properties": {
                    "startUrl": {
                        "title": "Web URL, where we start SEO audit.",
                        "type": "string",
                        "description": "URL of webpage, where we run SEO audit"
                    },
                    "proxy": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Use proxies to access the given website"
                    },
                    "maxRequestsPerCrawl": {
                        "title": "Max pages",
                        "type": "integer",
                        "description": "Maximum number of pages to visit. Defaults to unlimited pages"
                    },
                    "maxDepth": {
                        "title": "Max depth",
                        "type": "integer",
                        "description": "Max depth to crawl. Defaults to unlimited depth"
                    },
                    "userAgent": {
                        "title": "User Agent",
                        "type": "string",
                        "description": "Provide a manual User-Agent to test against mobile and desktop browsers",
                        "default": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36"
                    },
                    "viewPortWidth": {
                        "title": "Viewport width",
                        "type": "integer",
                        "description": "Change the viewport width to trigger responsive breakpoints"
                    },
                    "viewPortHeight": {
                        "title": "Viewport height",
                        "type": "integer",
                        "description": "Change the viewport height to trigger responsive breakpoints"
                    },
                    "pageTimeout": {
                        "title": "Page Navigation timeout",
                        "type": "integer",
                        "description": "Change the page navigation timeout, in milliseconds"
                    },
                    "maxRequestRetries": {
                        "title": "Max Request Retries",
                        "type": "integer",
                        "description": "How many retries before considering a failure"
                    },
                    "handlePageTimeoutSecs": {
                        "title": "Requests timeout",
                        "type": "integer",
                        "description": "Number in seconds for how long each page should wait for processing",
                        "default": 3600
                    },
                    "seoParams": {
                        "title": "SEO params",
                        "type": "object",
                        "description": "Override the internal SEO params"
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
