Prompt
7 minute readSchema Markup Prompt: Draft JSON-LD From Page Content
A reusable schema markup prompt that drafts JSON-LD from a page's visible content, never invents prices or ratings and lists what the page must show first. Includes a real test run.
This schema markup prompt drafts JSON-LD structured data from the visible content of one page. It picks a suitable schema.org type, fills only the properties the page actually shows and lists the facts it could not confirm. You then validate the draft in Google's Rich Results Test and add it to the page.
The page explains each variable, gives the full prompt and shows one real run on an invented recipe page. It also lists the checks that keep markup honest. Google's guidelines require structured data to match what visitors can see, so the prompt never adds facts that are not on the page.
What this schema markup prompt does
The prompt reads the page text you paste and proposes one main schema.org type, such as Article, Product, Recipe or LocalBusiness. Then it writes JSON-LD using only values found in that text, and it leaves out properties it cannot support.
It also explains its choice and lists missing information, such as a price or a review count, that a rich result would need. As a result, you know what to add to the page itself before the markup can help.
When to use it
Use it for a page that has no structured data, or to rebuild markup that no longer matches the page. It works one page at a time.
- A new product, recipe or event page that needs a first draft of JSON-LD.
- Old markup that lists prices or ratings the page no longer shows.
- A content team without a developer who can write schema by hand.
However, for templates that generate thousands of pages, build the markup in code from your database instead. Use the prompt to design that template, not to mark up pages one by one.
Inputs and variables
Replace every bracketed variable before you run the prompt. The page text is the only source of truth for the markup.
- [PAGE_URL]: the page's canonical URL.
- [PAGE_TEXT]: the visible text of the page, including headings, prices, dates and author names exactly as shown.
- [ORGANIZATION]: your site or business name and logo URL, if the page should reference them.
- [TARGET_FEATURE]: the search feature you hope to qualify for, or "none".
Paste only published page content. Do not include unpublished prices, internal notes or customer data.
Reusable prompt — version 1.0
Copy the prompt below as it is. It forbids values that are not in the page text, which is the most common way markup breaks Google's guidelines.
You are helping an SEO specialist draft JSON-LD structured data for one page.
<task>
Choose the best schema.org type for the page in <page> and write JSON-LD for it.
</task>
<rules>
1. Use only facts that appear in <page>. Never invent prices, ratings, review counts, dates, authors or availability.
2. Leave out any property you cannot fill from the page. Do not use placeholders in the final JSON.
3. Use schema.org types and property names exactly; do not invent properties.
4. Use "@context": "https://schema.org" and the canonical URL [PAGE_URL].
5. If [TARGET_FEATURE] needs information the page does not show, list it under "Missing on the page" instead of adding it.
6. Return valid JSON only inside the code block, with no comments.
</rules>
<output_format>
1. Chosen type and why, in two sentences.
2. The JSON-LD in one code block.
3. Missing on the page: information to add to the visible page first.
4. Values to double-check.
</output_format>
<organization>[ORGANIZATION]</organization>
<page>
[PAGE_TEXT]
</page>Rule 5 turns gaps into a to-do list for the page instead of hidden markup. That keeps the visible page and the structured data in step.
How to use it
Any capable chat model can run this schema markup prompt. Paste the text as it appears on the page, not a summary.
- Copy the visible text of the page, including prices, dates and names.
- Fill in the variables, paste the prompt into a new chat and run it.
- Paste the JSON-LD into the Rich Results Test or the Schema Markup Validator.
- Fix every error and compare each value with the live page.
- Add the script to the page, then request indexing or wait for a recrawl.
Example input and output
We ran version 1.0 once on Claude Opus 5.5 on November 15, 2026. The recipe page is invented for this example; the output is trimmed, and trims are marked with "…".
PAGE_URL: https://kitchen.example/recipes/lemon-rice
TARGET_FEATURE: recipe rich result
PAGE_TEXT:
Lemon rice. By Dana Ortiz. Published March 3, 2026.
Prep 10 min. Cook 20 min. Serves 4.
Ingredients: 1 cup basmati rice, 2 lemons, 2 cups water, 1 tsp salt.
Steps: 1. Rinse the rice. 2. Simmer with water and salt for 15 minutes.
3. Stir in lemon juice and zest.1. Recipe fits: the page gives ingredients, steps and times.
2. {
"@context": "https://schema.org",
"@type": "Recipe",
"name": "Lemon rice",
"author": {"@type": "Person", "name": "Dana Ortiz"},
"datePublished": "2026-03-03",
"prepTime": "PT10M",
"cookTime": "PT20M",
"recipeYield": "4 servings",
"recipeIngredient": ["1 cup basmati rice", "2 lemons", "2 cups water", "1 tsp salt"],
…
}
3. Missing on the page: an image of the dish, which the recipe rich
result requires. No rating is shown, so none was added.
4. Double-check: total time is not stated; it was left out.In this run, the model left out the image and rating instead of inventing them, and it said what the page needs. That single run is an illustration, not a benchmark.
How to check the output
Validate the draft and compare it with the page before it goes live.
- Validity: the Rich Results Test shows no errors for the type you chose.
- Visible match: every value appears on the page exactly as marked up.
- No invention: there are no ratings, prices or dates the page does not show.
- Properties: each property exists in schema.org for that type.
- Missing items: anything a feature needs is added to the visible page first.
Troubleshooting
These fixes address the bad outputs we see most often.
- The model adds a rating anyway: repeat rule 1 at the end of the prompt.
- Invalid JSON: ask it to return the JSON again with no comments or trailing commas.
- Wrong type: name the type you want in [TARGET_FEATURE].
- Durations in plain text: ask for ISO 8601 durations, such as PT20M.
Limitations
Valid markup makes a page eligible for some search features, but Google decides whether to show them. Therefore, the prompt cannot promise rich results, rankings or AI citations. It also cannot see content that loads only with JavaScript unless you paste it.
Outputs vary by model, version and input. Treat the JSON-LD as a draft for a person to validate and approve.
Version history
Each version carries a date, so you can tell which prompt produced older markup.
- 1.0: November 15, 2026. First version, tested once on Claude Opus 5.5.
Frequently asked questions
Quick answers to the questions readers ask most about this topic.
Which AI models does this schema markup prompt work with?
Any capable chat model that follows structured instructions, such as current models from OpenAI, Anthropic or Google. We tested it once on Claude Opus 5.5. Always validate the output in the Rich Results Test.
Will valid schema markup get me rich results?
Not necessarily. Valid markup makes a page eligible for some features, but Google decides whether to show them. The markup must also match the visible page.
Can I add ratings or prices that are not on the page?
No. Google's guidelines require structured data to reflect content visitors can see. Add the information to the visible page first, then mark it up.
Should I use this prompt for thousands of product pages?
Use it to design the template, then generate markup in code from your product data. Marking up pages one by one with a chat model is slow and error-prone at scale.
Sources
These pages support the structured data guidance and the prompting approach above.
Keep reading