Fetch one page and report what it gets wrong
Fetches one page and reports what it gets wrong.
POST /v1/seo/audit
| 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 | seoAuditOut | ok |
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 | — | Score is the upstream's on-page score, 0 to 100. |
status | body | integer | — | 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 | — | Words is how many words of readable text the page carries. |
Failure carries the platform error shape — see Errors.
Examples
hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.
import { Configuration, SeoApi } from 'hanzoai';
const api = new SeoApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.seoAudit({ url: "<url>" });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>")cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.SeoAPI.SeoAudit(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::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?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.SeoApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new SeoApi(client).seoAudit();The method above is the one at the current release of the document. [email protected] (npm) and [email protected] (PyPI) were generated from an earlier release, where this operation carried a different id, so it spells the method differently — regenerating the clients is what makes the two agree. SDKs →
curl -X POST https://api.hanzo.ai/v1/seo/audit \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "<url>"
}'The door declares no tool for seo — tools/list on https://api.hanzo.ai/v1/mcp names the products it does reach. Use HTTP or an SDK.
How is this guide?