XooCode(){

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.

Highlight legend:Required by GoogleRecommendedOptional
schema.org/APIReference
<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: managed or unmanaged (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.

schema.org/APIReference (minimal)
<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.

  • Article rich result (via TechArticle inheritance)primary
    Google docs

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.

  1. 01

    APIReference for a tutorial

    Wrong
    APIReference used for "Getting started with the Xoo SDK"
    Right
    TechArticle for tutorials; APIReference for method / class / endpoint reference pages

    The distinction feeds AI coding assistants when they pick between canonical doc pages.

  2. 02

    assemblyVersion omitted on per-version pages

    Wrong
    Same APIReference for every version of the library
    Right
    One APIReference per version with assemblyVersion populated

    LLMs cite the wrong docs when version isn't published; breaking changes become invisible in assistant answers.

  3. 03

    targetPlatform as a marketing string

    Wrong
    "targetPlatform": "works anywhere"
    Right
    Concrete targets: "Browser", "Node", "iOS", "Android", "Windows"

    Targeted strings match AI assistant context; marketing language is discarded.

About the example data

Xoo SDK 2.6.1 method reference for xoo.validateSchema() — JavaScript, browser + Node, ESM.

Comments

Loading comments...

Leave a comment