AI Build South Africa
Tested against Google's Rich Results Test and Schema.org's own type hierarchy, September 2026.

Quick answer

Both ChatGPT and Claude can write valid schema markup on their free plans, but an unguided prompt can produce the wrong schema type, an invented aggregateRating (or an unneeded offers block) for a page that sells nothing, or an FAQ answer paraphrased slightly differently from what's actually on the page. Some of these fail Google's Rich Results Test, and others break Google's structured data guidelines even when the test passes. The prompt below locks all three decisions down explicitly instead of leaving them to the model's own judgement, so what comes back is markup you can actually validate and ship.

Why AI-generated schema often goes wrong

An AI model asked for "schema markup for my page" with no other detail is working from a very broad training pattern of what schema markup generally looks like, not from your specific page. Left to fill in the gaps itself, it can produce something that reads as thorough rather than something that's actually true: a star rating pulled from nowhere, a price nobody supplied, or a schema type that sounds closest to what you described rather than the one Google's own guidelines actually define for that content. Current models are better at this than they used to be. When we gave a fresh Claude session a plain "give me schema markup for my free BMI calculator" request in September 2026, it picked the right type and refused to invent a rating, but it still added a $0 price block nobody asked for, made up a publish date and padded the output with three types nobody asked for (WebPage, WebSite and Organization). One run proves nothing about every model, but it shows why guessing is the risk. The underlying problem isn't broken syntax, because the JSON-LD itself usually parses fine. It's content accuracy, and Google's structured data guidelines are explicit that markup has to reflect a page's real, visible content, not a plausible-sounding summary of it.

The fix isn't a smarter model, it's a prompt that removes the guesswork entirely: tell the AI exactly what type of page this is, forbid it from adding fields you haven't confirmed, and require any FAQ text to be copied exactly rather than rewritten. That's what the prompt below does.

The prompt

Copy this into ChatGPT or Claude, filling in your own page's details in place of the brackets:

Generate valid schema.org JSON-LD structured data for the web page described below. Follow every rule exactly, don't skip any.

Page details:
- Page type: [e.g. "a blog article", "a free browser-based calculator/tool", "a page whose main content is a FAQ", "my homepage"]
- Page title: [your title]
- Page URL: [your URL]
- One-sentence summary: [what this page actually does or says]
- Does this page have a visible FAQ section? [yes/no, if yes, paste each question and its exact answer text below]

Rules:
1. Pick exactly one primary schema @type that matches what this page genuinely is (for a homepage, WebSite plus Organization). Don't stack unrelated types together.
2. If this is a free interactive tool or calculator, use WebApplication, the more specific type Google recognises for something that runs entirely in the browser with nothing to download or install. Don't default to the more generic SoftwareApplication for it. Always include "applicationCategory" and "operatingSystem" (use "Any" for something that runs in a browser), since Google's Rich Results Test wants at least two of offers, aggregateRating, applicationCategory and operatingSystem on a software app.
3. Do not add an "offers" property or an "aggregateRating" property anywhere in the output, unless I explicitly tell you this page sells something at a real price and has real collected reviews. If I haven't told you that, leave both out completely, don't invent placeholder values.
4. If I said this page has a visible FAQ section, add a FAQPage type (or a FAQPage block alongside the primary type) whose "name" and "text" fields are an exact, word-for-word copy of the question and answer text I gave you. Never paraphrase, shorten, or improve the wording for the schema block.
5. Only add a BreadcrumbList if I tell you the page's real navigational path (e.g. "Home > Blog > This page"). Don't guess one.
6. Output only one valid, correctly nested JSON-LD object inside a single <script type="application/ld+json"> tag. No markdown formatting around it, no explanation inside the code block itself.

After the code block, explain in plain English what each top-level field is doing, and explicitly tell me if you had to guess at anything instead of using information I actually gave you.

Matching your page to the type the prompt should ask for

What to tell the AI your page is, and the mistake it makes if you don't
Your page is...Correct type to ask forWhat AI often defaults to instead
A blog post or guideArticle or BlogPostingSometimes fabricates an author name or publish date if you didn't specify one
A free interactive tool or calculatorWebApplicationCan pick the less specific SoftwareApplication, and can add an unprompted "offers" block with a $0 price
A page whose main content is Q&AFAQPageCan paraphrase the answer slightly differently from your actual visible text, breaking the exact-match Google expects
Your homepageWebSite + OrganizationCan pad the output with an aggregateRating or extra types you never mentioned
A genuine numbered step-by-step guideHowToCan invent a step count or time estimate that isn't actually in your content

What this looks like in practice

Say the page is a free BMI calculator tool. Asked for schema markup with no other guidance, an AI can return something like this. It's an illustration of mistakes that do turn up in AI-generated schema, not a single captured output:

