You can get a working JSON-LD schema for almost any page by giving an AI model your actual page content and telling it which schema.org type to use and which properties are required, then checking the result in Google’s Rich Results Test before you publish it. The catch is that large language models will happily invent a review count, a price, or a “datePublished” if you don’t give them real values to work from, and a schema block full of guessed data is worse than no schema at all because it can violate Google’s structured data policies. Used correctly, though, AI is genuinely good at the tedious part of structured data: getting the JSON-LD syntax, nesting, and property names right so you don’t have to memorize schema.org’s spec.
Which Schema Types Should You Actually Ask AI to Generate?
Not every page needs the same schema, and picking the wrong type is one of the most common mistakes people make when they ask an AI for “schema markup” without specifying anything else. Match the type to what the page actually is:
- Article / BlogPosting / NewsArticle — for blog posts and news content, using properties like headline, image, datePublished, dateModified, author, and publisher.
- Product — for e-commerce pages, using name, image, description, sku, brand, and a nested Offer object with price, priceCurrency, and availability.
- HowTo — for step-by-step instructions, using step, HowToStep, and text for each stage.
- FAQPage — for pages built around question-and-answer content, using mainEntity, Question, and acceptedAnswer.
- LocalBusiness / Organization — for business pages, using name, address, telephone, and openingHours.
One important 2026 update worth knowing before you spend time on FAQPage markup: Google announced in its changelog that the FAQ rich result stopped appearing in Google Search results as of May 7, 2026, and later removed the FAQPage documentation entirely. FAQPage schema is still valid schema.org markup and can still help AI systems like ChatGPT, Gemini, and AI Overviews understand your Q&A content, but don’t expect it to produce a rich snippet in classic Google search results the way it used to.
How Do You Write a Prompt That Doesn’t Hallucinate Fields?
The single biggest risk with AI-generated structured data is the model filling in plausible-looking values you never gave it — a fake review rating, an invented “priceValidUntil” date, or an author name it guessed from context. Google’s structured data guidelines are explicit that markup must be “a true representation of the page content” and that you shouldn’t mark up content that isn’t actually visible on the page. The fix is to control the prompt so the model has no reason to guess:
- Paste the actual visible page content (or a clean summary of it) into the prompt — never ask the AI to write schema for a page it hasn’t seen.
- Name the exact schema.org type and list only the properties you want populated.
- Explicitly instruct: “If a value isn’t present in the text I gave you, leave that property out entirely — do not estimate, invent, or infer it.”
- Ask for a rating or review count only if you can paste in real review data; otherwise tell the model to skip AggregateRating altogether.
- Require valid, minified JSON-LD wrapped in a single script tag with type=”application/ld+json”, so it’s ready to paste without cleanup.
What Does a Good Schema-Generation Prompt Look Like?
Here’s a prompt template you can copy for an Article page. Fill in the bracketed parts with your real content before sending it to ChatGPT, Claude, or Gemini:
“Generate valid JSON-LD structured data using the schema.org Article type for the page content below. Use only these properties: headline, image, author (type Person, name only), datePublished, dateModified, and publisher (type Organization, with name and logo URL). Use exactly these values — do not add, guess, or infer any other data: Headline: [your headline]. Author: [real author name]. Published: [real ISO 8601 date]. Publisher name: [your site name]. Publisher logo URL: [real logo URL]. Featured image URL: [real image URL]. If I haven’t given you a value for a property, omit that property completely. Return only the JSON-LD inside a script tag, no explanation.”
For a Product page, swap the instructions to reference name, description, image, sku, brand, and a nested offers object, and tell the model explicitly: “Only include the offers.price and offers.availability fields if I give you the real current price and stock status below — otherwise omit the entire offers object.” That one clause prevents the AI from inventing a price it never saw.
How Do You Validate the Output Before You Publish It?
Never paste AI-generated JSON-LD straight into a live page. Run it through validation first, in this order:
- Check the JSON syntax — ask the AI itself to re-check its own output for valid JSON, or run it through any JSON linter, since a single missing comma or brace will break the whole block.
- Run Google’s Rich Results Test — paste the code or the live URL in to confirm the markup is recognized and see which rich result features it’s eligible for.
- Cross-check with the Schema Markup Validator at validator.schema.org, which checks against the full schema.org vocabulary rather than only Google’s supported subset — useful since other engines and AI crawlers read schema.org more broadly than Google’s rich-result list.
- Re-read every value against the live page by hand. Google’s own guidance is blunt about this: structured data that doesn’t match visible page content, or that marks up content users can’t see, violates their spam policies and can lead to manual action, regardless of whether a human or an AI wrote it.
- Monitor it after publishing using the Rich Results status reports in Google Search Console, which flag templating errors across your site over time, not just on the one URL you tested.
It’s also worth remembering that Google states plainly it “does not guarantee that your structured data will show up in search results, even if your page is marked up correctly.” Schema markup is a hint, not a guarantee — treat it as one signal among many, alongside genuinely well-structured content.
Frequently Asked Questions
Can ChatGPT or Claude generate schema markup directly from a URL?
Not reliably on their own, unless the tool has live browsing enabled and you confirm it actually fetched the page. Most chat interfaces can’t read a live webpage by default, so if you just paste a URL and ask for schema, the model may generate markup based on guesses about what a page like that “probably” contains. It’s safer to copy the actual visible text, prices, dates, and author details from the page and paste them directly into your prompt.
Is JSON-LD better than Microdata or RDFa for AI-generated schema?
Yes, for most sites. Google explicitly recommends JSON-LD as “the easiest solution for website owners to implement and maintain at scale” because it lives in a single script tag separate from your HTML, rather than being woven into visible markup attribute by attribute like Microdata or RDFa. It’s also the format AI models produce most reliably, since it’s self-contained JSON rather than scattered HTML attributes.
Does adding schema markup guarantee a rich snippet in Google?
No. Correct, policy-compliant structured data makes a page eligible for a rich result, but Google decides case by case whether to display one, and it can change its mind about entire features — as it did in May 2026 when it stopped showing FAQ rich results altogether. Focus on accuracy and validation rather than assuming markup alone will change how your listing looks in search.
For the full technical rules, read Google’s General Structured Data Guidelines and its overview of how structured data markup works. If you’d rather have an AI model return clean, well-formed JSON for other tasks too, our guide on how to get structured JSON output from AI models covers the prompting techniques that keep any model’s output machine-readable. And since schema markup increasingly feeds AI Overviews and chat-based search as much as classic blue links, it’s worth pairing this with our post on optimizing content for AI Overviews and ChatGPT Search.



