自 Google 更新以来结构化数据(报价)无效:应提供报价或评论或聚合评级之一

Invalid structured data (offer) since Google Update : one of offers or review or aggregateRating should be provided

我有以下结构化数据:

{
  "@context": "https://schema.org/",
  "@type": "Offer",
  "priceCurrency": "EUR",
  "price": "12890",
  "availability": "https://schema.org/InStock",
  "priceValidUntil": "2019-12-13",
  "itemOffered": {
    "@type": "Car",
    "brand": {
      "@type": "Brand",
      "name": "Renault"
    },
    "manufacturer": {
      "@type": "Corporation",
      "sameAs": "https://www.wikidata.org/wiki/Q6686",
      "name": "Renault"
    },
    "name": "Renault Captur Life",
    "model": "Captur Life",
    "image": "https://www.xxxx.fr/uploads/models/renault-captur.png",
    "description": "Renault Captur Life neuve - Essence - 90cv - 5 portes : 12 890€ ",
    "fuelType": "Essence",
    "vehicleTransmission": "Manuelle",
    "vehicleConfiguration": "0.9 tce 90 bvm5",
    "numberOfDoors": "5",
    "vehicleEngine": {
      "@type": "EngineSpecification",
      "enginePower": {
        "@type": "QuantitativeValue",
        "value": "90",
        "unitCode": "N12"
      }
    },
    "itemCondition": "https://schema.org/NewCondition"
  }
}

根据Google Structured Data Testing Tool,有一个问题(这是最近的更新,我的结构化数据曾经有效):

One of offers or review or aggregateRating should be provided.

根据Rich Snippets Testing Tool,有效。

这是怎么回事?为什么我必须添加 offersreviewaggregateRating

当人们按照您的方式构建数据时,此更改会导致该错误消失。即要约作为主要实体。如果你翻转你的标记,那么它是一个提供报价的产品,错误应该消失。两种方式都是有效的,第二种方式符合谷歌的例子和他们的测试工具报告的内容。

为了扩展 Tony 的回答,Offer 应该是 Car (Product) 的扩展。 Product 可以嵌套在 Offer () 中,但这看起来不像你在这里想要的那样。

将您的 JSON-LD 修改为此将使事情有效(就 Googles Structured Data Testing Tool 而言):

{
  "@context": "https://schema.org/",
  "@type": "Car",
  "fuelType": "Essence",
  "model": "Captur Life",
  "name": "Renault Captur Life",
  "description": "Renault Captur Life neuve - Essence - 90cv - 5 portes : 12 890€ ",
  "vehicleEngine": {
      "@type": "EngineSpecification",
      "enginePower": {
          "@type": "QuantitativeValue",
          "value": "90",
          "unitCode": "N12"
      }
   },
   "manufacturer": {
       "@type": "Corporation",
       "sameAs": "https://www.wikidata.org/wiki/Q6686",
       "name": "Renault"
   },
   "image": "https://www.xxxx.fr/uploads/models/renault-captur.png",
   "vehicleTransmission": "Manuelle",
   "vehicleConfiguration": "0.9 tce 90 bvm5",
   "numberOfDoors": "5",
   "brand": {
       "@type": "Brand",
       "name": "Renault"
   },
   "offers": [{
       "@type": "Offer",
       "price": "12890",
       "priceCurrency": "EUR",
       "availability": "https://schema.org/InStock",
       "priceValidUntil": "2019-12-13"
    }],
    "itemCondition": "https://schema.org/NewCondition"
  }
}

在这种情况下,我们将 Offer 嵌套在 Car 中,以便 Car 描述有关车辆的所有内容,嵌套的 Offer 描述如何购买。

我注意到,在撰写本文时,Rich Snippets Testing Tool 仍处于测试阶段,因此我对其结果持保留态度。你可能会争辩说,因为它是一个新工具,它可能更符合 Google 对 Rich Snippets 所做的工作。但在你的情况下,我相信结构化数据测试工具的期望是有道理的。