Skip to main content

Fix Invalid Object Type for Field: 8 Mistyped Objects, 1 Script

Invalid object type for field means a nested @type isn't one Google accepts there, like brand typed as Thing. 8 common mistypes and a script to find them.

• • 11 min read
Dashboard cover for a post on fixing Invalid object type for field in Search Console: read the field, find the nested @type, swap it for an accepted type, and validate

TL;DR — Invalid object type for field is a Search Console issue where a property in your structured data holds a nested object with an @type Google doesn’t accept for that property: brand typed as Thing, a Review author typed as WebSite, a breadcrumb item typed as WebPage instead of ListItem. The fix is to change that one @type to the type Google’s documentation lists for the field. I planted 8 common mistypes in test pages and a 60-line checker caught all 8 while passing 4 valid controls, including a subtype case that trips people up.

This error is easy to misread because the JSON is valid and the field is spelled right. The value is just the wrong kind of thing, and Google won’t use a field it can’t interpret.

What Does Invalid Object Type for Field Mean?

Invalid object type for field is a Search Console structured data issue: a property holds a nested object whose @type isn’t one of the types Google accepts for that property. The message names the field, for example Invalid object type for field "brand".

Google’s rich result error list defines it in one line: “Wrong structured data object type for the specified property.” The suggested fix is just as short: “Refer to documentation to find and use the data type expected for this property.”

It sits in a family of similar messages, and the names matter:

MessageWhat’s wrongExample
Invalid object type for fieldNested object has the wrong @type"brand": {"@type": "Thing"}
Invalid value type for fieldValue is the wrong primitive or shapeA string where a number is expected
Invalid value in fieldRight type, value out of rangeA rating outside bestRating
Missing fieldRequired property absent or emptyNo item on a breadcrumb
Unparsable structured dataJSON or microdata couldn’t be readA trailing comma

Severity depends on the field. If the field is required for the rich result type, the item becomes invalid and loses eligibility. If it’s recommended, the item usually stays valid and Google ignores that field. Either way you lose something you marked up on purpose.

Which Object Types Does Each Field Accept?

The accepted types come from Google’s per-feature docs, not from one list. These are the fields that produce this error most often, with the type Google documents for each:

ParentFieldGoogle acceptsCommon wrong @type
ProductbrandBrand or OrganizationThing
ProductoffersOffer or AggregateOffer (merchant listings: Offer only)Product, AggregateOffer on merchant listings
ProductaggregateRatingAggregateRatingRating
ReviewauthorPerson or OrganizationThing, WebSite
ReviewitemReviewed17 types, from Book to SoftwareApplicationWebPage, Thing
ArticleauthorPerson or OrganizationWebSite, Thing
BreadcrumbListitemListElementListItemWebPage, Thing
FAQPage → QuestionacceptedAnswerAnswerQuestion
OffershippingDetailsOfferShippingDetailsOffer

Thing is the most common offender in fields that expect something specific. It’s the root of the whole schema.org vocabulary, so a theme that doesn’t know what something is often falls back to it. Google’s Article docs say it directly: “Use the Person type for people, and the Organization type for organizations.” And: “Don’t use the Thing type.”

The brand: Thing case is the one with the longest paper trail. A 2021 Shopify community thread reports Invalid Object Type for Field "brand" on a store theme, and a NameHero write-up traced the same warning to a plugin emitting brand as Thing. Changing it to Brand cleared it.

Map of eight wrong object types to the type each field accepts: Product brand from Thing to Brand, Review author from Thing to Person, itemReviewed from WebPage to Product, breadcrumb itemListElement from WebPage to ListItem, aggregateRating from Rating to AggregateRating, FAQ acceptedAnswer from Question to Answer, Article author from WebSite to Organization, and shippingDetails from Offer to OfferShippingDetails

Why Does a Subtype Pass but a Parent Type Fail?

A schema.org subtype is accepted anywhere its parent is expected, but a parent is never accepted where a subtype is expected. This is the rule behind most of the confusing cases.

Two examples from the test set:

  • Passes: a Review with itemReviewed typed Restaurant. Restaurant isn’t in Google’s list of 17 types, but it’s a subtype of LocalBusiness, which is. A restaurant is a local business.
  • Fails: a Product with aggregateRating typed Rating. AggregateRating is a subtype of Rating, not the other way round. A plain rating isn’t an aggregate one, so the field rejects it.

