In the context of Schema.org and JSON-LD, a @graph is a top-level array that acts as a container for multiple, independent top-level entities within a single structured data block. This construct allows developers to define several distinct nodes—such as an Organization, a WebSite, and a Person—and explicitly map their interrelationships using properties like @id and author without requiring separate script tags for each entity.
Glossary
Graph

What is Graph?
A top-level JSON-LD construct used to encapsulate multiple, interconnected top-level nodes and their relationships within a single structured data block.
The @graph keyword is critical for entity linking and knowledge graph injection, as it enables the co-location of related entities in one payload, reducing ambiguity for AI parsers. By grouping a Thing and its related attributes under a single @graph array, search engines and generative models can more efficiently disambiguate the primary mainEntity of a page while simultaneously ingesting the full context of its associated nodes.
Key Features of the @graph Construct
The @graph keyword is a top-level JSON-LD construct that enables the encapsulation of multiple, interconnected top-level nodes within a single structured data block, eliminating redundancy and defining explicit relationships.
Multi-Node Consolidation
The primary function of @graph is to house an array of multiple top-level entities—such as an Organization, a WebSite, and a Person—within a single <script> block. Without @graph, each entity would require its own separate JSON-LD block, leading to code duplication and fragmented data. This consolidation allows a single document to fully describe a complex entity ecosystem, such as a corporation with multiple brands and their respective CEOs, all linked through shared identifiers.
Explicit Relationship Definition
@graph facilitates explicit linking between nodes using the @id keyword. By assigning a unique Internationalized Resource Identifier (IRI) to each node, other nodes can reference it directly via properties like founder, publisher, or subjectOf. This transforms a flat list of entities into a connected, machine-readable knowledge graph. For example, a NewsArticle node can explicitly point to its author, which is a Person node defined in the same @graph array, using the author's @id.
Contextual Scoping and Reuse
The @graph construct works in tandem with the @context keyword to define shared vocabularies. A single @context at the top of the block applies to all nodes within the @graph array, ensuring consistent term mapping and reducing verbosity. This scoping allows for the reuse of common properties and type definitions across multiple entities without re-declaring them, making the structured data block more compact and efficient for parsers to process.
Named Graph Support
Beyond a simple array, @graph can be combined with an @id at the top level to create a named graph. This practice assigns a unique IRI to the entire set of statements, effectively making a statement about the graph itself. This is crucial for provenance tracking, allowing a publisher to assert metadata—such as dateCreated, creator, or license—about the entire structured data payload, not just the individual entities within it.
Top-Level Node Disambiguation
When multiple entities are present, search engines need to identify the primary subject of the page. The @graph construct is often used with the mainEntity property on a parent WebPage node. By placing the WebPage node inside the @graph and using its mainEntity property to point to the @id of the primary Article or Product node, the data block explicitly disambiguates the page's central topic from secondary entities like the site's Organization or navigation elements.
Schema.org Sitelinks Search Box
A canonical use case for @graph is implementing the Sitelinks Search Box rich result. This requires defining a WebSite node with a potentialAction of type SearchAction and a urlTemplate. By placing this WebSite node inside an @graph alongside the Organization node that owns it, a single JSON-LD block can simultaneously establish the brand entity and enable the powerful site-search feature directly in search engine results pages.
Frequently Asked Questions
Clear, technically precise answers to the most common questions about implementing the Schema.org Graph construct for enterprise JSON-LD deployments.
A Graph is a top-level JSON-LD construct that encapsulates multiple, interconnected top-level nodes and their relationships within a single structured data block. Instead of defining isolated, disconnected @type entities, a Graph wraps them in an array under the @graph keyword. This allows you to define an Organization, a WebSite, a WebPage, and a BreadcrumbList in one cohesive script. The mechanism relies on the @id property to establish internal links between nodes. For example, a WebPage node can reference its publisher by pointing its publisher property to the @id of the Organization node defined elsewhere in the same graph. This creates a machine-readable knowledge graph that explicitly defines the relationships between all entities on a page, providing search engines with a complete, unambiguous semantic model of your content rather than fragmented data points.
Graph vs. Node vs. Document
Distinguishing the three fundamental structural levels within a JSON-LD structured data block, from the top-level container to the individual entity definitions.
| Feature | Graph | Node | Document |
|---|---|---|---|
Structural Role | Top-level container that encapsulates all entities | A discrete entity instance with a unique @type | The complete JSON-LD payload or script block |
JSON-LD Keyword | @graph | @type | @context |
Cardinality | Exactly one per structured data block | Multiple per @graph array | One per script tag or application/ld+json response |
Defines Entity Identity | |||
Contains Relationship Data | |||
Directly Indexed by Search Engines | |||
Example Syntax | "@graph": [ ... ] | "@type": "Organization" | |
Primary Function | Bundles disparate entities into a single, coherent context | Describes a single Thing with its properties | Serializes the entire structured data payload for transmission |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Master the interconnected concepts essential for constructing and managing JSON-LD graphs. Each card details a critical mechanism for defining entity identity, relationships, and data hierarchy.
@id
A JSON-LD keyword that assigns a globally unique Internationalized Resource Identifier (IRI) to a node. This unambiguous identifier enables cross-referencing within a graph and linking to external authority databases. Without an @id, nodes are blank nodes that cannot be directly referenced or cited by external systems.
@type
A fundamental property that defines the class or category of an entity. It maps a node to a specific Schema.org vocabulary term like Organization, Product, or Event. This classification triggers eligibility for specific rich-result features and defines the set of applicable properties for that node.
Entity Linking
The process of disambiguating textual mentions by connecting them to a canonical entry in a knowledge base like Wikidata. This establishes a machine-readable identity for named entities, reducing ambiguity for AI parsers and strengthening the semantic connections within a knowledge graph.
SameAs Property
A Schema.org property that establishes an equivalence relationship between a local entity and its external canonical URLs. Linking to authoritative sources like Wikipedia or Wikidata via sameAs performs entity reconciliation, consolidating brand identity and reinforcing the node's factual grounding in the public knowledge graph.
MainEntity
A Schema.org property used to disambiguate the primary topic of a web page. By explicitly declaring the mainEntity of a WebPage, you instruct search engines to ignore supplementary content and focus exclusively on the specified node, sharpening the page's topical relevance signal.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us