Search code examples
google-searchschema.orgjson-ld

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


I have the following piece of structured data :

{
  "@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"
  }
}

According to Google Structured Data Testing Tool, there is a problem (this is a recent update, my structured data used to be valid):

One of offers or review or aggregateRating should be provided.

According to the Rich Snippets Testing Tool, it's valid.

So what's going on here? Why should I have to add offers or review or aggregateRating?


Solution

  • To expand on Tony's answer, Offer should be an extension of Car (Product). Product can be nested within Offer (see this recent question) but that doesn't look like what you want here.

    Modifying your JSON-LD to this will make things valid (as far as Googles Structured Data Testing Tool is concerned):

    {
      "@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"
      }
    }
    

    In this scenario, we nest the Offer in Car so that Car describes everything about the vehicle and the nested Offer describes how it can be purchased.

    I'd note that as of this writing the Rich Snippets Testing Tool is still in beta so I'd take its results with a grain of salt. You could argue since it is a new tool, it might be more in tune with what Google does with Rich Snippets.. but in your case here I believe the expectations from the Structured Data Testing Tool make sense.