Schema.org词汇表
Schema.org 是搜索引擎联合创建的结构化数据词汇表,提供统一的类型和属性定义。
Schema.org 概述
创建背景
text
2011年由Google、Bing、Yahoo、Yandex联合创建
目标:统一结构化数据词汇,帮助搜索引擎理解网页内容
网站:https://schema.org
词汇结构
text
Schema.org层级结构:
Thing(顶层类型)
├── CreativeWork
│ ├── Article
│ ├── Book
│ ├── Movie
├── Person
├── Organization
├── Place
├── Product
├── Event
常用类型
内容类型
| 类型 | 用途 | 必填属性 |
|---|---|---|
| Article | 文章 | headline, author, datePublished |
| BlogPosting | 博客文章 | headline, author |
| NewsArticle | 新闻 | headline, datePublished |
| HowTo | 教程步骤 | name, step |
| Recipe | 食谱 | name, ingredients |
| VideoObject | 视频 | name, thumbnailUrl |
商业类型
| 类型 | 用途 | 必填属性 |
|---|---|---|
| Product | 产品 | name |
| Offer | 价格/库存 | price, priceCurrency |
| LocalBusiness | 本地商家 | name, address |
| Restaurant | 餐厅 | name, servesCuisine |
| Service | 服务 | name, provider |
人物组织
| 类型 | 用途 | 常用属性 |
|---|---|---|
| Person | 人物 | name, jobTitle, email |
| Organization | 组织 | name, url, logo |
| Corporation | 公司 | name, tickerSymbol |
事件地点
| 类型 | 用途 | 常用属性 |
|---|---|---|
| Event | 事件 | name, startDate, location |
| MusicEvent | 音乐活动 | performer |
| Place | 地点 | name, address, geo |
| LocalBusiness | 本地商家 | name, openingHours |
常用属性
通用属性
| 属性 | 说明 | 适用类型 |
|---|---|---|
| name | 名称 | 大多数类型 |
| description | 描述 | 大多数类型 |
| image | 图片URL | 大多数类型 |
| url | 链接地址 | 大多数类型 |
| identifier | 标识符 | Thing |
时间属性
| 属性 | 说明 | 格式 |
|---|---|---|
| datePublished | 发布日期 | YYYY-MM-DD |
| dateModified | 修改日期 | YYYY-MM-DD |
| dateCreated | 创建日期 | YYYY-MM-DD |
| startDate | 开始时间 | ISO 8601 |
| endDate | 结束时间 | ISO 8601 |
关系属性
| 属性 | 说明 | 值类型 |
|---|---|---|
| author | 作者 | Person/Organization |
| publisher | 发布者 | Organization |
| creator | 创建者 | Person/Organization |
| contributor | 贡献者 | Person |
| mainEntity | 主要实体 | Thing |
类型详解示例
Article 文章
JSON
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "文章标题",
"author": {
"@type": "Person",
"name": "作者名"
},
"publisher": {
"@type": "Organization",
"name": "网站名",
"logo": {
"@type": "ImageObject",
"url": "https://example.com/logo.png"
}
},
"datePublished": "2026-05-17",
"dateModified": "2026-05-17",
"image": "https://example.com/article.jpg",
"articleBody": "文章正文内容摘要..."
}
Product 产品
JSON
{
"@context": "https://schema.org",
"@type": "Product",
"name": "iPhone 15 Pro",
"image": "https://example.com/iphone.jpg",
"description": "最新款智能手机",
"brand": {
"@type": "Brand",
"name": "Apple"
},
"offers": {
"@type": "Offer",
"price": "5999",
"priceCurrency": "CNY",
"availability": "https://schema.org/InStock",
"seller": {
"@type": "Organization",
"name": "官方旗舰店"
}
},
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.5",
"reviewCount": "128"
}
}
FAQPage 问答页
JSON
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [
{
"@type": "Question",
"name": "什么是Schema.org?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Schema.org是搜索引擎联合创建的结构化数据词汇表。"
}
},
{
"@type": "Question",
"name": "如何使用Schema.org?",
"acceptedAnswer": {
"@type": "Answer",
"text": "通过JSON-LD、Microdata或RDFa将Schema.org词汇嵌入网页。"
}
}
]
}
BreadcrumbList 面包屑
JSON
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"name": "首页",
"item": "https://example.com/"
},
{
"@type": "ListItem",
"position": 2,
"name": "教程",
"item": "https://example.com/tutorials/"
},
{
"@type": "ListItem",
"position": 3,
"name": "HTML",
"item": "https://example.com/tutorials/html/"
}
]
}
属性扩展
枚举值
JSON
{
"@type": "Offer",
"availability": "https://schema.org/InStock"
// 可用值:InStock, OutOfStock, PreOrder, SoldOut
}
{
"@type": "ItemAvailability",
"name": "LimitedAvailability" // 限量供应
}
预期类型
text
属性值类型可以是:
- 文本(Text):字符串值
- 数值(Number):数字
- 日期(Date/DateTime):时间值
- URL:链接地址
- 另一个类型(嵌套对象)
注意:Schema.org 官网提供完整类型和属性列表,使用前查阅确认必填属性。
要点总结
- Schema.org 是搜索引擎统一的词汇表
- Thing 是顶层类型,其他类型继承扩展
- 常用类型:Article、Product、Person、Organization
- 每个类型有必填属性和可选属性
- 使用枚举值表示状态(如 InStock)
📝 发现内容有误?点击此处直接编辑