SEO · Technical SEO
The Best Prompt for Schema Markup
The best prompt for schema markup ties every property to content a visitor can see on the page. This prompt takes the page text, URL and site details, selects the schema.org types that fit, shows a table mapping each property to the page text it came from, and then outputs JSON-LD. Properties without a visible source are left out and listed as missing, and ratings or reviews are never added unless they appear on the page.
Schema Markup (JSON-LD) Prompt
Generates JSON-LD that mirrors what is visibly on your page, maps every property to its source text and refuses to add ratings or details that are not there.
- Works with
- ChatGPT, Claude, Gemini
- Difficulty
- Intermediate
- Complexity
- Multi-part reply
- Variables
- 5
- Version
- 1.0
Customize this prompt
Fill in what you know. Anything left blank stays as a [bracketed placeholder]. Nothing you type leaves your browser.
5 variables · fields marked * matter most
# Role You are a structured data specialist. You write schema.org markup in JSON-LD that describes what is on a page and nothing else. # Inputs Page URL: [Page URL] Page type as I see it: [Page type] Site or organization details that appear on the site: [Site or organization details shown on the site] Markup already on the page, if any: [Existing markup] <visible_page_content> [Visible page content] </visible_page_content> # Ground rule Structured data must represent content that is visible to a visitor on this page. The visible_page_content block and site_details are your only sources of values. If a value is not there, the property is omitted. You do not fill gaps with typical, estimated or placeholder values. # Steps 1. Type selection. Name the most specific schema.org type that fits the page's main content, plus any supporting types (for example BreadcrumbList or Organization) that the content supports. If my stated page type does not match the content, say so. Reject types the content cannot support and give the reason in a line. 2. Property map. Build a table: Property | Value | Where it appears in the visible content (quote a few words). Every property in the final markup must have a row. 3. Missing properties. List properties that search engines commonly require or recommend for the chosen type but that have no source on the page. For each, tell me what to add to the visible page before it can be marked up. Tell me to confirm the current required list in Google's documentation for that feature, since you may be out of date. 4. Markup. Output one JSON-LD script block. Use absolute URLs, ISO 8601 dates and times, and connect related entities with @id where it helps. Valid JSON, no comments, no empty strings, no placeholder text. 5. Conflicts. If existing_markup is supplied, note duplicates or contradictions with your block and say which to keep. # Never do this - No aggregateRating, review, ratingValue or reviewCount unless the ratings and the count are shown on this page, and then copy the exact figures. - No invented prices, availability, dates, authors, addresses, phone numbers, opening hours, images, logos or sameAs profiles. - No FAQ or how-to markup for questions or steps that are not on the page word for word in substance. - No claim that the markup will produce a rich result; eligibility is decided by the search engine. # Output order Type selection, property map, missing properties, the JSON-LD code block, conflicts, then a three-item test checklist: validate the syntax, run a rich results test, and compare each value against the live page.
Use it when you are
- Adding Article, Product, LocalBusiness or Event markup to a page that has none
- Checking that markup generated by a plugin matches what the page shows
- Preparing markup for developers together with a list of content gaps to fix first
- Rebuilding markup after a page's content has changed
Why this prompt works
A property needs a quoted source
The property map requires a few words from the page next to every value. That single requirement does most of the work: a rating, price or author the model would otherwise supply has nothing to quote, so it lands in the missing list. You also get a fast way to audit the markup against the page.
It follows the visible-content principle directly
Google's structured data guidelines say markup should describe content that is visible to readers and should not mark up misleading or absent content. The ground rule restates that as an operating constraint, and the banned list names the fields most often fabricated, with ratings and review counts at the top.
Gaps are sent back to the page
When a recommended property has no source, the fix is to add the information to the page, not to the markup alone. The missing-properties step phrases each gap that way, which keeps page and markup aligned and gives content editors a concrete to-do list.
The model's knowledge of requirements is treated as provisional
Required and recommended properties, and which rich result types a search engine supports, change over time. The prompt has the model tell you to confirm the current list in the official documentation, and it bans any promise of a rich result, since eligibility is not something markup can guarantee.
Testing is the final part of the answer
The reply ends with three checks: syntax, a rich results test and a manual comparison with the live page. Generated JSON can be valid and still wrong, so the last check, the one a validator cannot do, is listed alongside the automated ones.
How to use it
- Open the page in a browser and copy the text a visitor sees, including price, dates, author name, breadcrumb trail and image URLs where relevant.
- Add organization details only if they are published on your site, such as the name, logo URL and contact details from your contact page.
- Choose the page type, or pick 'Not sure' and let the type selection step decide.
- Read the property map and missing properties before the code. Add missing information to the page itself if you want it marked up, then run the prompt again.
- Paste the JSON-LD into a script tag of type application/ld+json and test it with a schema validator and Google's Rich Results Test.
- Recheck the markup whenever the page's visible content changes, especially prices, dates and availability.
AI model compatibility
| Model | Status | Notes |
|---|---|---|
| ChatGPT | Expected to work | Ask for the JSON-LD in a single code block and copy it from there. Formatting applied outside a code block can alter quotation marks and break the JSON. |
| Claude | Expected to work | Paste the rendered page text, not the HTML source, inside the visible_page_content tags so hidden elements are not treated as visible. |
| Gemini | Expected to work | If the reply jumps straight to code, ask for the property map first; that table is how you check each value. |
“Expected to work” means the prompt uses plain, model-independent structure and has been reviewed for that — not that it has been run on that model. A model is marked Tested only when a test record is published below.
Worked example
Scenario: An illustrative case: a bakery adding markup to a page for an in-person sourdough class.
# Role You are a structured data specialist. You write schema.org markup in JSON-LD that describes what is on a page and nothing else. # Inputs Page URL: https://example.com/classes/sourdough-basics/ Page type as I see it: Event page Site or organization details that appear on the site: Hearth & Crumb Bakery, 14 Mill Lane, logo at https://example.com/logo.png, phone number as shown on the contact page Markup already on the page, if any: none <visible_page_content> Page text pasted: class title, a description paragraph, date and start and end time, the bakery address as the venue, ticket price with a Book now link, the instructor's first name, and three customer quotes with no star ratings </visible_page_content> # Ground rule Structured data must represent content that is visible to a visitor on this page. The visible_page_content block and site_details are your only sources of values. If a value is not there, the property is omitted. You do not fill gaps with typical, estimated or placeholder values. # Steps 1. Type selection. Name the most specific schema.org type that fits the page's main content, plus any supporting types (for example BreadcrumbList or Organization) that the content supports. If my stated page type does not match the content, say so. Reject types the content cannot support and give the reason in a line. 2. Property map. Build a table: Property | Value | Where it appears in the visible content (quote a few words). Every property in the final markup must have a row. 3. Missing properties. List properties that search engines commonly require or recommend for the chosen type but that have no source on the page. For each, tell me what to add to the visible page before it can be marked up. Tell me to confirm the current required list in Google's documentation for that feature, since you may be out of date. 4. Markup. Output one JSON-LD script block. Use absolute URLs, ISO 8601 dates and times, and connect related entities with @id where it helps. Valid JSON, no comments, no empty strings, no placeholder text. 5. Conflicts. If existing_markup is supplied, note duplicates or contradictions with your block and say which to keep. # Never do this - No aggregateRating, review, ratingValue or reviewCount unless the ratings and the count are shown on this page, and then copy the exact figures. - No invented prices, availability, dates, authors, addresses, phone numbers, opening hours, images, logos or sameAs profiles. - No FAQ or how-to markup for questions or steps that are not on the page word for word in substance. - No claim that the markup will produce a rich result; eligibility is decided by the search engine. # Output order Type selection, property map, missing properties, the JSON-LD code block, conflicts, then a three-item test checklist: validate the syntax, run a rich results test, and compare each value against the live page.
What a good response should contain
- A type selection choosing Event with the bakery as location and organizer, and a note that the content does not support rating markup
- A property map quoting the date, time, price and address text from the page
- A missing list that may include an image and ticket availability, each with what to add to the page
- One JSON-LD block with ISO 8601 dates, absolute URLs and no aggregateRating or review properties
- A three-item test checklist at the end
This is an illustrative scenario showing how to fill in the prompt and what to look for. It is not a recorded model output. Recorded outputs will be published here once this prompt has a test record.
Testing and editorial review
Status: Untested. Reviewed for structure and clarity by the editorial team. No recorded model test yet.
No test record has been published for this prompt yet. When it is tested, this section will show the model and version, the date, the inputs, the actual output and notes against our seven-point rubric. We do not publish numerical scores.
| Author | TheBestPromptFor Editorial Team — The editorial team writes, reviews and maintains the prompts and guides on TheBestPromptFor. Prompts are drafted with AI assistance and reviewed against published editorial standards. |
|---|---|
| Published | November 15, 2026 |
| Last reviewed | November 15, 2026 |
| Last tested | Not yet tested |
| Version history |
|
Limitations and things to check
- The model works from pasted text and cannot confirm what is rendered on the live page. Compare every value yourself.
- Its knowledge of required properties and supported rich result types may be outdated. Check Google's current documentation for the feature you want.
- Valid markup does not guarantee a rich result; search engines decide whether to show one.
- Generated JSON can contain syntax slips. Always run it through a validator before deploying.
- Markup must be kept in sync with the page. Stale prices or dates in structured data are an error even if they were correct when written.
Alternative prompts
SEO
Technical SEO Audit Prompt
Reviews crawl exports, URL lists and Search Console notes you supply, and returns evidence-backed findings ranked by impact with a fix and a check for each.
- ChatGPT
- Claude
- Gemini
SEO
On-Page SEO Review Prompt
Reviews one existing page against its target query and returns specific before-and-after edits to the title, headings, opening, coverage, links and images.
- ChatGPT
- Claude
- Gemini
E-commerce
Product Page Audit Prompt
Audits pasted product page content against the five questions a shopper asks before buying, with quoted evidence, severity, fixes and rewrites.
- ChatGPT
- Claude
- Gemini
Related resources
Technical guide
How to Test AI Prompts
A seven-criterion rubric and a nine-field test record for evaluating prompts, plus why this site describes results in words and publishes no scores.
Guide
How to Improve AI Responses
A diagnostic approach to weak AI answers: name the fault, trace it to the gap in your prompt, then follow up precisely or rewrite and start again.
Frequently asked questions
Can I add star ratings to my schema to get stars in search results?
Only if real ratings from customers are shown on that page, and the markup copies them exactly. Marking up ratings that are not visible, or that you made up, violates Google's structured data guidelines and can lead to a manual action. This prompt will not generate them without a visible source.
Why JSON-LD instead of microdata?
Google supports JSON-LD, microdata and RDFa, and recommends JSON-LD because it sits in one script block separate from the page's HTML, which makes it easier to add and maintain. The values must still match the visible content.
What if my page is missing a required property?
Add the information to the page first, then mark it up. If the information does not exist, for example an event with no fixed date, that type of markup may not fit the page, and the prompt's type selection step will say so.
Will this markup help with AI features in search?
Google's guidance on AI features says there is no special markup required to appear in them; the same fundamentals apply. Accurate structured data that matches visible content is part of those fundamentals, but it is not a switch for any particular feature.
Sources and references
- Introduction to structured data markup in Google Search — Google Search Central
- Getting started with schema.org — Schema.org
- AI features and your website — Google Search Central
Was this prompt useful?
No account needed. Do not include personal information.