Schema (Structured Data)
Detect, validate, and generate Schema.org JSON-LD markup.
Procedure
Detect and validate the structured data already on the page:
from seo_kit.crawler.page_fetcher import fetch_page, parse_html from seo_kit.schema.validator import extract_json_ld, validate_schema _, html, _, _ = fetch_page("<url>") page = parse_html(html, "<url>") blocks = extract_json_ld(html) # raw JSON-LD blocks result = validate_schema(page, html) # coverage + completeness print(result.to_dict())Report coverage: which schema types are present (Article, Product, FAQPage, Organization...) and which required fields are missing.
Generate missing schema. When a type is missing or incomplete, write valid JSON-LD and give the user ready-to-paste
<script>tags. Reference the recommended fields from the audit output.Apply by suggesting the user add the
<script type="application/ld+json">block to the page<head>(or by editing the file if the user provides it).
Common types and required fields
| Type | Required |
|---|---|
| Organization | name |
| WebSite | name, url |
| Article | headline, author, datePublished |
| Product | name, offers |
| FAQPage | mainEntity |
| LocalBusiness | name, address |
| BreadcrumbList | itemListElement |
Notes
- Only JSON-LD is detected. Other formats (microdata, RDFa) are not scanned.
- Inspired by AgriciDaniel/claude-seo and seranking/seo-skills (both MIT).