Lets say I have a site with a page of 20 products which are fed through an API. The products are loaded using infinity scroll so the initial page render has 5 products tops. Upon scrolling it adds 5 then 5 and so on.
JSON-LD is used to pass information to the search engines/crawlers. So instead of creating a JSON-LD of 5 products that the search engine will find its HTML, I create a JSON-LD of 20 products...with links to the products.
code snippet
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Product",
"description": "Blah blah blah....",
"name": "A product",
"image": "/images/product.jpg",
"offers": {
"@type": "Offer",
"availability": "https://schema.org/InStock",
"price": "20",
"priceCurrency": "USD"
},
"url": "/products/product-name"
}
</script>
.....
Will google follow the links of the products and index? Is it allowed to have a JSON-LD of products for which the crawler cannot find their HTML?
How google says they use JSON-LD from the google developers documentation:
Google uses structured data that it finds on the web to understand the content of the page, as well as to gather information about the web and the world in general. see here