# Domain SEO Checker (`leftwinglautus/domain-seo-checker`) Actor

Analyzes a domain's SEO health: meta tags, headers, robots.txt, sitemap, SSL, response time, and social media tags.

- **URL**: https://apify.com/leftwinglautus/domain-seo-checker.md
- **Developed by:** [Moeeze Hassan](https://apify.com/leftwinglautus) (community)
- **Categories:** SEO tools, Developer tools
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.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 web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Domain SEO Checker

Analyze a domain's SEO health with a single run. The actor fetches the domain's homepage and checks meta tags, header counts, robots.txt, sitemap.xml, SSL status, response time, Open Graph / Twitter Card tags, broken links, favicon, canonical URL, and language.

### Features

- **Meta tags** — title, description, and keywords
- **Header analysis** — H1 and H2 counts
- **robots.txt** — existence check
- **sitemap.xml** — existence check
- **SSL** — HTTPS availability
- **Performance** — homepage response time in milliseconds
- **Social tags** — Open Graph and Twitter Card meta tags
- **Broken links** — probes up to 20 same-origin internal links for 4xx/5xx responses
- **Favicon & canonical** — favicon URL and canonical link
- **Language** — `lang` attribute from the `<html>` tag

### Input Fields

| Field | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `domain` | string | ✅ | — | The domain to analyze (e.g. `example.com`). Protocol prefix is optional. |
| `checkRobots` | boolean | ❌ | `true` | Whether to fetch and check the robots.txt file. |
| `checkSitemap` | boolean | ❌ | `true` | Whether to check for a sitemap.xml file. |
| `checkSocial` | boolean | ❌ | `true` | Whether to extract Open Graph and Twitter Card meta tags. |
| `checkPerformance` | boolean | ❌ | `true` | Whether to measure response time. |

### Output Fields

The actor pushes a single result record with the following fields:

| Field | Type | Description |
| --- | --- | --- |
| `domain` | string | The analyzed domain. |
| `title` | string | null | Page `<title>` tag content. |
| `description` | string | null | Meta description content. |
| `keywords` | string | null | Meta keywords content. |
| `h1Count` | integer | Number of `<h1>` elements. |
| `h2Count` | integer | Number of `<h2>` elements. |
| `hasRobotsTxt` | boolean | null | Whether `/robots.txt` returns HTTP 200. |
| `hasSitemapXml` | boolean | null | Whether `/sitemap.xml` returns HTTP 200. |
| `sslEnabled` | boolean | null | Whether the site is accessible over HTTPS. |
| `responseTimeMs` | number | null | Homepage response time in milliseconds. |
| `ogTags` | object | Open Graph meta tags (key-value pairs, e.g. `og:title`). |
| `twitterCards` | object | Twitter Card meta tags (key-value pairs, e.g. `twitter:card`). |
| `brokenLinks` | array\<object> | List of broken internal links with `url`, `status`, and optional `error`. |
| `faviconUrl` | string | null | URL to the favicon. |
| `canonicalUrl` | string | null | Canonical link URL. |
| `language` | string | null | Page language from the `<html lang>` attribute. |

### Usage Example

#### Full SEO analysis of example.com

```json
{
    "domain": "example.com"
}
```

#### Quick check (skip robots, sitemap, and performance)

```json
{
    "domain": "example.com",
    "checkRobots": false,
    "checkSitemap": false,
    "checkPerformance": false
}
```

#### Check only social tags and meta information

```json
{
    "domain": "example.com",
    "checkRobots": false,
    "checkSitemap": false,
    "checkSocial": true,
    "checkPerformance": false
}
```

#### Analyze a domain with a protocol prefix (automatically stripped)

```json
{
    "domain": "https://www.example.com/"
}
```

#### Run via the Apify CLI

```bash
apify run domain-seo-checker --input '{"domain":"example.com"}'
```

### Notes

- The actor fetches the homepage over HTTPS first, falling back to HTTP if the HTTPS connection fails.
- Broken-link checking is capped at 20 same-origin internal links to keep runtime reasonable. Links are probed concurrently.
- A single result record is pushed to the dataset per run.

### Data Source

The domain's homepage is fetched with `httpx` and parsed with BeautifulSoup. Additional requests are made for `robots.txt`, `sitemap.xml`, and internal link probes.

# Actor input Schema

## `domain` (type: `string`):

The domain to analyze (e.g. 'example.com'). Protocol prefix is optional.

## `checkRobots` (type: `boolean`):

Whether to fetch and check the robots.txt file.

## `checkSitemap` (type: `boolean`):

Whether to check for a sitemap.xml file.

## `checkSocial` (type: `boolean`):

Whether to extract Open Graph and Twitter Card meta tags.

## `checkPerformance` (type: `boolean`):

Whether to measure response time.

## Actor input object example

```json
{
  "checkRobots": true,
  "checkSitemap": true,
  "checkSocial": true,
  "checkPerformance": true
}
```

# 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("leftwinglautus/domain-seo-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 = {}

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

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/YtMYBYj6TCgnqVpKl/builds/q53FLu32cvERW33AC/openapi.json
