Cookies & analytics

    We use cookies for analytics and to serve ads. Accept to enable Google Analytics and AdSense. You can decline to stay opt-out.

    SwiftSchema Logo

    SwiftSchema

    Intuitive Schema Generation at Your Fingertips

    AboutLearnContact
      Stack

      API Reference Stack

      API reference pages that combine TechArticle narrative with WebAPI context, FAQs, and breadcrumb navigation.

      Open generatorValidate in Rich Results Test

      When to use this stack

      • Endpoint reference pages for REST/GraphQL APIs
      • API reference hubs that need a clear WebAPI object plus documentation link
      • Docs where FAQs clarify auth, rate limits, and versioning

      What's included

      • Tech Article
        Open generator

        Captures the page-level reference article with authorship and dates.

      • Defines the API being documented, including endpoint base URL and provider.

      • Frequently Asked Questions
        Open generator

        Answers common integration questions (auth, limits, versioning, errors).

      • Breadcrumb
        Open generator

        Provides navigation context within the docs hierarchy.

      Required properties (stack union)

      Ensure every applicable required property is present in your implementation. Nested props reference their parent objects (for example, `offers.priceCurrency`).

      author.name
      datePublished
      description
      documentation
      endpointUrl
      headline
      itemListElement[].name
      mainEntityOfPage
      mainEntity[].@type=Question
      mainEntity[].acceptedAnswer.text
      name
      provider.name

      Recommended properties (stack union)

      about.@id
      audience.audienceType
      dateModified
      description
      inLanguage
      itemListElement[].item
      mainEntity[].acceptedAnswer.text
      mainEntity[].author.name
      mainEntity[].name
      termsOfService
      version

      Combined JSON-LD

      Paste as a single script tag. Keep product details, offer data, shipping/returns, and FAQ answers in sync with the page.

      Validate
      [
        {
          "@context": "https://schema.org",
          "@type": "TechArticle",
          "@id": "https://www.example.com/docs/payments-api#article",
          "headline": "Payments API Reference",
          "description": "Use the Payments API to create charges, capture funds, issue refunds, and manage webhooks.",
          "datePublished": "2024-10-01",
          "dateModified": "2025-01-15",
          "inLanguage": "en",
          "author": { "@type": "Organization", "name": "Example Pay" },
          "mainEntityOfPage": "https://www.example.com/docs/payments-api",
          "about": { "@id": "https://www.example.com/docs/payments-api#webapi" }
        },
        {
          "@context": "https://schema.org",
          "@type": "WebAPI",
          "@id": "https://www.example.com/docs/payments-api#webapi",
          "name": "Payments API v2",
          "description": "RESTful API for payments, refunds, webhooks, and payouts.",
          "version": "2.1",
          "provider": { "@type": "Organization", "name": "Example Pay", "url": "https://www.example.com" },
          "endpointUrl": "https://api.example.com/v2",
          "documentation": "https://www.example.com/docs/payments-api",
          "termsOfService": "https://www.example.com/legal/terms",
          "audience": { "@type": "Audience", "audienceType": "Developers" }
        },
        {
          "@context": "https://schema.org",
          "@type": "FAQPage",
          "mainEntity": [
            {
              "@type": "Question",
              "name": "How do I authenticate requests?",
              "acceptedAnswer": {
                "@type": "Answer",
                "text": "Send your secret API key in the Authorization header using the Bearer scheme. Rotate keys regularly from your dashboard."
              }
            },
            {
              "@type": "Question",
              "name": "What are the rate limits?",
              "acceptedAnswer": {
                "@type": "Answer",
                "text": "The default limit is 200 requests per minute per account. We return standard rate-limit headers so you can back off gracefully."
              }
            },
            {
              "@type": "Question",
              "name": "How do you version the API?",
              "acceptedAnswer": {
                "@type": "Answer",
                "text": "We version breaking changes via the URL (e.g., /v2). Use the latest stable version and review changelog notes before upgrading."
              }
            }
          ]
        },
        {
          "@context": "https://schema.org",
          "@type": "BreadcrumbList",
          "itemListElement": [
            { "@type": "ListItem", "position": 1, "name": "Home", "item": "https://www.example.com" },
            { "@type": "ListItem", "position": 2, "name": "Docs", "item": "https://www.example.com/docs" },
            { "@type": "ListItem", "position": 3, "name": "Payments API", "item": "https://www.example.com/docs/payments-api" }
          ]
        }
      ]

      Implementation steps

      1. Start from your live product detail page content; ensure titles, prices, and availability match the page.
      2. Embed one JSON-LD script in the head or just before the closing body tag using the combined example as a template.
      3. Fill shipping details for each region you serve and keep them aligned with on-page shipping tables.
      4. Attach your canonical MerchantReturnPolicy URL and keep the policy text in sync with Merchant Center.
      5. Add 3–6 FAQs that address purchase blockers (shipping, returns, compatibility) and keep answers consistent with visible content.
      6. Validate in the Rich Results Test and revalidate after price/availability/policy changes.

      Common errors and fixes

      FAQs

      Do I need both TechArticle and WebAPI?

      Yes. TechArticle represents the page content, while WebAPI represents the API itself and can be reused across endpoints.

      Where should I put endpoint examples?

      Keep request/response samples in the visible page and reference them in the TechArticle body; the WebAPI object should cover base URL, version, and provider.

      References