TypeScript
Schema

VacationRental Schema

Schema.org VacationRental

  • Type: defineVacationRental(input?: VacationRental)
    Describes a vacation property listing.

Example

defineVacationRental({
  name: 'Beach House',
  identifier: 'beach-house-1',
  image: [
    '/images/beach-house-1.jpg',
    '/images/beach-house-2.jpg',
    '/images/beach-house-3.jpg',
    '/images/beach-house-4.jpg',
    '/images/beach-house-5.jpg',
    '/images/beach-house-6.jpg',
    '/images/beach-house-7.jpg',
    '/images/beach-house-8.jpg',
  ],
  latitude: -38.14992,
  longitude: 144.36172,
  containsPlace: {
    occupancy: {
      value: 5,
    },
    additionalType: 'EntirePlace',
    amenityFeature: {
      name: 'wifi',
      value: true,
    },
    bed: {
      numberOfBeds: 1,
      typeOfBed: 'Queen',
    },
  },
})

Google requires containsPlace, containsPlace.occupancy, identifier, image, name, and a location. Supply the location with either latitude and longitude or a geo object. Google's eligibility policy requires at least eight listing photos even though the TypeScript type only enforces that image is present.

Defaults and resolves

  • @type defaults to VacationRental.
  • @id defaults to ${canonicalUrl}#vacation-rental.
  • Relative image URLs resolve against the configured host.
  • Accommodation, address, brand, coordinates, ratings, and reviews receive their Schema.org types.
  • Review dates serialize to ISO 8601.
  • A root rental references the primary WebPage through mainEntityOfPage.
Did this page help you?