# Website SEO Audit API (`faisal_ahmed1931/website-seo-audit`) Actor

Bulk on-page and technical SEO audit for URL lists or whole sites: titles, meta, headings, canonical, robots, hreflang, schema, alt text, broken links, redirects, sitemap and a 0-100 score. Failed pages are free.

- **URL**: https://apify.com/faisal_ahmed1931/website-seo-audit.md
- **Developed by:** [saima mohammed](https://apify.com/faisal_ahmed1931) (community)
- **Categories:** Developer tools, SEO tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.00 / 1,000 page auditeds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## Website SEO Audit API: bulk on-page and technical SEO checker

Audit any list of URLs or a whole website and get a **0–100 SEO score with a prioritized issues list** for every page. It checks titles, meta descriptions, headings, canonical tags, robots directives, hreflang, Open Graph and Twitter cards, structured data (JSON-LD), image alt text, word count, internal and external links, broken links, redirect chains, robots.txt and XML sitemaps.

It's built for SEO agencies, freelancers, marketers and developers who need a fast, cheap, scriptable site audit. **You pay $6 per 1,000 audited pages, and failed pages are free.**

### What does Website SEO Audit API do?

- **On-page SEO:** title and meta description presence and length, plus **duplicates across the run**. Also H1–H6 structure (missing, multiple or empty H1, skipped levels), word count, `lang` and viewport.
- **Indexability:** status code, full **redirect chain** with each hop's status, canonical (missing, multiple, relative, or pointing elsewhere), robots meta and the `X-Robots-Tag` header (noindex and nofollow).
- **International:** hreflang alternates, invalid language codes, missing self-reference and missing x-default.
- **Social and rich results:** Open Graph and Twitter/X card tags, JSON-LD `@type`s, **JSON-LD parse errors**, and microdata or RDFa presence.
- **Images and links:** images missing alt, internal, external and nofollow link counts, and an optional **broken link check** (404, 410, 5xx and dead domains, capped per page and cached across the run).
- **Site checks**, run once per domain: robots.txt presence and its declared sitemaps, and XML sitemap presence, type and URL count.
- **Score and priorities:** each issue has a severity (high, medium or low) and a plain-English message, and pages get a 0–100 score.

Pages are fetched over plain HTTP without a browser, so runs are fast and platform costs stay very low. In our tests, a 300-page crawl took about 30 seconds at the default 1 GB memory.

### How to audit a website

1. Paste one or more URLs into **URLs to audit**.
2. Choose a **Mode**:
   - **Audit listed URLs only** checks exactly the URLs you give it, which is good for landing pages, client URL lists or a sitemap export.
   - **Crawl the same site** starts from your URLs, follows internal links and stops at **Max pages**.
3. Optional: turn on **Check for broken links**.
4. Click **Start**. Results appear in the **Overview** table, and you can export them as JSON, CSV, Excel or HTML, or fetch them through the API.

### Input example

```json
{
  "startUrls": [{ "url": "https://example.com" }],
  "crawlMode": "crawl",
  "maxPages": 100,
  "checkBrokenLinks": true,
  "maxLinksToCheckPerPage": 100,
  "respectRobotsTxt": true,
  "maxConcurrency": 10
}
```

| Field | What it does |
|---|---|
| `startUrls` | Pages to audit (list mode) or crawl start pages (crawl mode). |
| `crawlMode` | `list` (default) or `crawl` (follows same-site links). |
| `maxPages` | Crawl limit (default 50, max 10,000). |
| `checkBrokenLinks` | Checks each link's status (default off). |
| `maxLinksToCheckPerPage` | Cap on links checked per page (default 100). |
| `respectRobotsTxt` | On by default. Disallowed URLs are reported as failed and are free. |
| `maxConcurrency` | Pages audited in parallel (default 10). |
| `proxyConfiguration` | Optional proxy for sites that block datacenter IPs. |

### Output example

Each page gives one dataset row (shortened):

```json
{
  "url": "https://example.com/pricing",
  "finalUrl": "https://example.com/pricing",
  "status": "SUCCEEDED",
  "statusCode": 200,
  "score": 78,
  "topIssues": "H1_MISSING, TITLE_DUPLICATE, IMAGES_MISSING_ALT",
  "issues": [
    { "code": "H1_MISSING", "severity": "high", "category": "headings", "message": "The page has no <h1> heading." },
    { "code": "TITLE_DUPLICATE", "severity": "medium", "category": "title", "message": "Same title as 2 other audited page(s)." }
  ],
  "title": "Pricing – Example",
  "titleLength": 17,
  "metaDescriptionLength": 142,
  "h1Count": 0,
  "canonical": { "url": "https://example.com/pricing", "count": 1, "isSelf": true },
  "robots": { "meta": "index, follow", "xRobotsTag": null, "noindex": false, "nofollow": false },
  "structuredData": { "jsonLdCount": 1, "types": ["Organization"], "parseErrors": 0 },
  "images": { "total": 12, "missingAlt": 3 },
  "wordCount": 842,
  "links": { "total": 96, "internal": 54, "external": 11, "nofollow": 3 },
  "brokenLinkCount": 1,
  "redirectChain": [],
  "site": { "robotsTxt": { "found": true }, "sitemap": { "found": true, "urlCount": 120 } }
}
```

Failed pages (for example a 404, a robots.txt block, a non-HTML file or a DNS error) are listed with `status: "FAILED"`, an `errorCode` and an `errorMessage`, and **are not charged**. A run summary (pages audited, average score, duplicate groups) is saved to the `SUMMARY` record in the key-value store.

### How much does it cost to audit a website?

Pricing is pay per event:

- **$6.00 per 1,000 audited pages** ($0.006 per page). You're charged only when a page was fetched and audited successfully.
- **Failed pages are free.**
- Apify platform usage is billed separately (you pay compute). Because the Actor doesn't use a browser, usage is low: about $0.06 per 1,000 pages in our tests (around $0.15 per 1,000 with broken-link checks on).

For example, auditing a 500-page site costs about **$3** plus a few cents of platform usage. Use **Maximum cost per run** in the run options to cap spend.

### How is the score calculated?

The score starts at 100. Each high-severity issue subtracts 15, each medium one subtracts 6 and each low one subtracts 2, with a floor of 0. High-severity issues include a missing title or H1, noindex, HTTP instead of HTTPS and broken links. Medium issues include a short title, missing meta description, duplicate titles, a redirect chain, multiple canonicals, a missing viewport and JSON-LD errors. Low issues are the remaining recommendations. The score is a prioritization aid, not a Google ranking factor.

### Tips

- **Big sites:** start with `maxPages` of 100–500 to find site-wide template issues, then audit specific sections in list mode.
- **Broken links** make runs slower because every link is requested. Results are cached, so a link that appears on every page is checked once.
- **JavaScript-only sites:** the audit reads server-rendered HTML, which is what most search engine crawlers index first. Pages that render their content only in the browser will show low word counts and missing tags, which is itself a useful SEO finding.

### Is it legal to audit websites?

The Actor reads public pages only, the same way a search engine does, and **respects robots.txt by default**. Audit your own sites, your clients' sites, or public pages you have a legitimate reason to check, and follow each site's terms. Turn off robots.txt only for sites you own or have permission to audit.

### Integrations and API

Run it from the [Apify API](https://docs.apify.com/api/v2), the JavaScript or Python clients, Zapier, Make, n8n, Google Sheets, Slack or any MCP client. Here's a quick API example:

```bash
curl -X POST "https://api.apify.com/v2/acts/faisal_ahmed1931~website-seo-audit/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"startUrls":[{"url":"https://example.com"}]}'
```

You can schedule weekly audits and compare scores over time, or chain it with [Website Screenshot & URL to PDF API](https://apify.com/faisal_ahmed1931/website-screenshot-pdf) to capture the pages you audit.

### FAQ and support

- **Why did a page fail?** Check `errorCode`. `HTTP_404`, `ROBOTS_DISALLOWED`, `NOT_HTML`, `DNS_ERROR` and `TIMEOUT` are the common ones. Failed pages are never charged.
- **Some links show as "restricted":** sites like LinkedIn answer bots with 403 or 999. Those links aren't counted as broken.
- **Something's wrong or you'd like a new check?** Open an issue in the **Issues** tab. We usually reply within a day.

# Actor input Schema

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

Pages to audit (list mode) or start pages for the crawl (crawl mode). URLs without http(s):// get https:// added.

## `crawlMode` (type: `string`):

List: audit exactly the URLs above. Crawl: start from the URLs above and follow internal links on the same site until Max pages is reached.

## `maxPages` (type: `integer`):

Maximum number of pages to fetch in crawl mode (successful and failed). Ignored in list mode.

## `checkBrokenLinks` (type: `boolean`):

Send a lightweight HEAD request (GET fallback) to each link on the page to find 404/410/5xx and dead domains. Results are cached across the run. Makes runs slower.

## `maxLinksToCheckPerPage` (type: `integer`):

Cap on links checked per page when broken-link checking is on.

## `respectRobotsTxt` (type: `boolean`):

Skip URLs that the site's robots.txt disallows (they are reported as failed and not charged). Turn off only for sites you own or are allowed to audit.

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

Maximum number of pages audited in parallel. Lower it to be gentle on small sites.

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

Optional. Use a proxy if the site blocks datacenter traffic. Not needed for most sites.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://apify.com"
    },
    {
      "url": "https://crawlee.dev"
    }
  ],
  "crawlMode": "list",
  "maxPages": 20,
  "checkBrokenLinks": false,
  "maxLinksToCheckPerPage": 100,
  "respectRobotsTxt": true,
  "maxConcurrency": 10,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Default dataset: one row per page with score, prioritized issues and all SEO fields.

## `issues` (type: `string`):

Prioritized issues list for each audited page.

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

JSON summary: pages audited, failed, average score, duplicate title/description groups.

# 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://apify.com"
        },
        {
            "url": "https://crawlee.dev"
        }
    ],
    "maxPages": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("faisal_ahmed1931/website-seo-audit").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://apify.com" },
        { "url": "https://crawlee.dev" },
    ],
    "maxPages": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("faisal_ahmed1931/website-seo-audit").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 '{
  "startUrls": [
    {
      "url": "https://apify.com"
    },
    {
      "url": "https://crawlee.dev"
    }
  ],
  "maxPages": 20
}' |
apify call faisal_ahmed1931/website-seo-audit --silent --output-dataset

```

## MCP server setup

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

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/aCzelpe4hHIWmRXYk/builds/JnDVRY92yd1hwQUXZ/openapi.json
