Add JSON-LD structured data — Cursor
Without JSON-LD, Google and AI crawlers have to guess what your page represents. With it, you get rich results in Google and clean entity extraction in ChatGPT and Claude.
Fixing this in Cursor
Agentic AI code editor built on VSCode
In Cursor you edit real files, so this fix lands via direct diffs instead of a regenerated project. Paste the prompt below into your Cursor chat and the fix rolls out across the project in one pass.
Using a different tool? Pick your stack:
The prompt for Cursor
Copy and paste this into your Cursor chat exactly as-is.
Apply these changes to my codebase. Edit the files directly and keep existing formatting: Add JSON-LD structured data 1. Add a <script type="application/ld+json"> in <head> with an Organization (or WebSite) schema including name, url and logo. 2. On article/blog pages, add an Article or BlogPosting schema with headline, author, datePublished and image. 3. For FAQ-style pages, add an FAQPage schema with mainEntity[].question / acceptedAnswer pairs.
Why this matters
JSON-LD is how you tell search engines "this page is an Article, by this author, published on this date, about this topic" in machine-readable form. Google uses it for rich results — the expanded snippets, star ratings, and FAQ accordions you see in search. AI crawlers use it for citation attribution.
The effort is low: one JSON block in the head, or a Next.js helper that emits it. The upside is real: rich results get 15-30% more clicks than plain results, and AI citations with proper attribution drive referral traffic directly.
Start with Organization on your homepage, Article on every blog post, BreadcrumbList on sub-pages, FAQPage where you have FAQ sections. Those four cover 90% of what most SaaS and content sites need.
How to use this prompt in Cursor
- 1. Open your Cursor project.
- 2. Copy the prompt above with the copy button.
- 3. Paste into the Cursor chat and send.
- 4. Review the diff, accept the changes, redeploy.
- 5. Verify the fix using the checklist below.
Common mistakes to avoid
- error_outlineShipping invalid JSON — Google silently ignores broken schema.
- error_outlineAdding schema for content that does not exist on the page (e.g., Review schema without visible reviews) — counts as spam.
- error_outlineMissing required fields — Product without price, Article without headline, fails validation.
- error_outlineDuplicating content in microdata and JSON-LD, triggering "duplicate structured data" warnings.
How to verify the fix worked
- check_circlePaste the page URL into https://validator.schema.org/ — no errors.
- check_circlePaste into Google Rich Results Test (https://search.google.com/test/rich-results) — must show the expected result type.
- check_circleView source and confirm the JSON-LD block is in the HTML, not injected by JS after load.
- check_circleIn Google Search Console → Enhancements — your schema types appear within a week.
Frequently asked questions
Microdata vs RDFa vs JSON-LD — which should I use?expand_more
Can I have multiple JSON-LD blocks on one page?expand_more
Will schema directly improve rankings?expand_more
Want all 34 prompts tailored to your Cursor site?
Pantra scans your site in 10 seconds, detects the stack, and generates the exact prompts that apply — only the ones you actually need.
Scan my siteRelated Cursor prompts
Add FAQPage schema — Cursor
Prompt to add FAQPage JSON-LD and enable expandable FAQ rich results in Google, plus AI citation signals.
Structured DataAdd Organization schema — Cursor
Prompt to add Organization JSON-LD with logo, sameAs links, and contact info to your homepage.
Structured DataAdd BreadcrumbList schema — Cursor
Prompt to add BreadcrumbList JSON-LD so Google shows breadcrumbs instead of raw URLs in search results.
AI Search / GEOAllow GPTBot, ClaudeBot, and PerplexityBot — Cursor
Prompt to whitelist AI crawlers so ChatGPT, Claude, and Perplexity can cite your pages. Works in any AI-coded stack.