# Website SEO & Tech Audit - 30+ CMS/Framework Detections (`xegheplimo/seo-tech-audit`) Actor

Audit any public URL for on-page SEO and tech-stack signals: meta/canonical/h1-h2, images and alt text, links, robots.txt and sitemap, plus 30+ CMS/framework/tool detections. One machine-readable record per URL, measured from real fetches.

- **URL**: https://apify.com/xegheplimo/seo-tech-audit.md
- **Developed by:** [TRAN XUAN DUY](https://apify.com/xegheplimo) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

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

## Website SEO & Tech Audit

Audit any public web page for on-page SEO and tech-stack signals, and get one clean, machine-readable record per URL — measured, never estimated.

### What it measures

For every audited URL the actor fetches the page once (following redirects) and records:

- **Fetch facts** — `finalUrl`, `statusCode`, `redirectChain`, `fetchedAt`, `timingMs`, `bytes`.
- **On-page SEO** — `title`/`titleLength`, `metaDescription`/`metaDescriptionLength`, `canonical`, `robots` meta, `lang`, `h1` texts + `h1Count`, `h2Count`, `imgCount`, `imgMissingAlt`, `wordCount`, `internalLinks`/`externalLinks` (distinct, fragment-stripped).
- **Site files** — `hasRobotsTxt`, `hasSitemap` (declared in robots.txt or found at `/sitemap.xml`, `/sitemap_index.xml`).
- **Tech stack** — `tech`: CMS/framework/server detections matched against `TECH_SIGNATURES` in `audit.py` (WordPress, WooCommerce, Shopify, Next.js, Nuxt, React, Vue, Angular, Squarespace, Wix, Webflow, Ghost, Drupal, Joomla, Magento, Cloudflare, Nginx, Apache, Google Analytics, Google Tag Manager, Meta Pixel, jQuery). Detected from static HTML plus response headers — every hit is a marker you can read in one table.
- **`issues`** — findings derived strictly from the measured fields: `http_status_*`, `title_too_long`/`title_too_short`, `no title`, `no meta description`, `meta_description_too_long`, `no h1`, `N h1 elements`, `N images missing alt`, `no lang attribute`, `noindex`, `not https`, `non_html_content`, `unparseable_html`, `N broken links`, `N urls disallowed by robots.txt`. Empty array when the page is clean.

Crawling (`maxPagesPerSite > 1`) follows same-host links breadth-first up to the cap and respects `robots.txt` (disallowed paths are skipped and noted in `issues`). `checkBrokenLinks` HEAD/GETs each distinct internal link (max 200 per site) and reports error statuses.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `urls` | array of strings | — | Absolute http(s) URLs. Anything else fails loudly, naming the offending value. |
| `maxPagesPerSite` | integer | `1` | `1` audits only the given URL; `>1` follows same-host links up to the cap. |
| `checkBrokenLinks` | boolean | `false` | HEAD/GET each distinct internal link (cap 200/site) and report failures. |
| `timeoutSecs` | integer | `20` | Per-request timeout. |
| `userAgent` | string | `"apify-seo-audit/1.0"` | Sent verbatim on every request. |

### Output

One dataset item per audited URL:

```json
{
  "url": "https://example.com/",
  "finalUrl": "https://example.com/",
  "statusCode": 200,
  "redirectChain": ["https://example.com/"],
  "fetchedAt": "2026-11-20T16:41:56Z",
  "timingMs": 34.1,
  "bytes": 577,
  "jsRendered": false,
  "hasSitemap": false,
  "hasRobotsTxt": false,
  "isHttps": true,
  "brokenLinks": [],
  "title": "Example Domain",
  "titleLength": 14,
  "metaDescription": null,
  "metaDescriptionLength": null,
  "canonical": null,
  "robots": null,
  "lang": "en",
  "h1": [],
  "h1Count": 0,
  "h2Count": 0,
  "imgCount": 0,
  "imgMissingAlt": 0,
  "wordCount": 25,
  "internalLinks": 0,
  "externalLinks": 0,
  "tech": ["Cloudflare"],
  "issues": ["title_too_short", "no meta description", "no h1"]
}
```

Fields that cannot be determined are `null` — never `0`, never a guess. A page that fails at transport level (DNS, timeout, TLS) produces **no** dataset item; the failure is recorded in the run's `SUMMARY` key-value record instead, and is not charged.

### Pricing

Pay-per-event: **$5 per 1,000 audited URLs** (`url-audited` event at $0.005). Exactly one event is charged per dataset item pushed, after the item is written. Failed fetches that produce no item are not charged.

### What it deliberately does NOT do

- **No JavaScript rendering.** No Playwright, no browser, no Selenium — `httpx` + `lxml` only. Pages that need JS to render are audited on their static HTML and marked `"jsRendered": false`; content injected client-side is invisible to this actor.
- **No login, no cookies, no protection bypass.** If a site answers 403/429 or a bot challenge, that status is recorded and the actor moves on. It does not retry with evasion, rotate user agents, or solve anything.
- **No PII collection.** It reads public HTML only — no form filling, no authenticated areas, no personal data extraction.
- **Polite by construction.** At most 2 concurrent requests per host and ≥250 ms between requests to the same host; `robots.txt` is respected when crawling.

### Local run

`python main.py` reads `input.json` and writes `out/dataset.json`, `out/SUMMARY.json`. For a live smoke test of 5 public URLs: `python scripts/smoke.py`.

### Tests

`python -m pytest tests/ -q` — the HTTP layer is mocked (`FakeFetcher`); no network access required.

# Actor input Schema

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

Public pages to audit, one record per URL.

## `maxPagesPerSite` (type: `integer`):

How many pages to audit per site (1-20).

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

Sample and report links that return 4xx/5xx.

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

Per-request timeout.

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

UA sent with each request.

## Actor input object example

```json
{
  "maxPagesPerSite": 1,
  "checkBrokenLinks": false,
  "timeoutSecs": 20,
  "userAgent": "apify-seo-audit/1.0"
}
```

# Actor output Schema

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

All audit items produced in this run.

## `resultsCsv` (type: `string`):

Same items in CSV format, ready for Google Sheets.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("xegheplimo/seo-tech-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("xegheplimo/seo-tech-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 '{}' |
apify call xegheplimo/seo-tech-audit --silent --output-dataset

```

## MCP server setup

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