Schema Generator
Generates ready-to-paste JSON-LD structured data markup for any page type. Supports Product, Article, FAQ, LocalBusiness, Organization, HowTo, Review, Service, BreadcrumbList, WebSite, Event, and more. Gathers required and recommended fields per schema type, generates valid JSON-LD, validates against schema.org specifications, and outputs script tags ready for insertion into page HTML.
Prerequisites
- Target page type or URL to generate schema for
- Content details (product info, FAQ pairs, business details, etc.)
- Optional:
agency.config.json for organization defaults
- Optional: browser automation tool for extracting content from a live URL
Phase 0: Read Config
- Read
agency.config.json from the project root (if available).
- Extract
agency.name, agency.url, agency.logo for Organization schema defaults.
- Extract
agency.social_profiles for sameAs links.
- Check
tools.browser availability for live page content extraction.
- Accept parameters:
page_type -- (required) one of: product, article, faq, local_business, organization, how_to, review, service, breadcrumb, website, event, person, recipe, video, course, job_posting, software_application
url -- (optional) live page URL to extract content from automatically
data -- (optional) object with field values to populate the schema
multiple -- (optional) boolean, generate multiple schema types for the same page. Default: false
include_breadcrumb -- (optional) boolean, auto-add BreadcrumbList alongside primary schema. Default: true
Phase 1: Schema Type Resolution
Determine Required Schema Types
Based on page_type, identify the primary schema and any supplementary schemas:
| Page Type |
Primary Schema |
Supplementary Schemas |
| product |
Product |
BreadcrumbList, Review, Offer, AggregateRating |
| article |
Article / BlogPosting / NewsArticle |
BreadcrumbList, Organization (publisher) |
| faq |
FAQPage |
BreadcrumbList |
| local_business |
LocalBusiness |
BreadcrumbList, PostalAddress, GeoCoordinates |
| organization |
Organization |
WebSite, SearchAction |
| how_to |
HowTo |
BreadcrumbList |
| review |
Review |
BreadcrumbList, itemReviewed |
| service |
Service |
Organization (provider), BreadcrumbList, Offer |
| breadcrumb |
BreadcrumbList |
(standalone) |
| website |
WebSite |
Organization, SearchAction |
| event |
Event |
BreadcrumbList, Place, Offer |
| person |
Person |
(standalone) |
| video |
VideoObject |
BreadcrumbList |
| course |
Course |
BreadcrumbList, Organization (provider) |
| job_posting |
JobPosting |
Organization (hiringOrganization) |
| software_application |
SoftwareApplication |
BreadcrumbList, Review, Offer |
Phase 2: Field Gathering
If URL Provided
- Visit the page via browser automation
- Auto-extract relevant fields:
- Page title, description, headings
- Product details: name, price, currency, availability, images, SKU, brand
- Article details: headline, author, datePublished, dateModified, image
- FAQ: extract Q&A pairs from heading + paragraph patterns
- Business: name, address, phone, hours from footer/contact page
- Breadcrumb: derive from URL path structure
- Present extracted data for user confirmation before generating
If Data Object Provided
- Validate that all required fields for the schema type are present
- Prompt for any missing required fields
- Apply defaults from config where appropriate
Required vs Recommended Fields
For each schema type, clearly separate:
- Required fields: schema will fail validation without these
- Recommended fields: improve rich snippet eligibility
- Optional fields: enhance completeness but not required
Phase 3: Schema Generation
Product Schema
{
"@context": "https://schema.org",
"@type": "Product",
"name": "{{product_name}}",
"image": ["{{image_url_1}}", "{{image_url_2}}"],
"description": "{{description}}",
"sku": "{{sku}}",
"brand": {
"@type": "Brand",
"name": "{{brand_name}}"
},
"offers": {
"@type": "Offer",
"url": "{{page_url}}",
"priceCurrency": "{{currency}}",
"price": "{{price}}",
"availability": "https://schema.org/InStock",
"seller": {
"@type": "Organization",
"name": "{{seller_name}}"
}
},
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "{{rating}}",
"reviewCount": "{{review_count}}"
}
}
Article Schema
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "{{headline}}",
"image": ["{{image_url}}"],
"datePublished": "{{date_published}}",
"dateModified": "{{date_modified}}",
"author": {
"@type": "Person",
"name": "{{author_name}}",
"url": "{{author_url}}"
},
"publisher": {
"@type": "Organization",
"name": "{{publisher_name}}",
"logo": {
"@type": "ImageObject",
"url": "{{publisher_logo_url}}"
}
},
"description": "{{description}}",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "{{page_url}}"
}
}
FAQ Schema
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [
{
"@type": "Question",
"name": "{{question_1}}",
"acceptedAnswer": {
"@type": "Answer",
"text": "{{answer_1}}"
}
}
]
}
LocalBusiness Schema
{
"@context": "https://schema.org",
"@type": "LocalBusiness",
"name": "{{business_name}}",
"image": "{{image_url}}",
"url": "{{website_url}}",
"telephone": "{{phone}}",
"address": {
"@type": "PostalAddress",
"streetAddress": "{{street}}",
"addressLocality": "{{city}}",
"addressRegion": "{{state}}",
"postalCode": "{{zip}}",
"addressCountry": "{{country}}"
},
"geo": {
"@type": "GeoCoordinates",
"latitude": "{{lat}}",
"longitude": "{{lng}}"
},
"openingHoursSpecification": [
{
"@type": "OpeningHoursSpecification",
"dayOfWeek": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"],
"opens": "09:00",
"closes": "17:00"
}
]
}
Organization Schema
{
"@context": "https://schema.org",
"@type": "Organization",
"name": "{{org_name}}",
"url": "{{org_url}}",
"logo": "{{logo_url}}",
"sameAs": [
"{{linkedin_url}}",
"{{twitter_url}}",
"{{facebook_url}}"
],
"contactPoint": {
"@type": "ContactPoint",
"telephone": "{{phone}}",
"contactType": "customer service"
}
}
HowTo Schema
{
"@context": "https://schema.org",
"@type": "HowTo",
"name": "{{title}}",
"description": "{{description}}",
"totalTime": "{{duration_iso8601}}",
"step": [
{
"@type": "HowToStep",
"name": "{{step_name}}",
"text": "{{step_text}}",
"image": "{{step_image_url}}"
}
]
}
BreadcrumbList Schema
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"name": "Home",
"item": "{{base_url}}"
},
{
"@type": "ListItem",
"position": 2,
"name": "{{category_name}}",
"item": "{{category_url}}"
},
{
"@type": "ListItem",
"position": 3,
"name": "{{page_name}}",
"item": "{{page_url}}"
}
]
}
Service Schema
{
"@context": "https://schema.org",
"@type": "Service",
"name": "{{service_name}}",
"description": "{{description}}",
"provider": {
"@type": "Organization",
"name": "{{provider_name}}",
"url": "{{provider_url}}"
},
"serviceType": "{{service_type}}",
"areaServed": {
"@type": "Country",
"name": "{{country}}"
},
"offers": {
"@type": "Offer",
"price": "{{starting_price}}",
"priceCurrency": "{{currency}}"
}
}
Phase 4: Validation
Schema.org Compliance Check
- Verify all required properties are present for the schema type
- Verify data types match expectations (string, number, URL, date in ISO 8601)
- Verify URLs are absolute, not relative
- Verify image URLs are accessible
- Check for deprecated properties and suggest current alternatives
- Ensure
@context is https://schema.org (not http)
Common Error Prevention
- No trailing commas in JSON
- No single quotes (must be double quotes)
- Dates in ISO 8601 format:
YYYY-MM-DDTHH:MM:SSZ
- Prices as strings with decimals:
"29.99" not 29.99
- Availability values must be full schema.org URLs:
https://schema.org/InStock
Rich Results Eligibility
- Check which Google rich result types the schema qualifies for
- Flag any missing fields that would prevent rich result display
- Note: FAQ rich results, Product rich results, Review stars, Recipe cards, How-to steps
Phase 5: Output
Return structured JSON:
{
"page_url": "https://example.com/products/widget",
"generated_at": "2024-01-15T14:30:00Z",
"page_type": "product",
"schemas_generated": ["Product", "BreadcrumbList"],
"validation_status": "PASS",
"rich_result_eligible": ["Product snippet", "Review stars", "Price display"],
"script_tags": [
{
"schema_type": "Product",
"json_ld": "<script type=\"application/ld+json\">\n{\n \"@context\": \"https://schema.org\",\n \"@type\": \"Product\",\n ...\n}\n</script>"
},
{
"schema_type": "BreadcrumbList",
"json_ld": "<script type=\"application/ld+json\">\n{\n \"@context\": \"https://schema.org\",\n \"@type\": \"BreadcrumbList\",\n ...\n}\n</script>"
}
],
"validation_notes": [
"All required Product fields present",
"AggregateRating included -- eligible for review stars in SERPs",
"BreadcrumbList derived from URL path structure"
],
"missing_recommended_fields": [
{ "field": "gtin", "impact": "Adds product identification for Google Shopping" },
{ "field": "review", "impact": "Individual reviews strengthen review star display" }
],
"implementation_instructions": "Add both script tags to the <head> section of the page. Test with Google Rich Results Test: https://search.google.com/test/rich-results"
}
Example Usage
Trigger phrases:
- "Generate schema for [page type]"
- "Create JSON-LD for [url]"
- "Add structured data to [page type]"
- "Schema markup for my [product/article/FAQ]"
- "Generate FAQ schema for these questions"
User: Generate product schema for plasho.com/services/shopify-setup
Assistant: [visits page, extracts service details, generates Service + Organization + BreadcrumbList JSON-LD, validates, returns ready-to-paste script tags]
User: Create FAQ schema for these Q&As: "How long does setup take?" "2-3 weeks", "What's included?" "Full store setup with theme customization"
Assistant: [generates FAQPage JSON-LD with both Q&A pairs, validates, returns script tag]
User: What schema should I add to my homepage?
Assistant: [recommends Organization + WebSite + SearchAction, gathers details, generates all three, returns validated script tags]
1---2name: schema-generator3description: Generate validated JSON-LD structured data markup for any page type4---56# Schema Generator78Generates ready-to-paste JSON-LD structured data markup for any page type. Supports Product, Article, FAQ, LocalBusiness, Organization, HowTo, Review, Service, BreadcrumbList, WebSite, Event, and more. Gathers required and recommended fields per schema type, generates valid JSON-LD, validates against schema.org specifications, and outputs script tags ready for insertion into page HTML.910## Prerequisites1112- Target page type or URL to generate schema for13- Content details (product info, FAQ pairs, business details, etc.)14- Optional: `agency.config.json` for organization defaults15- Optional: browser automation tool for extracting content from a live URL1617## Phase 0: Read Config18191. Read `agency.config.json` from the project root (if available).202. Extract `agency.name`, `agency.url`, `agency.logo` for Organization schema defaults.213. Extract `agency.social_profiles` for sameAs links.224. Check `tools.browser` availability for live page content extraction.235. Accept parameters:24 - `page_type` -- (required) one of: `product`, `article`, `faq`, `local_business`, `organization`, `how_to`, `review`, `service`, `breadcrumb`, `website`, `event`, `person`, `recipe`, `video`, `course`, `job_posting`, `software_application`25 - `url` -- (optional) live page URL to extract content from automatically26 - `data` -- (optional) object with field values to populate the schema27 - `multiple` -- (optional) boolean, generate multiple schema types for the same page. Default: false28 - `include_breadcrumb` -- (optional) boolean, auto-add BreadcrumbList alongside primary schema. Default: true2930## Phase 1: Schema Type Resolution3132### Determine Required Schema Types33Based on `page_type`, identify the primary schema and any supplementary schemas:3435| Page Type | Primary Schema | Supplementary Schemas |36|-----------|---------------|----------------------|37| product | Product | BreadcrumbList, Review, Offer, AggregateRating |38| article | Article / BlogPosting / NewsArticle | BreadcrumbList, Organization (publisher) |39| faq | FAQPage | BreadcrumbList |40| local_business | LocalBusiness | BreadcrumbList, PostalAddress, GeoCoordinates |41| organization | Organization | WebSite, SearchAction |42| how_to | HowTo | BreadcrumbList |43| review | Review | BreadcrumbList, itemReviewed |44| service | Service | Organization (provider), BreadcrumbList, Offer |45| breadcrumb | BreadcrumbList | (standalone) |46| website | WebSite | Organization, SearchAction |47| event | Event | BreadcrumbList, Place, Offer |48| person | Person | (standalone) |49| video | VideoObject | BreadcrumbList |50| course | Course | BreadcrumbList, Organization (provider) |51| job_posting | JobPosting | Organization (hiringOrganization) |52| software_application | SoftwareApplication | BreadcrumbList, Review, Offer |5354## Phase 2: Field Gathering5556### If URL Provided57- Visit the page via browser automation58- Auto-extract relevant fields:59 - Page title, description, headings60 - Product details: name, price, currency, availability, images, SKU, brand61 - Article details: headline, author, datePublished, dateModified, image62 - FAQ: extract Q&A pairs from heading + paragraph patterns63 - Business: name, address, phone, hours from footer/contact page64 - Breadcrumb: derive from URL path structure65- Present extracted data for user confirmation before generating6667### If Data Object Provided68- Validate that all required fields for the schema type are present69- Prompt for any missing required fields70- Apply defaults from config where appropriate7172### Required vs Recommended Fields73For each schema type, clearly separate:74- **Required fields**: schema will fail validation without these75- **Recommended fields**: improve rich snippet eligibility76- **Optional fields**: enhance completeness but not required7778## Phase 3: Schema Generation7980### Product Schema81```json82{83 "@context": "https://schema.org",84 "@type": "Product",85 "name": "{{product_name}}",86 "image": ["{{image_url_1}}", "{{image_url_2}}"],87 "description": "{{description}}",88 "sku": "{{sku}}",89 "brand": {90 "@type": "Brand",91 "name": "{{brand_name}}"92 },93 "offers": {94 "@type": "Offer",95 "url": "{{page_url}}",96 "priceCurrency": "{{currency}}",97 "price": "{{price}}",98 "availability": "https://schema.org/InStock",99 "seller": {100 "@type": "Organization",101 "name": "{{seller_name}}"102 }103 },104 "aggregateRating": {105 "@type": "AggregateRating",106 "ratingValue": "{{rating}}",107 "reviewCount": "{{review_count}}"108 }109}110```111112### Article Schema113```json114{115 "@context": "https://schema.org",116 "@type": "Article",117 "headline": "{{headline}}",118 "image": ["{{image_url}}"],119 "datePublished": "{{date_published}}",120 "dateModified": "{{date_modified}}",121 "author": {122 "@type": "Person",123 "name": "{{author_name}}",124 "url": "{{author_url}}"125 },126 "publisher": {127 "@type": "Organization",128 "name": "{{publisher_name}}",129 "logo": {130 "@type": "ImageObject",131 "url": "{{publisher_logo_url}}"132 }133 },134 "description": "{{description}}",135 "mainEntityOfPage": {136 "@type": "WebPage",137 "@id": "{{page_url}}"138 }139}140```141142### FAQ Schema143```json144{145 "@context": "https://schema.org",146 "@type": "FAQPage",147 "mainEntity": [148 {149 "@type": "Question",150 "name": "{{question_1}}",151 "acceptedAnswer": {152 "@type": "Answer",153 "text": "{{answer_1}}"154 }155 }156 ]157}158```159160### LocalBusiness Schema161```json162{163 "@context": "https://schema.org",164 "@type": "LocalBusiness",165 "name": "{{business_name}}",166 "image": "{{image_url}}",167 "url": "{{website_url}}",168 "telephone": "{{phone}}",169 "address": {170 "@type": "PostalAddress",171 "streetAddress": "{{street}}",172 "addressLocality": "{{city}}",173 "addressRegion": "{{state}}",174 "postalCode": "{{zip}}",175 "addressCountry": "{{country}}"176 },177 "geo": {178 "@type": "GeoCoordinates",179 "latitude": "{{lat}}",180 "longitude": "{{lng}}"181 },182 "openingHoursSpecification": [183 {184 "@type": "OpeningHoursSpecification",185 "dayOfWeek": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"],186 "opens": "09:00",187 "closes": "17:00"188 }189 ]190}191```192193### Organization Schema194```json195{196 "@context": "https://schema.org",197 "@type": "Organization",198 "name": "{{org_name}}",199 "url": "{{org_url}}",200 "logo": "{{logo_url}}",201 "sameAs": [202 "{{linkedin_url}}",203 "{{twitter_url}}",204 "{{facebook_url}}"205 ],206 "contactPoint": {207 "@type": "ContactPoint",208 "telephone": "{{phone}}",209 "contactType": "customer service"210 }211}212```213214### HowTo Schema215```json216{217 "@context": "https://schema.org",218 "@type": "HowTo",219 "name": "{{title}}",220 "description": "{{description}}",221 "totalTime": "{{duration_iso8601}}",222 "step": [223 {224 "@type": "HowToStep",225 "name": "{{step_name}}",226 "text": "{{step_text}}",227 "image": "{{step_image_url}}"228 }229 ]230}231```232233### BreadcrumbList Schema234```json235{236 "@context": "https://schema.org",237 "@type": "BreadcrumbList",238 "itemListElement": [239 {240 "@type": "ListItem",241 "position": 1,242 "name": "Home",243 "item": "{{base_url}}"244 },245 {246 "@type": "ListItem",247 "position": 2,248 "name": "{{category_name}}",249 "item": "{{category_url}}"250 },251 {252 "@type": "ListItem",253 "position": 3,254 "name": "{{page_name}}",255 "item": "{{page_url}}"256 }257 ]258}259```260261### Service Schema262```json263{264 "@context": "https://schema.org",265 "@type": "Service",266 "name": "{{service_name}}",267 "description": "{{description}}",268 "provider": {269 "@type": "Organization",270 "name": "{{provider_name}}",271 "url": "{{provider_url}}"272 },273 "serviceType": "{{service_type}}",274 "areaServed": {275 "@type": "Country",276 "name": "{{country}}"277 },278 "offers": {279 "@type": "Offer",280 "price": "{{starting_price}}",281 "priceCurrency": "{{currency}}"282 }283}284```285286## Phase 4: Validation287288### Schema.org Compliance Check289- Verify all required properties are present for the schema type290- Verify data types match expectations (string, number, URL, date in ISO 8601)291- Verify URLs are absolute, not relative292- Verify image URLs are accessible293- Check for deprecated properties and suggest current alternatives294- Ensure `@context` is `https://schema.org` (not http)295296### Common Error Prevention297- No trailing commas in JSON298- No single quotes (must be double quotes)299- Dates in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`300- Prices as strings with decimals: `"29.99"` not `29.99`301- Availability values must be full schema.org URLs: `https://schema.org/InStock`302303### Rich Results Eligibility304- Check which Google rich result types the schema qualifies for305- Flag any missing fields that would prevent rich result display306- Note: FAQ rich results, Product rich results, Review stars, Recipe cards, How-to steps307308## Phase 5: Output309310Return structured JSON:311312```json313{314 "page_url": "https://example.com/products/widget",315 "generated_at": "2024-01-15T14:30:00Z",316 "page_type": "product",317 "schemas_generated": ["Product", "BreadcrumbList"],318 "validation_status": "PASS",319 "rich_result_eligible": ["Product snippet", "Review stars", "Price display"],320 "script_tags": [321 {322 "schema_type": "Product",323 "json_ld": "<script type=\"application/ld+json\">\n{\n \"@context\": \"https://schema.org\",\n \"@type\": \"Product\",\n ...\n}\n</script>"324 },325 {326 "schema_type": "BreadcrumbList",327 "json_ld": "<script type=\"application/ld+json\">\n{\n \"@context\": \"https://schema.org\",\n \"@type\": \"BreadcrumbList\",\n ...\n}\n</script>"328 }329 ],330 "validation_notes": [331 "All required Product fields present",332 "AggregateRating included -- eligible for review stars in SERPs",333 "BreadcrumbList derived from URL path structure"334 ],335 "missing_recommended_fields": [336 { "field": "gtin", "impact": "Adds product identification for Google Shopping" },337 { "field": "review", "impact": "Individual reviews strengthen review star display" }338 ],339 "implementation_instructions": "Add both script tags to the <head> section of the page. Test with Google Rich Results Test: https://search.google.com/test/rich-results"340}341```342343## Example Usage344345Trigger phrases:346- "Generate schema for [page type]"347- "Create JSON-LD for [url]"348- "Add structured data to [page type]"349- "Schema markup for my [product/article/FAQ]"350- "Generate FAQ schema for these questions"351352```353User: Generate product schema for plasho.com/services/shopify-setup354Assistant: [visits page, extracts service details, generates Service + Organization + BreadcrumbList JSON-LD, validates, returns ready-to-paste script tags]355```356357```358User: Create FAQ schema for these Q&As: "How long does setup take?" "2-3 weeks", "What's included?" "Full store setup with theme customization"359Assistant: [generates FAQPage JSON-LD with both Q&A pairs, validates, returns script tag]360```361362```363User: What schema should I add to my homepage?364Assistant: [recommends Organization + WebSite + SearchAction, gathers details, generates all three, returns validated script tags]365```