Linking Entities with Schema.org: @id, sameAs, about, and mentions
Executive Summary: In Schema.org, @id assigns a unique URI to each entity; within @graph, you connect entities like Organization, WebSite, WebPage, Article, and Person using these IDs. sameAs links to external profiles (LinkedIn, Wikipedia), while about and mentions signal content topics and referenced entities. This structure helps search engines understand entity relationships, though it doesn't guarantee citation in AI-generated answers.
Defining and Linking Entities with @id
In Schema.org, @id assigns a unique identifier (URI) to an entity. This allows other entities within the same @graph to reference it and establish relationships. For example, an Article connects to a Person entity by writing "author": {"@id": "https://example.com/#person-john"}.
Core principles:
@idmust be an absolute URL; avoid relative paths.- Use the same
@idfor the same entity across all pages (e.g.,https://example.com/#organizationfor your Organization on every page). - For page-specific entities (WebPage, Article), append a fragment to the URL:
https://example.com/article#article. - Within the
@grapharray, define each entity once; elsewhere, reference it with{"@id": "..."}only.
Complete JSON-LD @graph Example
The following example connects Organization, WebSite, WebPage, Article, and Person entities in a blog post:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@graph": [
{
"@type": "Organization",
"@id": "https://example.com/#organization",
"name": "Example Technology Inc.",
"url": "https://example.com",
"logo": {
"@type": "ImageObject",
"@id": "https://example.com/#logo",
"url": "https://example.com/logo.png",
"width": 600,
"height": 60
},
"sameAs": [
"https://www.linkedin.com/company/example-technology",
"https://twitter.com/exampletech"
]
},
{
"@type": "WebSite",
"@id": "https://example.com/#website",
"url": "https://example.com",
"name": "Example Technology Blog",
"publisher": {"@id": "https://example.com/#organization"}
},
{
"@type": "WebPage",
"@id": "https://example.com/ai-seo-guide#webpage",
"url": "https://example.com/ai-seo-guide",
"name": "AI SEO Guide: Search Engine Optimization with Artificial Intelligence",
"isPartOf": {"@id": "https://example.com/#website"},
"about": {"@id": "https://example.com/ai-seo-guide#article"},
"primaryImageOfPage": {
"@type": "ImageObject",
"@id": "https://example.com/ai-seo-guide#primaryimage",
"url": "https://example.com/images/ai-seo-cover.jpg",
"width": 1200,
"height": 630
},
"datePublished": "2024-01-15T09:00:00+00:00",
"dateModified": "2024-05-20T14:30:00+00:00"
},
{
"@type": "Article",
"@id": "https://example.com/ai-seo-guide#article",
"headline": "AI SEO Guide: Search Engine Optimization with Artificial Intelligence",
"description": "Learn how artificial intelligence tools can strengthen your SEO strategy.",
"image": {"@id": "https://example.com/ai-seo-guide#primaryimage"},
"author": {"@id": "https://example.com/#person-john"},
"publisher": {"@id": "https://example.com/#organization"},
"datePublished": "2024-01-15T09:00:00+00:00",
"dateModified": "2024-05-20T14:30:00+00:00",
"mainEntityOfPage": {"@id": "https://example.com/ai-seo-guide#webpage"},
"about": [
{
"@type": "Thing",
"@id": "https://www.wikidata.org/wiki/Q11660",
"name": "Artificial Intelligence"
},
{
"@type": "Thing",
"@id": "https://www.wikidata.org/wiki/Q180711",
"name": "Search Engine Optimization"
}
],
"mentions": [
{
"@type": "SoftwareApplication",
"name": "ChatGPT",
"url": "https://openai.com/chatgpt"
},
{"@id": "https://example.com/#person-sarah"}
]
},
{
"@type": "Person",
"@id": "https://example.com/#person-john",
"name": "John Smith",
"url": "https://example.com/author/john-smith",
"jobTitle": "SEO Specialist",
"worksFor": {"@id": "https://example.com/#organization"},
"sameAs": [
"https://www.linkedin.com/in/johnsmith",
"https://twitter.com/johnsmith"
]
},
{
"@type": "Person",
"@id": "https://example.com/#person-sarah",
"name": "Sarah Johnson",
"url": "https://example.com/author/sarah-johnson",
"sameAs": "https://www.linkedin.com/in/sarahjohnson"
}
]
}
</script>
Connections in This Example
| Property | Source Entity | Target Entity | Description |
|---|---|---|---|
publisher |
WebSite, Article | Organization | Organization publishing the site and article |
isPartOf |
WebPage | WebSite | Page is part of the website |
author |
Article | Person (John) | Person who authored the article |
worksFor |
Person (John) | Organization | Author's employer |
about |
Article | Thing (Wikidata) | Primary topics of the article |
mentions |
Article | SoftwareApplication, Person (Sarah) | Tools and people mentioned in content |
sameAs |
Organization, Person | External URLs | Profiles on LinkedIn, Twitter, etc. |
Connecting to External Profiles with sameAs
sameAs specifies an entity's official profiles on other platforms. Search engines verify these profiles to increase entity credibility. You can add multiple URLs as an array:
"sameAs": [
"https://www.linkedin.com/company/example-technology",
"https://twitter.com/exampletech",
"https://www.crunchbase.com/organization/example-technology",
"https://en.wikipedia.org/wiki/Example_Technology"
]
Best practices:
- Include only official and verified profiles; avoid third-party directories or spam sites.
- For Person entities, use professional profiles like LinkedIn, Twitter, GitHub, or ORCID.
- For Organization entities, Wikipedia, Crunchbase, and official social media accounts are ideal.
- Ensure URLs are current and accessible.
Connecting to Topics with about and mentions
about specifies the primary subject of the content; mentions lists entities referenced within but not central to the content. Both accept Schema.org types like Thing, Person, Organization, or external entity URIs from Wikidata/Wikipedia.
about Example
"about": [
{
"@type": "Thing",
"@id": "https://www.wikidata.org/wiki/Q11660",
"name": "Artificial Intelligence"
},
{
"@type": "Thing",
"@id": "https://www.wikidata.org/wiki/Q180711",
"name": "Search Engine Optimization"
}
]
Using Wikidata or Wikipedia URIs makes it easier for search engines to map topics to a standardized knowledge graph.
mentions Example
"mentions": [
{
"@type": "SoftwareApplication",
"name": "ChatGPT",
"url": "https://openai.com/chatgpt"
},
{
"@type": "Person",
"@id": "https://example.com/#person-sarah",
"name": "Sarah Johnson"
},
{
"@type": "Organization",
"name": "Google",
"sameAs": "https://www.wikidata.org/wiki/Q95"
}
]
If the mentioned entity is already defined in the same @graph (like Sarah), a simple {"@id": "..."} reference suffices. For external entities (ChatGPT, Google), define them inline.
Common Mistakes
- Different Organization @id on each page: Using
https://example.com/#organizationon one page andhttps://example.com/#orgon another. Use the same ID across all pages. - Data inconsistent with visible content: Listing "John Smith" in JSON-LD while displaying "J. Smith" on the page. Schema.org data must reflect actual page content.
- Using relative URLs: Use
"@id": "https://example.com/#organization"instead of"@id": "/#organization". - Date format errors:
datePublishedrequires ISO 8601 format:2024-01-15T09:00:00+00:00. - Defining the same entity multiple times in @graph: Each entity should be defined once; reference it elsewhere with
@idonly. - Spam or irrelevant URLs in sameAs: Include only official, verified profiles.
- Confusing about and mentions: Primary topics belong in
about; secondary references inmentions.
Validation Tools
- Google Rich Results Test: search.google.com/test/rich-results — Shows how Google interprets your structured data.
- Schema Markup Validator: validator.schema.org — Checks compliance with Schema.org specifications.
- Google Search Console: "Enhancements" section reports on rich results like Article, FAQ, Product; lists errors and warnings.
- Bing Markup Validator: bing.com/webmasters/markup-validator — Provides Bing's perspective.
Validation tools check syntax and required fields but cannot automatically verify content accuracy (e.g., whether the author name matches page text). Manual review is essential.
No Guarantee of Citation in AI Answers
Structured data helps search engines better understand your content and is a prerequisite for rich snippets. However, it does not guarantee citation in AI Overviews, ChatGPT search, Perplexity, or similar tools. These platforms:
- Use proprietary quality, relevance, and trust algorithms.
- May consider structured data as one signal, but content quality, authority, and user intent carry more weight.
- Some AI tools (e.g., ChatGPT) may not parse or prioritize structured data during web crawling.
Structured data is a valuable foundation for SEO and user experience, but for AI citations, high-quality, original content, clear source attribution, and strong domain authority are more critical factors.
Frequently Asked Questions
Should I use the same @graph structure on every page?
Site-wide entities like Organization, WebSite, and logo should repeat on every page with the same @id. Page-specific entities like WebPage, Article, and BreadcrumbList should have unique @ids based on each page's URL (e.g., https://example.com/article-1#article, https://example.com/article-2#article). Template systems (WordPress, Next.js) can generate these dynamic IDs automatically.
How many entities should I add to about and mentions?
For about, 1-3 primary topics are sufficient; too many dilutes focus. mentions should be limited to entities actually referenced in the content; 5-10 entities is a reasonable upper limit to avoid appearing spammy. Every entity you add should have a visible counterpart on the page.
Can I use my own @id instead of Wikidata URIs?
Yes, but using external authority URIs like Wikidata or Wikipedia makes it easier for search engines to map topics to a standardized knowledge graph. For your own entities (e.g., a proprietary product category), use your own URI and, when possible, link to an external source with sameAs. A hybrid approach is ideal: Wikidata for established topics, your own URIs for proprietary entities.
Can I place JSON-LD in the body instead of the head?
Yes, JSON-LD works anywhere in <head> or <body>. Both Google and Bing support either placement. However, keeping it in <head> ensures browsers and bots parse the data earlier and it remains unaffected by DOM changes during page load. If you're using dynamic content (React, Vue), ensure JSON-LD is server-side rendered or present in the initial HTML.