SEO优化-商城网站产品schema.org结构化数据

安然
,技术教程
,Oct 24, 2025
0

编写高质量的产品结构化数据(Product Schema)提升网站SEO表现

在现代电商网站的 SEO 优化中,结构化数据(Structured Data) 已成为让搜索引擎正确理解网页内容的关键工具。通过在产品页中添加符合 Schema.org 标准的 JSON-LD 结构化数据,我们可以帮助搜索引擎识别页面中的产品名称、价格、库存、品牌、配送和退货等信息,从而获得更丰富的搜索展示效果,如价格标注、评论星级和库存状态等。


一、结构化数据的整体组成

一个标准的产品页面结构化数据,通常由三个主要对象组成:

  1. WebPage(网页信息):描述页面本身的基础属性,如标题、URL、语言、面包屑路径。
  2. Product(产品信息):描述产品的主要信息,如名称、品牌、描述、图片、SKU 等。
  3. Offer(销售信息):定义该产品的报价、价格、库存状态、运费、退货政策等。

二、完整结构化数据

{
  "@context": "https://schema.org/",
  "@graph": [
    {
      "@type": "WebPage",
      "@id": "https://www.example.com/product/sample.html#webpage",
      "url": "https://www.example.com/product/sample.html",
      "name": "Example page",
      "inLanguage": "ja",
      "description": "This is description",
      "about": {
        "@type": "Organization",
        "@id": "https://www.example.com/#identity",
        "name": "Example Store",
        "url": "https://www.example.com"
      },
      "isPartOf": {
        "@type": "WebSite",
        "@id": "https://www.example.com/#website"
      },
      "breadcrumb": {
        "@type": "BreadcrumbList",
        "@id": "https://www.example.com/product/sample.html#breadcrumb",
        "itemListElement": [
          {
            "@type": "ListItem",
            "position": 1,
            "name": "Home",
            "item": "https://www.example.com"
          },
          {
            "@type": "ListItem",
            "position": 2,
            "name": "Silicone Series",
            "item": "https://www.example.com/collections/silicone"
          },
          {
            "@type": "ListItem",
            "position": 3,
            "name": "Sample Product",
            "item": "https://www.example.com/product/sample.html"
          }
        ]
      }
    },
    {
      "@type": "Product",
      "@id": "https://www.example.com/product/sample.html#product",
      "name": "Example page",
      "image": "https://www.example.com/images/products/sample.webp",
      "url": "https://www.example.com/product/sample.html",
      "description": "this is description",
      "sku": "SP-001",
      "mpn": "SP-001",
      "brand": {
        "@type": "Brand",
        "name": "ExampleBrand"
      },
      "aggregateRating": {
        "@type": "AggregateRating",
        "ratingValue": "4.8",
        "bestRating": "5",
        "reviewCount": "2"
      },
      "review":[
         {
               "@type": "Review",
               "reviewRating": {
                   "@type": "Rating",
                   "ratingValue":"5"
               },
               "author":{
                   "@type": "Person",
                   "name": "John Doe"
               },
               "reviewBody":"Wow. it is very good."
           },
           {   
               "@type": "Review",
               "reviewRating": {
                   "@type": "Rating",
                   "ratingValue":"5"
               },
               "author":{
                   "@type": "Person",
                   "name": "John Doe"
               },
               "reviewBody":"Wow. how are you?"
           }
       ],
      "offers": {
        "@type": "Offer",
        "@id": "https://www.example.com/product/sample.html#offer",
        "price": "2779.00",
        "priceCurrency": "JPY",
        "priceValidUntil": "2026-12-31",
        "priceSpecification": {
          "@type": "UnitPriceSpecification",
          "priceType": "http://schema.org/StrikethroughPrice",
          "price": "3970.00",
          "priceCurrency": "JPY",
          "valueAddedTaxIncluded": "true"
        },
        "inventoryLevel": {
          "@type": "QuantitativeValue",
          "value": 999
        },
        "availability": "https://schema.org/InStock",
        "itemCondition": "https://schema.org/NewCondition",
        "seller": {
          "@type": "Organization",
          "name": "Example Store",
          "url": "https://www.example.com"
        },
        "shippingDetails": {
          "@type": "OfferShippingDetails",
          "shippingRate": {
            "@type": "MonetaryAmount",
            "value": 0,
            "currency": "JPY"
          },
          "shippingDestination": {
            "@type": "DefinedRegion",
            "addressCountry": ["JP"]
          },
          "deliveryTime": {
            "@type": "ShippingDeliveryTime",
            "handlingTime": {
              "@type": "QuantitativeValue",
              "minValue": 5,
              "maxValue": 7,
              "unitCode": "d"
            },
            "transitTime": {
              "@type": "QuantitativeValue",
              "minValue": 25,
              "maxValue": 40,
              "unitCode": "d"
            }
          }
        },
        "hasMerchantReturnPolicy": {
          "@type": "MerchantReturnPolicy",
          "applicableCountry": ["JP"],
          "merchantReturnDays": 2,
          "returnMethod": "https://schema.org/ReturnByMail",
          "returnFees": "https://schema.org/ReturnFeesCustomerResponsibility",
          "refundType": "https://schema.org/ExchangeRefund"
        }
      }
    }
  ]
}

