Loading...
Loading...
Compare original and translation side by side
<script><head><body><head><body><script><script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "How to Implement Structured Data",
"author": {
"@type": "Person",
"name": "Jane Smith"
}
}
</script><script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "How to Implement Structured Data",
"author": {
"@type": "Person",
"name": "Jane Smith"
}
}
</script>| Keyword | Purpose | Example |
|---|---|---|
| Declares the vocabulary (always | |
| Specifies the entity type | |
| Unique identifier for an entity (enables cross-referencing) | |
| Contains multiple entities in a single JSON-LD block | |
| 关键字 | 用途 | 示例 |
|---|---|---|
| 声明词汇表(固定为 | |
| 指定实体类型 | |
| 实体的唯一标识符(支持交叉引用) | |
| 在单个JSON-LD块中包含多个实体 | |
@id{
"@context": "https://schema.org",
"@type": "Article",
"author": {
"@type": "Person",
"name": "Jane Smith",
"@id": "https://example.com/#jane"
},
"publisher": {
"@id": "https://example.com/#organization"
}
}@id{
"@context": "https://schema.org",
"@type": "Article",
"author": {
"@type": "Person",
"name": "Jane Smith",
"@id": "https://example.com/#jane"
},
"publisher": {
"@id": "https://example.com/#organization"
}
}{
"@type": "Article",
"author": [
{ "@type": "Person", "name": "Jane Smith" },
{ "@type": "Person", "name": "John Doe" }
]
}{
"@type": "Article",
"author": [
{ "@type": "Person", "name": "Jane Smith" },
{ "@type": "Person", "name": "John Doe" }
]
}@graph{
"@context": "https://schema.org",
"@graph": [
{
"@type": "Organization",
"@id": "https://example.com/#organization",
"name": "Example Corp",
"url": "https://example.com"
},
{
"@type": "WebPage",
"@id": "https://example.com/about/#webpage",
"url": "https://example.com/about/",
"name": "About Us",
"isPartOf": { "@id": "https://example.com/#website" }
},
{
"@type": "BreadcrumbList",
"itemListElement": [
{ "@type": "ListItem", "position": 1, "name": "Home", "item": "https://example.com/" },
{ "@type": "ListItem", "position": 2, "name": "About" }
]
}
]
}@graph{
"@context": "https://schema.org",
"@graph": [
{
"@type": "Organization",
"@id": "https://example.com/#organization",
"name": "Example Corp",
"url": "https://example.com"
},
{
"@type": "WebPage",
"@id": "https://example.com/about/#webpage",
"url": "https://example.com/about/",
"name": "About Us",
"isPartOf": { "@id": "https://example.com/#website" }
},
{
"@type": "BreadcrumbList",
"itemListElement": [
{ "@type": "ListItem", "position": 1, "name": "Home", "item": "https://example.com/" },
{ "@type": "ListItem", "position": 2, "name": "About" }
]
}
]
}| Property | Status | Notes |
|---|---|---|
| R | Max 110 characters |
| R | At least 696px wide; multiple images recommended |
| R | ISO 8601 format |
| Rec | ISO 8601 format |
| R | Person or Organization with |
| Rec | Organization with |
| Rec | Short summary of the article |
| Rec | URL of the page |
extract_schemagenerate_schemaArticle| 属性 | 状态 | 说明 |
|---|---|---|
| 必填 | 最多110个字符 |
| 必填 | 宽度至少696px;推荐使用多张图片 |
| 必填 | ISO 8601格式 |
| 推荐 | ISO 8601格式 |
| 必填 | 包含 |
| 推荐 | 包含 |
| 推荐 | 文章简短摘要 |
| 推荐 | 页面URL |
extract_schemagenerate_schemaArticle| Property | Status | Notes |
|---|---|---|
| R | Product name |
| R | At least one image |
| Rec | Product description |
| Rec | Stock-keeping unit |
| Rec | Brand name |
| R | Offer or AggregateOffer |
| R | Numeric price |
| R | ISO 4217 currency code |
| R | ItemAvailability enum (e.g., |
| Rec | URL to buy |
| Rec | AggregateRating with |
| Rec | Individual Review objects |
AggregateRatingOfferProduct{
"@type": "Product",
"name": "Widget",
"offers": {
"@type": "Offer",
"price": "29.99",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock"
},
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.5",
"reviewCount": "120"
}
}| 属性 | 状态 | 说明 |
|---|---|---|
| 必填 | 产品名称 |
| 必填 | 至少一张图片 |
| 推荐 | 产品描述 |
| 推荐 | 库存单位编号 |
| 推荐 | 品牌名称 |
| 必填 | Offer或AggregateOffer |
| 必填 | 数字格式价格 |
| 必填 | ISO 4217货币代码 |
| 必填 | ItemAvailability枚举值(例如 |
| 推荐 | 购买链接URL |
| 推荐 | 包含 |
| 推荐 | 单个Review对象 |
AggregateRatingOfferProduct{
"@type": "Product",
"name": "Widget",
"offers": {
"@type": "Offer",
"price": "29.99",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock"
},
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.5",
"reviewCount": "120"
}
}| Property | Status | Notes |
|---|---|---|
| R | Array of Question objects |
| R | The question text |
| R | Answer object |
| R | The answer text (HTML allowed) |
| 属性 | 状态 | 说明 |
|---|---|---|
| 必填 | Question对象数组 |
| 必填 | 问题文本 |
| 必填 | Answer对象 |
| 必填 | 答案文本(支持HTML) |
| Property | Status | Notes |
|---|---|---|
| R | Title of the how-to |
| R | Array of HowToStep objects |
| R | Step title |
| R | Step instructions |
| Rec | Image for each step |
| Rec | URL anchor to step on page |
| Rec | ISO 8601 duration (e.g., |
| Rec | MonetaryAmount object |
| Rec | HowToSupply items needed |
| Rec | HowToTool items needed |
| 属性 | 状态 | 说明 |
|---|---|---|
| 必填 | 教程标题 |
| 必填 | HowToStep对象数组 |
| 必填 | 步骤标题 |
| 必填 | 步骤说明 |
| 推荐 | 每个步骤的图片 |
| 推荐 | 页面中步骤的锚点URL |
| 推荐 | ISO 8601时长格式(例如 |
| 推荐 | MonetaryAmount对象 |
| 推荐 | 所需的HowToSupply物品 |
| 推荐 | 所需的HowToTool工具 |
RestaurantDentistLegalServiceRealEstateAgentMedicalBusiness| Property | Status | Notes |
|---|---|---|
| R | Business name |
| R | PostalAddress object |
| Rec | Phone number |
| Rec | Array of hours |
| Rec | GeoCoordinates (lat/long) |
| Rec | Website URL |
| Rec | Business photo |
| Rec | e.g., |
| Rec | For Restaurant subtype |
| Rec | AggregateRating |
| Rec | Review objects |
RestaurantDentistLegalServiceRealEstateAgentMedicalBusiness| 属性 | 状态 | 说明 |
|---|---|---|
| 必填 | 商家名称 |
| 必填 | PostalAddress对象 |
| 推荐 | 电话号码 |
| 推荐 | 营业时间数组 |
| 推荐 | GeoCoordinates(纬度/经度) |
| 推荐 | 商家网站URL |
| 推荐 | 商家照片 |
| 推荐 | 例如 |
| 推荐 | 适用于Restaurant子类型 |
| 推荐 | AggregateRating |
| 推荐 | Review对象 |
| Property | Status | Notes |
|---|---|---|
| R | Organization name |
| R | Website URL |
| R | ImageObject or URL (min 112x112px, square preferred) |
| Rec | Array of social profile URLs |
| Rec | ContactPoint object |
| Rec | PostalAddress |
| Rec | Short description |
| Rec | ISO 8601 date |
| 属性 | 状态 | 说明 |
|---|---|---|
| 必填 | 组织名称 |
| 必填 | 网站URL |
| 必填 | ImageObject或URL(最小112x112px,推荐正方形) |
| 推荐 | 社交资料URL数组 |
| 推荐 | ContactPoint对象 |
| 推荐 | PostalAddress |
| 推荐 | 简短描述 |
| 推荐 | ISO 8601格式日期 |
| Property | Status | Notes |
|---|---|---|
| R | Array of ListItem objects |
| R | Integer (1-indexed) |
| R | Breadcrumb label |
| R* | URL (*omit on last item) |
| 属性 | 状态 | 说明 |
|---|---|---|
| 必填 | ListItem对象数组 |
| 必填 | 整数(从1开始索引) |
| 必填 | 面包屑标签 |
| 必填* | URL(*最后一项可省略) |
| Property | Status | Notes |
|---|---|---|
| R | Homepage URL |
| Rec | Site name |
| R | SearchAction object |
| R | URL template with |
| R | |
{
"@type": "WebSite",
"url": "https://example.com/",
"potentialAction": {
"@type": "SearchAction",
"target": "https://example.com/search?q={search_term_string}",
"query-input": "required name=search_term_string"
}
}| 属性 | 状态 | 说明 |
|---|---|---|
| 必填 | 首页URL |
| 推荐 | 站点名称 |
| 必填 | SearchAction对象 |
| 必填 | 包含 |
| 必填 | |
{
"@type": "WebSite",
"url": "https://example.com/",
"potentialAction": {
"@type": "SearchAction",
"target": "https://example.com/search?q={search_term_string}",
"query-input": "required name=search_term_string"
}
}| Property | Status | Notes |
|---|---|---|
| R | Event name |
| R | ISO 8601 datetime |
| R | Place or VirtualLocation |
| R | Venue name |
| R | PostalAddress |
| Rec | ISO 8601 datetime |
| Rec | Event description |
| Rec | Event image |
| Rec | Offer with price/url/availability |
| Rec | Person or Organization |
| Rec | Person or Organization |
| Rec | EventScheduled, EventCancelled, EventPostponed, etc. |
| Rec | OfflineEventAttendanceMode, OnlineEventAttendanceMode, MixedEventAttendanceMode |
| 属性 | 状态 | 说明 |
|---|---|---|
| 必填 | 活动名称 |
| 必填 | ISO 8601日期时间格式 |
| 必填 | Place或VirtualLocation |
| 必填 | 场馆名称 |
| 必填 | PostalAddress |
| 推荐 | ISO 8601日期时间格式 |
| 推荐 | 活动描述 |
| 推荐 | 活动图片 |
| 推荐 | 包含价格/URL/库存状态的Offer |
| 推荐 | Person或Organization |
| 推荐 | Person或Organization |
| 推荐 | EventScheduled、EventCancelled、EventPostponed等 |
| 推荐 | OfflineEventAttendanceMode、OnlineEventAttendanceMode、MixedEventAttendanceMode |
| Property | Status | Notes |
|---|---|---|
| R | Recipe name |
| R | Multiple images at different aspect ratios |
| R | Person or Organization |
| Rec | ISO 8601 |
| Rec | Short description |
| Rec | ISO 8601 duration |
| Rec | ISO 8601 duration |
| Rec | ISO 8601 duration |
| Rec | e.g., |
| Rec | Array of strings |
| R | Array of HowToStep objects |
| Rec | NutritionInformation (calories) |
| Rec | AggregateRating |
| Rec | VideoObject |
| 属性 | 状态 | 说明 |
|---|---|---|
| 必填 | 食谱名称 |
| 必填 | 不同宽高比的多张图片 |
| 必填 | Person或Organization |
| 推荐 | ISO 8601格式 |
| 推荐 | 简短描述 |
| 推荐 | ISO 8601时长格式 |
| 推荐 | ISO 8601时长格式 |
| 推荐 | ISO 8601时长格式 |
| 推荐 | 例如 |
| 推荐 | 字符串数组 |
| 必填 | HowToStep对象数组 |
| 推荐 | NutritionInformation(卡路里) |
| 推荐 | AggregateRating |
| 推荐 | VideoObject |
| Property | Status | Notes |
|---|---|---|
| R | Video title |
| R | Video description |
| R | Thumbnail image URL |
| R | ISO 8601 date |
| Rec | Direct URL to video file |
| Rec | Embed URL |
| Rec | ISO 8601 duration |
| Rec | View count |
| 属性 | 状态 | 说明 |
|---|---|---|
| 必填 | 视频标题 |
| 必填 | 视频描述 |
| 必填 | 缩略图URL |
| 必填 | ISO 8601格式日期 |
| 推荐 | 视频文件直接URL |
| 推荐 | 嵌入URL |
| 推荐 | ISO 8601时长格式 |
| 推荐 | 观看次数 |
| Property | Status | Notes |
|---|---|---|
| R | Course title |
| R | Course description |
| R | Organization offering the course |
| Rec | Offer with price |
| Rec | Identifier |
| Rec | CourseInstance with schedule |
| 属性 | 状态 | 说明 |
|---|---|---|
| 必填 | 课程标题 |
| 必填 | 课程描述 |
| 必填 | 提供课程的Organization |
| 推荐 | 包含价格的Offer |
| 推荐 | 课程编号 |
| 推荐 | 包含课程安排的CourseInstance |
| Property | Status | Notes |
|---|---|---|
| R | App name |
| Rec | e.g., |
| Rec | e.g., |
| R | Offer with price (use |
| Rec | AggregateRating |
| Rec | Review objects |
| 属性 | 状态 | 说明 |
|---|---|---|
| 必填 | 应用名称 |
| 推荐 | 例如 |
| 推荐 | 例如 |
| 必填 | 包含价格的Offer(免费应用填 |
| 推荐 | AggregateRating |
| 推荐 | Review对象 |
| Property | Status | Notes |
|---|---|---|
| R | The entity being reviewed (Product, LocalBusiness, etc.) |
| R | Person who wrote the review |
| R | Rating object with |
| Rec | Maximum rating value |
| Rec | Minimum rating value |
| Rec | ISO 8601 date |
| Rec | Full text of the review |
| 属性 | 状态 | 说明 |
|---|---|---|
| 必填 | 被评论的实体(Product、LocalBusiness等) |
| 必填 | 撰写评论的Person |
| 必填 | 包含 |
| 推荐 | 最高评分值 |
| 推荐 | 最低评分值 |
| 推荐 | ISO 8601格式日期 |
| 推荐 | 评论全文 |
export default function ProductPage({ product }) {
const schema = {
"@context": "https://schema.org",
"@type": "Product",
"name": product.title,
"image": product.images,
"description": product.description,
"sku": product.sku,
"brand": { "@type": "Brand", "name": product.brand },
"offers": {
"@type": "Offer",
"price": product.price,
"priceCurrency": "USD",
"availability": product.inStock
? "https://schema.org/InStock"
: "https://schema.org/OutOfStock"
}
};
return (
<>
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(schema) }}
/>
{/* Page content */}
</>
);
}export default function ProductPage({ product }) {
const schema = {
"@context": "https://schema.org",
"@type": "Product",
"name": product.title,
"image": product.images,
"description": product.description,
"sku": product.sku,
"brand": { "@type": "Brand", "name": product.brand },
"offers": {
"@type": "Offer",
"price": product.price,
"priceCurrency": "USD",
"availability": product.inStock
? "https://schema.org/InStock"
: "https://schema.org/OutOfStock"
}
};
return (
<>
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(schema) }}
/>
{/* Page content */}
</>
);
}extract_schemagenerate_schemaextract_schemagenerate_schema| Pitfall | Problem | Fix |
|---|---|---|
| Invisible content | Schema describes content not visible to users | Ensure every structured data property matches visible page content |
| Missing required fields | Google ignores incomplete markup | Always include all required properties per type |
Wrong | Using a type Google does not support for rich results | Use only Google-documented types |
| Fake reviews | Schema includes fabricated ratings or reviews | Only mark up genuine, real user reviews |
| Outdated prices | Product schema shows old price | Dynamically generate schema from live data |
| Multiple conflicting types | Two Product schemas on one page with different data | Use one canonical schema per entity |
| Self-referencing issues | | Ensure every |
| Incorrect date format | Using | Always use |
| HTTP image URLs | Images referenced over HTTP not HTTPS | Use HTTPS URLs for all images |
| Spam policy violations | Marking up content solely for SEO manipulation | Follow Google's structured data spam policies |
| 陷阱 | 问题 | 修复方案 |
|---|---|---|
| 不可见内容 | Schema描述的内容对用户不可见 | 确保每个结构化数据属性都与页面上可见的内容匹配 |
| 缺少必填字段 | Google会忽略不完整的标记 | 始终包含每种类型的所有必填属性 |
错误的 | 使用Google不支持富结果的类型 | 仅使用Google文档中列出的类型 |
| 虚假评论 | Schema包含伪造的评分或评论 | 仅标记真实的用户评论 |
| 价格过时 | 产品Schema显示旧价格 | 从实时数据源动态生成Schema |
| 多个冲突类型 | 单个页面上有两个数据不同的Product Schema | 每个实体仅使用一个标准Schema |
| 自引用问题 | | �确保每个 |
| 日期格式错误 | 使用 | 始终使用 |
| HTTP图片URL | 图片使用HTTP而非HTTPS链接 | 所有图片均使用HTTPS URL |
| 违反垃圾信息政策 | 仅为SEO操纵而标记内容 | 遵循Google的结构化数据垃圾信息政策 |
| Tool | Use For |
|---|---|
| Extract existing structured data from any URL |
| Generate valid JSON-LD markup for a given page and type |
| 工具 | 用途 |
|---|---|
| 从任意URL提取现有结构化数据 |
| 为指定页面和类型生成有效的JSON-LD标记 |