On-page SEO audit
An on-page SEO audit of any URL: a 0-100 score and issues (error / warning / notice with a code and message: missing or long title and description, missing or multiple H1, canonical problems, noindex, robots.txt blocking, missing viewport or lang, images without alt, not HTTPS, redirect chains, thin content, missing Open Graph or structured data, robots.txt without sitemap, links without text). Also the title and description with lengths, keywords, canonical(s), robots meta and X-Robots-Tag with indexable / follow, language, charset, viewport, hreflang alternates, AMP URL, rel prev/next, heading counts and the headings outline, word count, image stats (missing alt, empty alt, missing dimensions), link stats (internal, external, nofollow, without text), structured-data types, Open Graph and Twitter tags, favicon, robots.txt (found, sitemaps, whether it allows this page), HTTP status, redirect chain, response time, HTML size, server, compression and cache headers.
Every response includes credits_used: the credits this call cost.
Parameters
| name | type | description |
|---|---|---|
urlrequired | string | Public http(s) URL of the page (a bare domain works too). Example: https://www.bbc.com/news |
robots | boolean | Also read the site's robots.txt (default true). Default: true |
country | string | Two-letter country to view the page from (default US). |
Every endpoint also takes fresh, raw, fields (see lean responses and caching).
Example
curl "https://api.api.sh/web/v1/seo?url=https%3A%2F%2Fwww.bbc.com%2Fnews" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/web/v1/seo",
params={"url": "https://www.bbc.com/news"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json() const url = new URL("https://api.api.sh/web/v1/seo");
url.searchParams.set("url", "https://www.bbc.com/news");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json(); Response
A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).