On-page SEO audit API
An on-page SEO audit of any public URL: status and timing, title and description lengths, headings, canonical and robots, links, images without alt, structured data, Open Graph and hreflang, with 15 checks and a score.
GET /v1/onpage/pageBeta1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/onpage/page?url=https%3A%2F%2Fwww.python.org%2F",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "url": "https://www.python.org/", "final_url": "https://www.python.org/", "status_code": 200, "content_type": "text/html; charset=utf-8", "fetch_time_ms": 3, "page_size_bytes": 52630, "title": "Welcome to Python.org", "title_length": 21, "meta_description": "The official home of the Python Programming Language", "meta_description_length": 52, "canonical": null, "is_canonical_self": null, "meta_robots": null, "is_indexable": true, "language": "en", "has_viewport": true, "charset": "utf-8", "headings": { "h1": [ "Functions Defined", "All the Flow You’d Expect", "… 3 more" ], "h2": [ "Get Started", "Download", "… 7 more" ], "h3": [], "h4_h6_count": 0 }, "word_count": 1070, "links": { "internal": 167, "external": 45, "nofollow": 0, "sample_external": [ "https://pypi.org/", "https://www.linkedin.com/company/python-software-foundation/", "… 8 more" ] }, "images": { "total": 1, "missing_alt": 0 }, "hreflang": [], "structured_data_types": [ "WebSite" ], "open_graph": { "og:type": "website", "og:site_name": "Python.org", "og:title": "Welcome to Python.org", "og:description": "The official home of the Python Programming Language", "og:image": "https://www.python.org/static/opengraph-icon-200x200.png", "og:image:secure_url": "https://www.python.org/static/opengraph-icon-200x200.png", "og:url": "https://www.python.org/" }, "…": "3 more fields"}Parameters
| Name | Type | Description |
|---|---|---|
urlquery · required | string | Example: https://www.python.org/. |
enable_javascriptquery | "true" | "false" | One of true, false. |
Response fields
200 with a OnPageAudit, in a plain audit of the page’s own HTML.
| Field | Type | Description |
|---|---|---|
url | string | |
final_url | string | |
status_code | integer | |
content_type | string | |
fetch_time_ms | integer | |
page_size_bytes | integer | |
title | string | null | |
title_length | integer | |
meta_description | string | null | |
meta_description_length | integer | |
canonical | string | null | |
is_canonical_self | boolean | null | |
meta_robots | string | null | |
is_indexable | boolean | |
language | string | null | |
has_viewport | boolean | |
charset | string | null | |
headings | object | |
word_count | integer | |
links | object | |
images | object | |
hreflang | object[] | |
structured_data_types | string[] | |
open_graph | object | |
twitter_card | object | |
checks | object[] | |
score | integer | Share of checks passed, 0-100. |
Status codes
| Status | Meaning |
|---|---|
200 | The audit. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | That URL does not resolve or is not an HTML page. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | On-page SEO is temporarily unavailable. Retryable; nothing was charged. |
Every error has code, message, hint and retryable. All error codes
Questions
Does it render JavaScript?
No: it audits the HTML the server sends, which is what most crawlers read first.
On-page SEO is a trademark of its owner. We are not affiliated with or endorsed by it.