{
  "@context": "https://schema.org",
  "@type": "SoftwareApplication",
  "name": "BMI Calculator",
  "applicationCategory": "HealthApplication",
  "offers": {
    "@type": "Offer",
    "price": "0",
    "priceCurrency": "USD"
  },
  "aggregateRating": {
    "@type": "AggregateRating",
    "ratingValue": "4.8",
    "ratingCount": "127"
  }
}

Two problems and one unnecessary addition, and none of them is a syntax error. SoftwareApplication is the less specific type for something that runs entirely in a browser tab with nothing to install, when WebApplication describes it more accurately. The aggregateRating's 127 reviews don't exist anywhere, which is the one that breaks Google's rules. The offers block is valid (Google's own documentation says to use a price of 0 for a free app), but it adds a price and currency nobody supplied and isn't needed here. Using the prompt above instead, with the page type correctly stated as "a free browser-based calculator", produces this:

{
  "@context": "https://schema.org",
  "@type": "WebApplication",
  "name": "BMI Calculator",
  "applicationCategory": "HealthApplication",
  "operatingSystem": "Any",
  "url": "https://example.com/bmi-calculator/"
}

Shorter, and every field in it is actually true. The operatingSystem line matters: a version with only a name and a category comes back from the Rich Results Test as an invalid item, which is why Rule 2 of the prompt asks for both fields. We also ran the prompt, with the BMI details filled in, in a fresh Claude session (before Rule 2 gained its operatingSystem sentence). It followed every rule, left offers and aggregateRating out, volunteered applicationCategory and operatingSystem anyway, and listed both, along with a browserRequirements line, as guesses it had made. The real goal is a schema block that survives a Rich Results Test check and an honest look at what the page does, not a more elaborate-looking one.

Before you ship it

Paste the output into Google's Rich Results Test and confirm it shows no critical issues. On a free tool with no reviews you may still see optional warnings for the missing offers and aggregateRating fields, and those are safe to ignore. The test only checks that the right properties are present, so also read each field against what's actually visible on your page before you add the validated script block to your page's <head>. Our guide to adding schema markup to an AI-built site covers where that goes, whether your site shares one file across every page or has a separate file per page, plus a worked FAQPage example if your page's Q&A section needs one. If you're not yet sure which schema type genuinely fits your page, schema markup types explained covers the six types that suit almost every small site, in more depth than the table above.

If this didn't cover your situation

Not affiliated with the platforms we write about

AI Build South Africa is an independent resource. We're not endorsed by, or an official partner of, Google, Schema.org, Anthropic or OpenAI. We do participate in affiliate and referral programmes with some platforms named on this Site, though not these four. AI model behaviour changes between versions, so treat the specific defaults described here as current at the date this page states. See our Disclaimer for the full disclosure and our Terms of Service for the wider terms.

Frequently asked questions

How does schema markup work?

Schema markup is a structured, machine-readable JSON object added to a page's code that describes what the page actually is, an article, a tool, a set of FAQs, in a format search engines can parse directly instead of inferring from visible text alone. It doesn't change what a visitor sees, only what a crawler understands about the page.

Is there a free AI schema markup generator?

Both ChatGPT and Claude have a free plan that can generate schema markup with the right prompt (usage limits apply), which is what this page gives you. Dedicated schema-generator tools exist too, but a well-written prompt to an AI you're likely already using gets the same result without a separate tool, and lets you catch mistakes the AI might otherwise make by default.

Can I generate JSON-LD schema with ChatGPT?

Yes, using any current ChatGPT version, no plugins or browsing mode needed since this is pure text generation, not a live page fetch. Left unguided, it can pick a less specific schema type or add fields you never asked for, which is exactly what the rules in this page's prompt are written to prevent.

Can Claude write schema markup too?

Yes, the prompt works in Claude's ordinary chat interface with no tools or plugins needed. When we ran the prompt in a fresh Claude session (described above), Claude followed every rule, left offers and aggregateRating out, and listed the fields it had guessed at. The actual risk isn't broken syntax, it's confidently generating the wrong type or inventing fields your page doesn't have, which is why the prompt locks those decisions down explicitly.

Why does AI-generated schema often fail Google's Rich Results Test?

Because the test checks whether the markup has the properties Google requires for its declared type, and a software app with only a name and a category, for example, is flagged as an invalid item until a second required property such as operatingSystem is added. Content accuracy is a separate matter: an invented rating can pass the test yet still break Google's structured data guidelines, which say markup must match what's visible on the page. That's why a failure often surprises people who assumed valid JSON meant correct schema.

Does adding schema markup guarantee a rich result in Google?

No. Valid markup can make a page eligible for a rich result, such as a star rating or, on desktop, a breadcrumb trail, but Google decides whether to actually show one, and that decision can change over time even for a page that never changes. Google has retired the FAQ dropdown and HowTo card, but FAQPage and HowTo markup is still valid schema.org. Correct schema is about giving search engines an accurate description of your page, not a guaranteed visual upgrade.

Related reading