# Create audit

URL: https://docs.hanzo.ai/docs/openapi/seo/seoaudit

> Fetches one page and reports what it gets wrong.

`POST /v1/seo/audit`

> [SEO →](https://docs.hanzo.ai/docs/openapi/seo) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                        |
| ------------- | -------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/seo/audit`    |
| **Method**    | `POST`                                 |
| **Operation** | `seoAudit`                             |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY` |

Fetches one page and reports what it gets wrong.

It returns the page's on-page score, its title and description, how much readable
text it carries, and the full set of named checks — is it https, does it have one
h1, is the title duplicated, is it slow, is it a redirect, is anything on it
broken. It is the technical half of search visibility, and it is the half a
developer can act on this afternoon.

ONE PAGE, LIVE, IN THIS REQUEST. It is deliberately not a site crawl: a crawl is
a job with a lifecycle, and this answers the same questions about the page
somebody is actually looking at, now, with no task id to poll. Point it at the
pages that matter one at a time.

It is priced per page fetched, which is one.

## Request

1 field, body `application/json` (required).

| Field | In   | Type   | Required | Description                                  |
| ----- | ---- | ------ | -------- | -------------------------------------------- |
| `url` | body | string | —        | URL is the page, absolute and http or https. |

## Response

| Status    | Body            | Meaning |
| --------- | --------------- | ------- |
| `200`     | seo.seoAuditOut | ok      |
| `default` | problem-details | refused |

`200` body — 9 fields.

| Field         | In   | Type            | Always | Description                                                                                                                |
| ------------- | ---- | --------------- | ------ | -------------------------------------------------------------------------------------------------------------------------- |
| `checks`      | body | object          | —      | Checks is every named finding, each a yes or no — "is\_https", "no\_h1\_tag", "high\_loading\_time", around fifty of them. |
| `checks.*`    | body | boolean         | —      |                                                                                                                            |
| `cost`        | body | string          | —      | Cost is what this call cost, in USD, as an exact decimal string.                                                           |
| `description` | body | string          | —      | Description is its meta description.                                                                                       |
| `score`       | body | number (double) | —      | Score is the upstream's on-page score, 0 to 100.                                                                           |
| `status`      | body | integer (int64) | —      | Status is the HTTP status the page answered with.                                                                          |
| `title`       | body | string          | —      | Title is the page's title.                                                                                                 |
| `url`         | body | string          | —      | URL is the address actually read, after redirects.                                                                         |
| `words`       | body | integer (int64) | —      | Words is how many words of readable text the page carries.                                                                 |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo seo audit
```

**SDK**

**.ts**

```ts
import { Configuration, SeoApi } from 'hanzoai';

const api = new SeoApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.seoAudit({ url: "<url>" });
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import SeoApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = SeoApi(client).seo_audit(url="<url>")
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.SeoAPI.SeoAudit(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, seo_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = seo_api::seo_audit(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.SeoApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new SeoApi(client).seoAudit();
```

**HTTP**

```bash
curl -X POST https://api.hanzo.ai/v1/seo/audit \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "url": "<url>"
     }'
```

**MCP**

Tool `seo`, op `seoAudit` — POST the JSON-RPC envelope to `https://api.hanzo.ai/v1/mcp`.

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "seo",
         "arguments": {
           "op": "seoAudit",
           "input": {
             "url": "<url>"
           }
         }
       }
     }'
```

---

[SEO API](https://docs.hanzo.ai/docs/openapi/seo) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
