Structured data is a type of code that enables search engines to understand the content of a webpage better. One popular format for structured data is JSON-LD, which stands for JavaScript Object Notation for Linked Data. JSON-LD allows website owners to embed structured data into their HTML code, which can help search engines better understand and categorize their content.
Here are some examples of how structured data can be used with JSON-LD:
- Organization data: If you have a website for your business, you can use structured data to provide information about your organization, including its name, logo, contact information, and social media profiles. Here’s an example of how the JSON-LD code might look:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Organization",
"name": "My Company",
"logo": "http://www.example.com/logo.png",
"url": "http://www.example.com",
"sameAs": [
"http://www.facebook.com/mycompany",
"http://www.twitter.com/mycompany",
"http://plus.google.com/+mycompany"
]
}
</script>
- Product data: If you have an e-commerce website, you can use structured data to provide information about your products, including their name, description, price, and availability. Here’s an example of how the JSON-LD code might look:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Product",
"name": "Red Widget",
"description": "A red widget that does amazing things",
"image": "http://www.example.com/images/red-widget.jpg",
"offers": {
"@type": "Offer",
"priceCurrency": "USD",
"price": "19.99",
"availability": "http://schema.org/InStock"
}
}
</script>
- Article data: If you have a blog or news website, you can use structured data to provide information about your articles, including their title, author, date, and image. Here’s an example of how the JSON-LD code might look:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Article",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "http://www.example.com/article"
},
"headline": "Amazing Article Title",
"image": "http://www.example.com/images/article.jpg",
"author": {
"@type": "Person",
"name": "John Doe"
},
"datePublished": "2022-01-01",
"dateModified": "2022-01-02"
}
</script>
By using structured data with JSON-LD, website owners can provide search engines with valuable information that can help improve their visibility in search results. Search engines like Google use this structured data to generate rich snippets and enhanced search results, including additional information like images, ratings, and prices.