APIReference
APIReference is the TechArticle subtype for a method / class / endpoint reference page (as distinct from a tutorial or conceptual doc). It adds five properties for pinning down which library / version / platform / framework the reference targets so AI coding assistants can match the doc to the consumer's context.
Full example of schema.org/APIReference json-ld markup
The markup is verified as valid with Rich Results Test from Google.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "APIReference",
"headline": "xoo.validateSchema(input, options) — Xoo SDK 2.6.1",
"name": "xoo.validateSchema",
"url": "https://docs.xoocode.example/api/2.6.1/validate-schema",
"assembly": "xoo-sdk",
"executableLibraryName": "@xoo/sdk",
"assemblyVersion": "2.6.1",
"targetPlatform": "Browser + Node",
"programmingModel": "managed",
"inLanguage": "en",
"proficiencyLevel": "Expert",
"dependencies": "Node 18+, any modern browser with fetch",
"author": {
"@type": "Organization",
"name": "Xoo Code",
"url": "https://xoocode.com"
},
"datePublished": "2026-04-01",
"dateModified": "2026-04-14",
"keywords": "JSON-LD, schema.org, validator, structured data",
"articleSection": "API Reference",
"articleBody": "xoo.validateSchema() accepts a JSON-LD string or parsed object and returns a ValidationResult with errors, warnings, and effective type bindings walked up the schema.org parent chain…"
}
</script>Direct properties (5)
assembly: library file name (mscorlib.dll,lodash.js,urllib3/__init__.py).executableLibraryName: synonym for assembly; some publishers carry both for back-compat.assemblyVersion: the product / framework version (.NET Framework 4.5,React 19.1,Python 3.12).targetPlatform: app development target (phone,desktop,XBox,iOS,server).programmingModel:managedorunmanaged(most relevant to .NET and native-interop content).
Inherited from TechArticle: dependencies, proficiencyLevel. From Article: headline, articleBody, wordCount, articleSection. From CreativeWork: author, datePublished, dateModified, keywords, inLanguage.
Why it matters for AI citation
LLM coding assistants triangulate API docs on version + platform + language. Publishing APIReference with assemblyVersion and targetPlatform makes the page preferentially citable for the right version of the API, and explicitly not for adjacent versions where behaviour differs.
Minimal valid version
The smallest markup that still produces a valid APIReference entity. Use it as the floor. Reach for the advanced example above when you want search engines and AI agents to understand more about your content.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "APIReference",
"headline": "xoo.validateSchema()",
"assembly": "@xoo/sdk",
"assemblyVersion": "2.6.1"
}
</script>Google rich results this unlocks
Markup matching this example makes your page eligible for the following Google Search rich results. The primary target drives the required / recommended property classification in the advanced code block above.
- Google docsArticle rich result (via TechArticle inheritance)primary
Common APIReference mistakes
Mistakes that pass validation but silently fail to earn rich results or mislead consumers walking the graph. Avoid these and your markup will be ahead of most sites in the wild.
- 01
APIReference for a tutorial
WrongAPIReference used for "Getting started with the Xoo SDK"RightTechArticle for tutorials; APIReference for method / class / endpoint reference pagesThe distinction feeds AI coding assistants when they pick between canonical doc pages.
- 02
assemblyVersion omitted on per-version pages
WrongSame APIReference for every version of the libraryRightOne APIReference per version with assemblyVersion populatedLLMs cite the wrong docs when version isn't published; breaking changes become invisible in assistant answers.
- 03
targetPlatform as a marketing string
Wrong"targetPlatform": "works anywhere"RightConcrete targets: "Browser", "Node", "iOS", "Android", "Windows"Targeted strings match AI assistant context; marketing language is discarded.
Schema properties in this example
About the example data
Xoo SDK 2.6.1 method reference for xoo.validateSchema() — JavaScript, browser + Node, ESM.
Comments
Loading comments...