The second case is a real copy-paste bug. Review markup uses reviewRating: {"@type": "Rating"}, and the shape looks identical to an aggregate. Copy it into aggregateRating, add reviewCount, and you get this error.

Diagram of the type check Google applies to a nested object: the parent type and field name select a list of accepted types, the object passes if its @type is one of them or a subtype of one, so Restaurant passes for itemReviewed through LocalBusiness while Rating fails for aggregateRating because it is the parent of AggregateRating, not a subtype

How to Fix Invalid Object Type for Field in 6 Steps

  1. Read the field name and the parent type. Open the issue in the rich result report (Product snippets, Merchant listings, Review snippets, Breadcrumbs). The field alone isn’t enough. The same field name can accept different types under different parents, so note which item it’s inside.

  2. Look at the emitted JSON-LD, not the template. Run one affected URL through the Rich Results Test or URL Inspection → View tested page. Copy the nested object exactly as Google saw it. Plugins and apps inject markup your templates don’t show.

  3. Look up the accepted types. Open the Google doc for that feature and find the property row. Use the table above as a shortcut, but trust the doc when they disagree.

  4. Find who emits the wrong @type. Search your theme, plugin settings and app output for the bad string, such as "@type": "Thing". If two plugins emit the same Product, remove one; you’ll often find the mistyped copy is the duplicate.

  5. Change the @type, not the shape. Usually the properties are fine and only the type is wrong:

    JSON
    "brand": { "@type": "Brand", "name": "Acme" },
    "author": { "@type": "Person", "name": "Ana Ruiz", "url": "https://example.com/ana" },
    "itemListElement": [{ "@type": "ListItem", "position": 1, "name": "Home", "item": "https://example.com/" }]
  6. Validate one URL, then the report. Rerun the Rich Results Test until the item shows no issues, deploy the template change, then press Validate Fix once in Search Console.

A 60-Line Script That Finds Mistyped Objects

The Rich Results Test checks one URL at a time. This script checks every HTML file you give it, so you can run it over a build directory or a folder of saved pages before Google ever sees them. It needs Node 18+ and nothing else.

JavaScript
// check-object-types.mjs: flag nested JSON-LD objects whose @type a field doesn't accept.
// Usage: node check-object-types.mjs page.html [more.html ...]
import { readFileSync } from 'node:fs';

// Field -> accepted @types, per parent type (from Google's rich result docs).
const EXPECTED = {
  Product: { brand: ['Brand', 'Organization'], offers: ['Offer', 'AggregateOffer'],
             aggregateRating: ['AggregateRating'], review: ['Review'] },
  Review: { author: ['Person', 'Organization'], reviewRating: ['Rating'],
            itemReviewed: ['Book', 'Course', 'CreativeWorkSeason', 'CreativeWorkSeries',
              'Episode', 'Event', 'Game', 'HowTo', 'LocalBusiness', 'MediaObject', 'Movie',
              'MusicPlaylist', 'MusicRecording', 'Organization', 'Product', 'Recipe',
              'SoftwareApplication'] },
  Article: { author: ['Person', 'Organization'], publisher: ['Organization', 'Person'] },
  BreadcrumbList: { itemListElement: ['ListItem'] },
  FAQPage: { mainEntity: ['Question'] },
  Question: { acceptedAnswer: ['Answer'] },
  Offer: { shippingDetails: ['OfferShippingDetails'],
           hasMerchantReturnPolicy: ['MerchantReturnPolicy'] },
};
// Parent aliases and the handful of schema.org subtypes that matter here.
const PARENT = { BlogPosting: 'Article', NewsArticle: 'Article', TechArticle: 'Article' };
const SUBTYPES = {
  Organization: ['LocalBusiness', 'Corporation', 'NGO', 'EducationalOrganization'],
  LocalBusiness: ['Restaurant', 'Store', 'Dentist', 'Hotel', 'AutoRepair'],
  Rating: ['AggregateRating', 'EndorsementRating'],
  Article: ['BlogPosting', 'NewsArticle', 'TechArticle'],
};
const isA = (t, want) => t === want || (SUBTYPES[want] || []).some((s) => isA(t, s));