三、各部分详细解释

1. @context@graph

  • @context 定义了语义上下文,一般固定为 "https://schema.org/",告诉搜索引擎该结构遵循 Schema.org 标准。
  • @graph 允许在一个 JSON-LD 中包含多个相关对象,例如同时定义 WebPage 和 Product。

2. WebPage 部分

这一部分描述了当前网页的基本信息,主要作用是帮助搜索引擎理解页面层级、面包屑导航以及语言环境。

关键字段解释:

  • @type: 指定类型为 "WebPage"
  • @idurl: 用于唯一标识当前页面。
  • namedescription: 对应网页标题与描述。
  • inLanguage: 页面主要语言。
  • breadcrumb: 定义页面的导航层级,提升搜索引擎的可理解性。

3. Product 部分

这是结构化数据的核心,用于描述页面上的产品实体。

关键字段解释:

  • @type: "Product"
  • name: 产品名称。
  • image: 产品主图 URL。
  • description: 简要说明产品特征。
  • sku: 库存编号(Stock Keeping Unit)。
  • mpn: 制造商编号(Manufacturer Part Number)。
  • brand: 产品品牌。
  • aggregateRating: 产品平均评分与评论数量(用于展示星级)。

4. Offer 部分

OfferProduct 的下级节点,用来描述该商品的销售信息。

主要字段解释:

  • price / priceCurrency: 当前售价与货币类型。
  • priceSpecification: 原价(或划线价)说明。
  • priceValidUntil: 价格有效期。
  • inventoryLevel: 当前库存数量。对于定制或无限制库存的产品,可以设为较高值(如 999)。
  • availability: 库存状态,一般为 "InStock"
  • itemCondition: 产品状况,常用 "NewCondition"
  • seller: 销售者信息。
  • shippingDetails: 配送费用、时间与目的地。
  • hasMerchantReturnPolicy: 退货政策说明(退货天数、方式、费用责任等)。

5. inventoryLevel 字段说明

如果你的商品是定制、没有真实库存数量,不要写一个虚假的数量(比如随意写 999),这会被视为不准确或误导。更妥当的做法是省略 inventoryLevel,只保留 availability: InStock(表示可买),或者根据真实的库存追踪数据动态输出真实数字


6. shippingDetails 部分

shippingDetails 告诉搜索引擎关于运费与运输时长的信息:

  • shippingRate: 运费(为 0 表示免运费)。
  • handlingTime: 订单处理时间(如 5-7 天)。
  • transitTime: 运输时长(如 25-40 天)。
  • shippingDestination: 可配送国家或地区。

这部分信息有助于搜索结果中显示“免费送货”或“配送时间”标注。


7. hasMerchantReturnPolicy 部分

该部分用于说明退货规则:

  • merchantReturnDays: 支持退货的天数。
  • returnMethod: 退货方式(邮寄退货、线下退货等)。
  • returnFees: 谁承担退货费用。
  • refundType: 支持退款或换货。

明确的退货信息不仅能增强用户信任,也会获得 Google 的“退货信息富结果(Return policy rich result)”。


四、验证与优化建议

  1. 使用 Rich Results Test 检查结构是否合规。
  2. 确保价格、描述等字段与页面实际内容一致。
  3. 对每个产品页生成独立 JSON-LD,避免重复标识。
  4. 对价格有效期、评论数量等定期更新。
  5. 产品结构化数据 google schema详情

五、总结

高质量的结构化数据能显著提升网站的搜索引擎识别度与点击率。 通过合理配置 WebPageProductOffer 三个模块,结合库存、配送、退货等关键信息,你的产品页面不仅能在搜索结果中获得更丰富的展示形式,也能传递出更专业的品牌形象。

我的头像

Hi~我是安然 ✨

这是我的小小角落,记录代码、生活和灵感碎片 💻🍃。 我喜欢探索前端的无限可能,也会偶尔写写随笔~ 希望这里能成为我们交流与分享的温暖空间 💖。