GoogleChrome / GoogleChrome/lighthouse

[SEO Audits] Structured data is valid

Open
#4,359 36 comments 0 reactions 1 assignee Claimed by @mattzeunert View on GitHub
P2 seo
Dominant language
JavaScript
Stars
30.8k
Forks
9.8k
Avg merge
1d 20h
Merged PRs (30d)
19

Description

**Audit group:** [Content Best Practices](#3117)
**Description**: JSON-LD structured data syntax is valid
**Failure description**: JSON-LD structured data syntax is invalid
**Help text:** Structured data contains rich metadata about a web page. The data may be used to provide more context to users in search results or social sharing. This audit is only checking for JSON-LD structured data syntax errors. For a checkup of Google search eligibility, try the [Structured Data Testing Tool](https://search.google.com/structured-data/testing-tool/u/0/).

**Success conditions:**
- the JSON can be parsed
- the keys are not duplicated
- `@` keywords are whitelisted in the JSON-LD spec
- `@context` URLs are valid
- validation using [jsonld.js](https://github.com/digitalbazaar/jsonld.js/blob/master/lib/expand.js)
- `@types` are whitelisted on schema.org
- object properties are whitelisted on schema.org

**Notes:**
- defers Google search eligibility and other more advanced validation logic to the Structured Data Testing Tool (SDTT)
- implementation logic is built into Lighthouse and not open sourced separately

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.