function* walk(node, path) {
  if (Array.isArray(node)) { for (const [i, n] of node.entries()) yield* walk(n, `${path}[${i}]`); return; }
  if (!node || typeof node !== 'object') return;
  if (node['@graph']) yield* walk(node['@graph'], `${path}@graph`);
  const types = [].concat(node['@type'] || []);
  for (const t of types) {
    const rules = EXPECTED[PARENT[t] || t] || {};
    for (const [field, accepted] of Object.entries(rules)) {
      for (const v of [].concat(node[field] ?? [])) {
        if (!v || typeof v !== 'object') continue; // strings/URLs are a different error
        const got = [].concat(v['@type'] || []);
        if (!got.length) { yield { path: `${path}.${field}`, field, got: '(none)', accepted }; continue; }
        if (!got.some((g) => accepted.some((a) => isA(g, a))))
          yield { path: `${path}.${field}`, field, got: got.join(','), accepted };
      }
    }
  }
  for (const [k, v] of Object.entries(node)) if (!k.startsWith('@')) yield* walk(v, `${path}.${k}`);
}

let bad = 0, blocks = 0;
for (const file of process.argv.slice(2)) {
  const html = readFileSync(file, 'utf8');
  const re = /<script[^>]*type=["']?application/ld+json["']?[^>]*>([sS]*?)</script>/gi;
  for (const m of html.matchAll(re)) {
    blocks++;
    let data; try { data = JSON.parse(m[1]); } catch { console.log(`${file}: unparsable block (fix that first)`); bad++; continue; }
    for (const p of walk(data, '$')) {
      bad++;
      console.log(`${file}: Invalid object type for field "${p.field}" at ${p.path}: got ${p.got}, expected ${p.accepted.join(' | ')}`);
    }
  }
}
console.log(`${blocks} JSON-LD blocks, ${bad} problem(s)`);
process.exitCode = bad ? 1 : 0;

Run it as node check-object-types.mjs build/**/*.html (or find build -name '*.html' | xargs node check-object-types.mjs). It exits non-zero on any finding, so it drops straight into CI. Two honest limits: the subtype map only covers the subtypes listed, and the EXPECTED table only covers the fields above. Add rows for any other type you emit.

What Did the Checker Find?

Planted failures. I wrote 12 one-block HTML pages: the 8 mistypes from the map above, plus 4 controls that must pass (a Restaurant as itemReviewed, a fully typed Product, a @graph with a BlogPosting and a BreadcrumbList, and brand as a plain string). The script flagged all 8 failures with the right field and path, including the nested $.mainEntity[0].acceptedAnswer and $.offers.shippingDetails. It passed all 4 controls. Zero false positives, zero misses.

This site. I ran the same script over this site’s prerendered build: 706 HTML files, 704 of them carrying JSON-LD, 2,326 blocks in total. It found 0 problems. The interesting number is that the build contains 1,492 objects typed Thing, and none of them is an error. They sit in BlogPosting.about (one per tag) and in ListItem.item on collection pages, and schema.org gives both fields a range of Thing. Thing isn’t banned. It’s wrong only where a field expects something narrower.

Results of running check-object-types.mjs on December 1, 2026: all 8 planted mistyped objects were caught and all 4 valid controls passed, and the same script over umesh-malik.com's 706 prerendered pages found 2,326 JSON-LD blocks and 0 problems, even though 1,492 objects are typed Thing in fields that accept Thing

The design choice that keeps this site clean is boring: all JSON-LD comes from typed builder functions in one file, not from template strings scattered across pages. A builder for BlogPosting can only produce a Person author, so there’s no page where someone typed Thing by hand.

What Breaks If You Just Delete the Field?

Deleting the mistyped object makes the issue disappear, and that’s tempting. Don’t do it for required fields. Removing offers from a Product doesn’t fix merchant listings; it swaps this message for a Missing field “offers” error, and the item is still invalid.

For recommended fields, deleting is technically safe but throws away a signal. brand helps Google match a product to the right entity. author with a url is how Google’s Article docs want you to identify who wrote a page. Fix the type; keep the data.

The same goes for the reverse shortcut, collapsing the object to a string. "brand": "Acme" is accepted, but "author": "Ana Ruiz" on a Review loses the Person versus Organization distinction Google’s review snippet docs ask for.

When Is This Error Safe to Ignore?

On a recommended field of a page type you don’t care about for rich results, the issue costs you that field and nothing else. If a third-party widget emits a mistyped Thing on a page with no rich result potential, it can wait.

Fix it now when the field is required for the feature (merchant offers, review itemReviewed, breadcrumb itemListElement), when it sits on revenue pages, or when it’s one template away from fixed, which it usually is.

If it appears alongside other markup issues, work in order. JSON syntax first, because unparsable structured data hides everything inside the block. Then type errors like this one. Then field-level ones like a missing breadcrumb item, a missing hasMerchantReturnPolicy, dates not in ISO 8601 or a duplicate FAQPage field. The rest of this technical SEO series is in the AI search hub.

FAQ

What does Invalid object type for field mean in Search Console?

It means a property in your structured data holds a nested object whose @type Google doesn’t accept for that property. Google’s error list describes it as the wrong structured data object type for the specified property. The message names the field, for example brand, author, itemReviewed or itemListElement, and the fix is to change that object’s @type to one the field expects.

How do I fix Invalid object type for field brand?

Change the nested object’s @type to Brand, or to Organization if the brand is a company. The usual cause is a theme or plugin that emits brand with @type Thing, which schema.org does not allow for brand. A plain text brand name also avoids the error, though a typed Brand object with a name is what Google’s examples use.

Is Invalid object type for field an error or a warning?

It depends on whether the field is required for the rich result type. On a required field like offers in merchant listings, the item is invalid and loses eligibility. On a recommended field like brand, Search Console usually reports it as a non-critical issue, so the item stays valid but the field is ignored.

What is the difference between Invalid object type and Unparsable structured data?

Unparsable structured data means Google could not read the block at all, usually because of a JSON syntax error. Invalid object type for field means the JSON parsed fine and Google understood it, but one nested object has the wrong @type. Fix unparsable blocks first, because nothing inside them is checked until they parse.

Can I use a subtype of the expected type?

Yes. A schema.org subtype is accepted wherever its parent type is expected, so a Restaurant is a valid itemReviewed because Restaurant is a kind of LocalBusiness. The reverse does not hold. Rating is the parent of AggregateRating, so a Rating object in the aggregateRating field fails.

Why does the error point at a field I never wrote?

The markup usually comes from a theme, an SEO plugin or an app, not from your own template. Run the URL through the Rich Results Test and read the emitted JSON-LD, then search your theme and plugin output for the wrong @type string. Disable the duplicate source if two plugins emit the same item.

Sources

  • Google Search Console Help, Rich result error messages and solutions: the definitions of Invalid object type for field, Invalid value type, Invalid value in field and Missing field.

  • Google Search Central, Product snippet structured data: offers, aggregateRating and review types, and Person or Team for reviewer names.

  • Google Search Central, Merchant listing structured data: offers as Offer and shippingDetails as OfferShippingDetails.

  • Google Search Central, Review snippet structured data: author as Person or Organization and the 17 valid itemReviewed types.

  • Google Search Central, Article structured data: use Person and Organization, and don’t use Thing.

  • NameHero, How to fix the invalid object type for brand in schema, October 2021: brand emitted as Thing, fixed by switching to Brand.

  • First-party measurement: check-object-types.mjs run in Node 22 on December 1, 2026 against 12 planted test pages (8 mistyped objects, all caught; 4 valid controls, all passed) and against this site’s prerendered build. The expected-type table follows Google’s documented types; it is not a copy of Google’s internal validator.

Frequently asked questions

Share this article:
X LinkedIn

Google Search · Preferred sources

Prefer this site on Google

If you already read this writing, add umesh-malik.com as a Preferred Source. Google can then highlight it with a preferred badge in Top Stories, AI Overviews, and AI Mode — for you, not as a site-wide ranking boost.

Keep reading

Get new posts on AI, Claude Code & LLMs

New deep-dives on AI engineering, Claude Code, and developer tooling — follow along however you prefer.