application/ld+json JSON-LD Common
Identifies JSON-LD, a JSON-based format for linked/structured data, heavily used for SEO schema markup.
What it's for
application/ld+json identifies JSON-LD (JSON for Linking Data) — a specific JSON-based format for expressing linked, semantic data, most commonly encountered on the modern web as the standard way to embed structured data (schema.org markup) inside HTML pages for search engines to parse. When a Google search result shows a recipe with a star rating, cook time, and photo directly in the results, or an event listing with a date and location, that enhanced result is typically powered by JSON-LD structured data embedded in the page.
Unlike the older approach of embedding structured data as microdata attributes scattered throughout visible HTML, JSON-LD keeps structured data cleanly separated in its own script block, making it easier to generate, validate, and maintain independently of the page's visual markup.
Format & syntax
Embedded in HTML via a script tag (note: within HTML, the type is specified on the <script> tag itself, not as an HTTP Content-Type header, for this particular use case):
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Example Product",
"offers": {
"@type": "Offer",
"price": "29.99",
"priceCurrency": "USD"
}
}
</script>
The @context field establishes the vocabulary being used (schema.org being the overwhelmingly dominant choice for SEO purposes), and @type identifies what kind of entity the data describes (Product, Article, Event, Recipe, Organization, and many others defined by schema.org's vocabulary).
How it's used in practice
- SEO rich results/structured data — the dominant real-world use case: embedding schema.org-vocabulary JSON-LD for products, articles, recipes, events, reviews, FAQs, and organization information so search engines can generate enhanced search result displays.
- Knowledge graph and entity data — beyond simple rich results, structured data also helps search engines understand relationships between entities (an article's author, an organization's logo, a product's manufacturer), contributing to broader semantic understanding of content.
- API responses for linked-data-aware systems — outside the SEO context, JSON-LD is also used as an actual API response format in systems designed around linked/semantic data principles, though this is a much smaller use case in mainstream web development compared to the SEO application.
- Social sharing metadata — while Open Graph tags (a separate, non-JSON-LD mechanism) handle most social media preview generation, some platforms also read structured data for richer content understanding.
Common mistakes & gotchas
- Invalid or incomplete structured data failing silently — search engines are often lenient about ignoring malformed or incomplete JSON-LD rather than erroring visibly, meaning structured data mistakes can go unnoticed for a long time without actively testing/validating it against a structured data testing tool.
- Structured data not matching visible page content — search engines can penalize structured data that describes content not actually present or visible on the page (a documented violation of guidelines), so JSON-LD data needs to genuinely reflect what a visitor sees, not aspirational or misleading information.
- Using the wrong schema.org type or missing required properties — different schema.org types have different expected/required properties for rich results to actually trigger (a Recipe type needs specific fields like
recipeIngredientandcookTimeto qualify for recipe rich results, for example) — omitting these means the structured data is technically present but doesn't unlock the enhanced search appearance it's meant to enable. - Forgetting this isn't an HTTP Content-Type concern for its main use case — when embedding JSON-LD in HTML for SEO purposes, the
type="application/ld+json"attribute goes on the<script>tag itself, not the page's HTTP Content-Type header — a common point of confusion for developers newer to structured data markup.
Comparison & FAQ
| Type | Purpose | Key difference from application/ld+json |
|---|---|---|
| application/json | Generic JSON data | JSON-LD is a specific JSON dialect with semantic linking conventions (@context, @type) layered on top |
Do I need to set an HTTP header for JSON-LD structured data on my site?
No, for the common SEO use case — the application/ld+json type is set on the <script> tag itself within your HTML, not as an HTTP response header for the page.
Why isn't my structured data producing rich results in search?
Check that you're using the correct schema.org type and including all the required properties for that type's rich result eligibility, and verify the structured data actually matches your page's visible content — search engines can silently ignore or penalize mismatched/incomplete data.
What's the difference between JSON-LD and Open Graph tags?
Open Graph tags (a separate <meta>-tag-based mechanism) primarily control social media link preview appearance; JSON-LD structured data is primarily consumed by search engines for rich results and semantic understanding — many sites use both for different purposes.
How do I check if my JSON-LD is valid?
Use a structured data testing/validation tool to check your markup against the expected schema.org vocabulary and required properties for your chosen type before assuming it's working correctly.