How do I write Google structured data for real estate listings?
To list it as House:
<script type="application/ld+json">
{ "@context":"Home - schema.org",
"@type":"House", "numberOfRooms": "2 ROM",
"petsAllowed": "YES",
"address":
{
"@type": "PostalAddress",
"addressCountry": "India",
"addressLocality": "Palayam, Trivandrum",
"addressRegion": "Kerala",
"postalCode": "695034"
},
"aggregateRating":
{
"@type": "AggregateRating",
"ratingValue": "5",
"reviewCount": "10"
},
"photo":
{
"@type": "ImageObject",
"url": "image url" },
"description": "property description goes here",
"name": "Property Name",
"url": "url of the property"
} </script>
For Single Family Residence (1BHK):
<script type="application/ld+json">
{
"@context":"http://schema.org",
"@type":"SingleFamilyResidence",
"numberOfRooms": "1 ROM",
"petsAllowed": "YES",
"address": {
"@type": "PostalAddress",
"addressCountry": "India",
"addressLocality": "Palayam,
Trivandrum", "addressRegion": "Kerala",
"postalCode": "695034"
},
"aggregateRating":
{ "@type": "AggregateRating",
"ratingValue": "5",
"reviewCount": "10"
},
"photo":
{ "@type": "ImageObject",
"url": "image url"
},
"description": "property description goes here",
"name": "Property Name",
"url": "url of the property"
}
</script>
For Apartments:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Apartment",
"address":
{ "@type": "PostalAddress",
"addressCountry":"India",
"addressLocality":"Palayam",
"addressRegion":"Trivandrum, Kerala"
},
"Description":"property description should be here", "image":"https://static.pexels.com/photos/248797/pexels-photo-248797.jpeg",
"name":"Property Name",
"numberOfRooms":"3",
"telephone":"1234567890",
"url":"http://site.com/url"
}
</script>