How to set @id

48 views
Skip to first unread message

suzukik

unread,
Jul 9, 2020, 8:09:56 PM7/9/20
to Semantic Search Marketing
Google updated the guidelines for multiple items on a page.

They say as follows:
Note: If there are items that are more helpful when they are linked together (for example, a recipe and a video), use @id in both the recipe and the video items to specify that the video is about the recipe on the page. If you didn't link the items together, Google Search may not know that it can show the video as a Recipe rich result.

Would you tell me how to add @id to the markups? When I publish a recipe on my site (https://example.com/banana-bread)  and markup the SD for Recipe and the SD for Video separately, can I set @id like this:

    <script type="application/ld+json">
    {
      "@context": "https://schema.org/",
      "@type": "Recipe",
      "name": "Banana Bread Recipe",
      "description": "The best banana bread recipe you'll ever find! Learn how to use up all those extra bananas.",
      "aggregateRating": {
        "@type": "AggregateRating",
        "ratingValue": "4.7",
        "ratingCount": "123"
      },
    }
 </script>
 


    <script type="application/ld+json">
    {
      "@context": "https://schema.org/",
        "@type": "VideoObject",
        "name": "How To Make Banana Bread",
        "description": "This is how you make banana bread, in 5 easy steps.",
        "contentUrl": "http://example.com/banana-bread.mp4",
       }
    </script>

Denver Prophit Jr.

unread,
Jul 9, 2020, 8:24:57 PM7/9/20
to Semantic Search Marketing
You're missing many more attributes. But try this:
{
      "@context": "https://schema.org/",
      "@type": "Recipe",
      "name": "Banana Bread Recipe",
      "author": {
        "@type": "Person",
        "name": "Suzy Q Cooking"
        },
      "description": "The best banana bread recipe you'll ever find! Learn how to use up all those extra bananas.",
      "aggregateRating": {
        "@type": "AggregateRating",
        "ratingValue": "4.7",
        "ratingCount": "123"
      },
     "video":  {
      "@type": "VideoObject",
       "name": "How To Make Banana Bread",
       "description": "This is how you make banana bread, in 5 easy steps.",
       "contentUrl": "http://example.com/banana-bread.mp4",
       "thumbnailUrl": [
       ],
      "uploadDate": "2016-03-31T08:00:00+08:00",
      "duration": "PT1M54S"
       }
     }


suzukik

unread,
Jul 9, 2020, 8:33:20 PM7/9/20
to Semantic Search Marketing
I intentionally trimmed some required properties for brevity because they don't matter to my question. I'm asking about how to set @id when I add multiple markups separately. (I already know your example.)

2020年7月10日金曜日 9:24:57 UTC+9 denver....@gmail.com:

jarnovandriel

unread,
Jul 9, 2020, 8:58:00 PM7/9/20
to semantic-sea...@googlegroups.com
Here you go,

<script type="application/ld+json">
 
{
   
"@context": "https://schema.org/",
   "@id": "#BananaBreadRecipe",
   "@type": "Recipe",
   
"name": "Banana Bread Recipe",

   
"description": "The best banana bread recipe you'll ever find! Learn how to use up all those extra bananas.",
   
"image": "http://www.example.com/banana-bread.jpg",
   
"aggregateRating": {
     
"@type": "AggregateRating",
     
"ratingValue": "4.7",
     
"ratingCount": "123"
   
},

   
"mainEntityOfPage": {
     
"@type":"WebPage",

     
"@id": "https://example.com/banana-bread"
   
}
 
}
</script>

<script type="application/ld+json">
{

 
"@context": "https://schema.org/",

 
"@type": "VideoObject",
 
"name": "How To Make Banana Bread",
 
"description": "This is how you make banana bread, in 5 easy steps.",
 
"contentUrl": "http://example.com/banana-bread.mp4",

 
"about": {
   
"@id": "#BananaBreadRecipe"
 
}
}
</script>

jarnovandriel

unread,
Jul 9, 2020, 9:01:15 PM7/9/20
to semantic-sea...@googlegroups.com
Another option would be,

<script type="application/ld+json">
 
{
   
"@context": "https://schema.org/",

   
"@type": "Recipe",
   
"name": "Banana Bread Recipe",
   
"description": "The best banana bread recipe you'll ever find! Learn how to use up all those extra bananas.",
   
"image": "http://www.example.com/banana-bread.jpg",
   
"aggregateRating": {
     
"@type": "AggregateRating",
     
"ratingValue": "4.7",
     
"ratingCount": "123"
   
},
   
"mainEntityOfPage": {
     
"@type":"WebPage",
     
"@id": "https://example.com/banana-bread"

   
},
   
"subjectOf": {
     
"@id": "#BananaBreadVideo"

   
}
 
}
</script>

<script type="application/ld+json">
{
 
"@context": "https://schema.org/",
  "@id":"#BananaBreadVideo",
  "@type": "VideoObject",
 
"name": "How To Make Banana Bread",
 
"description": "This is how you make banana bread, in 5 easy steps.",
 
"contentUrl": "http://example.com/banana-bread.mp4"
}
</script>

suzukik

unread,
Jul 9, 2020, 9:26:50 PM7/9/20
to Semantic Search Marketing
Thanks, Jano. You're always my teacher.😊

I can understand the markups you made for me. But I wonder where I can learn how to use @id appropriately.

Gregg Kellogg

unread,
Jul 10, 2020, 1:08:13 AM7/10/20
to suzukik, Semantic Search Marketing
On Jul 9, 2020, at 6:26 PM, suzukik <i.rando...@gmail.com> wrote:
>
> Thanks, Jano. You're always my teacher.😊
>
> I can understand the markups you made for me. But I wonder where I can learn how to use @id appropriately.

You might want to look at the JSON-LD spec, soon to be an official Recommendation.

https://w3.org/TR/json-ld11

You can find other resources at json-ld.org.

Gregg

> --
> You received this message because you are subscribed to the Google Groups "Semantic Search Marketing" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to semantic-search-ma...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/semantic-search-marketing/553f3c06-8a50-4b3b-b163-38f681d9d95bo%40googlegroups.com.

Jono Alderson

unread,
Jul 10, 2020, 2:43:44 AM7/10/20
to Semantic Search Marketing
See also, https://developer.yoast.com/features/schema/technology-approach#ids-relationships-and-nesting

On Friday, 10 July 2020 06:08:13 UTC+1, Gregg Kellogg wrote:
On Jul 9, 2020, at 6:26 PM, suzukik <i.rand...@gmail.com> wrote:
>
> Thanks, Jano. You're always my teacher.😊
>
> I can understand the markups you made for me. But I wonder where I can learn how to use @id appropriately.

You might want to look at the JSON-LD spec, soon to be an official  Recommendation.

https://w3.org/TR/json-ld11

You can find other resources at json-ld.org.

Gregg

> --
> You received this message because you are subscribed to the Google Groups "Semantic Search Marketing" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to semantic-search-marketing+unsub...@googlegroups.com.

Tony McCreath

unread,
Jul 10, 2020, 6:56:39 AM7/10/20
to Semantic Search Marketing
I've already sent feedback on that new documentation. I think it will cause more confusion. I encourage all to send feedback.

jarnovandriel

unread,
Jul 10, 2020, 7:05:52 AM7/10/20
to Semantic Search Marketing
As an additional note, for JSON-LD you can use @id, for RDFa you can use the 'resource' attribute and for microdata you can use the 'itemid' attribute to specify the (fragment) identifier of an entity. Meaning that if you want to learn more about using identifiers to chain pieces of structured data together you can also look into those attributes.

Mike Arnesen wrote an article about itemid some years ago: https://moz.com/blog/search-marketers-guide-to-itemref-itemid (itemref doesn't exist in JSON-LD nor RDFa though, so read past that).

jarnovandriel

unread,
Jul 10, 2020, 10:32:17 AM7/10/20
to Semantic Search Marketing

Tony McCreath

unread,
Jul 10, 2020, 3:53:36 PM7/10/20
to Semantic Search Marketing
I've escalated it to make sure Googlers take a look :-)

On Saturday, 11 July 2020 00:02:17 UTC+9:30, jarnovandriel wrote:

Dan Brickley

unread,
Jul 10, 2020, 5:31:46 PM7/10/20
to Tony McCreath, Semantic Search Marketing
We're certainly discussing these issues! Schema.org was designed to make semantic markup easier, and ideally it gets easier still over time rather than more confusing...

--
You received this message because you are subscribed to the Google Groups "Semantic Search Marketing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semantic-search-ma...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/semantic-search-marketing/b4976f3c-3804-4d91-bda0-2800df9ae590o%40googlegroups.com.

Jay Gray

unread,
Jul 10, 2020, 9:57:40 PM7/10/20
to Dan Brickley, Tony McCreath, Semantic Search Marketing
apologize for hijacking this thread, but want to raise an issue WRT schema.org, Google SDTT and Google RRT.
We have a large number of schema.org JSON-LD structures that are valid on SDTT.
About 80% fail on RRT.

New feature/function may be in plan for RRT.
But until RRT is a complete superset of SDTT, we're hoping that Google does not deprecate SDTT.

Not sure how best to raise this issue with Google, so jumped this thread to try to bring attention to the disconnect between SDTT and RRT.

/jay gray



suzukik

unread,
Jul 11, 2020, 2:21:28 AM7/11/20
to Semantic Search Marketing
Hi Jano & Dan,

I have a question about the two examples Jano made. As for the first one, Recipe is nested in VideoObject. Whereas, as for the second one, VideoObject is nested in Recipe. I know the reason. But do you think there're any differences between them from Google Search POV?

P.S. Naturally, RRT returns the same results.


▼1st example 

nest1.png



▼2nd example
 

nest2.png





2020年7月11日(土) 6:31 Dan Brickley <dan...@danbri.org>:
You received this message because you are subscribed to a topic in the Google Groups "Semantic Search Marketing" group.
To unsubscribe from this group and all its topics, send an email to semantic-search-ma...@googlegroups.com.

2020年7月11日土曜日 6時31分46秒 UTC+9 Dan Brickley:
We're certainly discussing these issues! Schema.org was designed to make semantic markup easier, and ideally it gets easier still over time rather than more confusing...
On Fri, 10 Jul 2020 at 20:53, Tony McCreath <to...@websiteadvantage.com.au> wrote:
I've escalated it to make sure Googlers take a look :-)

On Saturday, 11 July 2020 00:02:17 UTC+9:30, jarnovandriel wrote:

--
You received this message because you are subscribed to the Google Groups "Semantic Search Marketing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semantic-search-marketing+unsub...@googlegroups.com.

jarnovandriel

unread,
Jul 11, 2020, 8:19:29 AM7/11/20
to semantic-sea...@googlegroups.com
In theory the order of things shouldn't make any difference as the order/hierarchy of graphs doesn't matter. And especially when one provides an entry point for a graph like you can do with /mainEntityOfpage. In regards to the examples I provided this means that no matter the order of the graph is in, the /Recipe will be considered as the 'leading' entity (so to say), even if it's nested under the /VideoObject due to the /Recipe being the main entity of the page. 

suzukik

unread,
Jul 11, 2020, 9:40:12 PM7/11/20
to Semantic Search Marketing
Thank you for elaborating, Jano!
Reply all
Reply to author
Forward
0 new messages