Event Schema Markup: JSON-LD Example and API
Event structured data describes a concert, conference, meetup, or other event with its dates, venue, and tickets. Google can show eligible events in its event search experience.
JSON-LD Example
Unhead renders this JSON-LD for an in-person event with a venue, an organizer, and a free ticket offer. It expands eventStatus and eventAttendanceMode to full Schema.org URLs.
{
"@context": "https://schema.org",
"@graph": [
{
"@id": "https://example.com/blog/my-article#event",
"@type": "Event",
"description": "An evening of talks about Vue.js and Nuxt.",
"endDate": "2027-03-18T21:00:00+11:00",
"eventAttendanceMode": "https://schema.org/OfflineEventAttendanceMode",
"eventStatus": "https://schema.org/EventScheduled",
"inLanguage": "en-AU",
"name": "Vue.js Meetup Sydney",
"startDate": "2027-03-18T18:00:00+11:00",
"image": {
"@id": "https://example.com/#/schema/image/1"
},
"location": {
"@type": "Place",
"name": "Harbour Conference Centre",
"address": {
"@type": "PostalAddress",
"streetAddress": "1 Harbour St",
"addressLocality": "Sydney",
"postalCode": "2000",
"addressRegion": "NSW",
"addressCountry": "AU"
}
},
"offers": {
"@type": "Offer",
"availability": "https://schema.org/InStock",
"price": 0,
"priceCurrency": "AUD",
"url": "https://example.com/tickets",
"priceValidUntil": "2027-12-30T00:00:00.000Z"
},
"organizer": {
"@id": "https://example.com/#/schema/organization/1"
}
},
{
"@id": "https://example.com/#/schema/organization/1",
"@type": "Organization",
"name": "Vue Sydney",
"url": "https://example.com"
},
{
"@id": "https://example.com/#/schema/image/1",
"@type": "ImageObject",
"contentUrl": "https://example.com/photos/meetup.jpg",
"inLanguage": "en-AU",
"url": "https://example.com/photos/meetup.jpg"
}
]
}
Schema.org Event
- Type:
defineEvent<T extends Record<string, any>>(input?: Event & T)
Describes an Event.
Useful Links
Unhead supports Schema.org online and mixed-attendance events. Google's event search experience currently requires an event at a physical location that is bookable by the general public.
For that Google feature, the rendered Event must include name, startDate, and a physical Place with an address. A Schema.org-valid virtual-only Event is not eligible. Unhead accepts and resolves both forms but does not enforce Google's requirements.
Examples
defineEvent({
name: 'The Adventures of Kira and Morrison',
location: [
'https://operaonline.stream5.com/',
definePlace({
name: 'Snickerpark Stadium',
address: {
streetAddress: '100 West Snickerpark Dr',
addressLocality: 'Snickertown',
postalCode: '19019',
addressRegion: 'PA',
addressCountry: 'US',
},
}),
],
image: [
'https://example.com/photos/1x1/photo.jpg',
'https://example.com/photos/4x3/photo.jpg',
'https://example.com/photos/16x9/photo.jpg',
],
organizer: defineOrganization({
name: 'Kira and Morrison Music',
url: 'https://kiraandmorrisonmusic.com',
}),
performer: {
'@type': 'PerformingGroup',
'name': 'Kira and Morrison',
},
offers: {
price: 30,
url: 'https://www.example.com/event_offer/12345_201803180430',
validFrom: new Date(Date.UTC(2026, 5, 21, 12)),
},
description: 'The Adventures of Kira and Morrison is coming to Snickertown in a can\'t miss performance.',
startDate: '2027-07-21T19:00-05:00',
endDate: '2027-07-21T23:00-05:00',
eventStatus: 'EventScheduled',
eventAttendanceMode: 'MixedEventAttendanceMode',
})
Import definePlace and defineOrganization with defineEvent in this example. Nested helpers select the correct resolver when a relation accepts more than one node type.
Defaults and resolves
@typedefaults toEvent, and@iddefaults to${canonicalUrl}#event.name,description,image, andinLanguagecan be inherited from resolved page metadata.organizer,performer, andoffersuse their corresponding nested resolvers.eventAttendanceModeandeventStatusare expanded to full Schema.org URLs.- Event date fields accept JavaScript Date objects. Midnight values are serialized as calendar dates unless
eventStatusisEventMovedOnline; dates for moved-online events are serialized as ISO 8601 date-times.
Types
type EventAttendanceModeTypes = 'OfflineEventAttendanceMode' | 'OnlineEventAttendanceMode' | 'MixedEventAttendanceMode'
type EventStatusTypes = 'EventCancelled' | 'EventMovedOnline' | 'EventPostponed' | 'EventRescheduled' | 'EventScheduled'
export interface EventSimple extends Thing {
/**
* Description of the event.
* Describe all details of the event to make it easier for users to understand and attend the event.
*/
description?: string
/**
* The end date and time of the item (in ISO 8601 date format).
*/
endDate?: ResolvableDate
/**
* The eventAttendanceMode of an event indicates whether it occurs online, offline, or a mix.
*/
eventAttendanceMode?: OptionalSchemaOrgPrefix<EventAttendanceModeTypes>
/**
* An eventStatus of an event represents its status; particularly useful when an event is canceled or rescheduled.
*/
eventStatus?: OptionalSchemaOrgPrefix<EventStatusTypes>
/**
* Repeated ImageObject or URL
*
* URL of an image or logo for the event or tour.
* Including an image helps users understand and engage with your event.
* We recommend that images are 1920px wide (the minimum width is 720px).
*/
image?: NodeRelations<ImageObject | string>
/**
* The location of the event.
* There are different requirements depending on if the event is happening online or at a physical location
*/
location?: NodeRelations<Place | VirtualLocation | string>
/**
* An offer to provide this item—for example, an offer to sell a product,
* rent the DVD of a movie, perform a service, or give away tickets to an event.
* Use businessFunction to indicate the kind of transaction offered, i.e. sell, lease, etc.
* This property can also be used to describe a Demand.
* While this property is listed as expected on a number of common types, it can be used in others.
* In that case, using a second type, such as Product or a subtype of Product, can clarify the nature of the offer.
*/
offers?: NodeRelations<Offer | string>
/**
* An organizer of an Event.
*/
organizer?: NodeRelation<Identity>
/**
* A performer at the event—for example, a presenter, musician, musical group or actor.
*/
performer?: NodeRelation<Person>
/**
* Used in conjunction with eventStatus for rescheduled or canceled events.
* This property contains the previously scheduled start date.
* For rescheduled events, the startDate property should be used for the newly scheduled start date.
* In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated.
*/
previousStartDate?: ResolvableDate
/**
* The start date and time of the item (in ISO 8601 date format).
*/
startDate?: ResolvableDate
/**
* The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format.
*/
duration?: string
/**
* Indicates whether an event is accessible for free.
*/
isAccessibleForFree?: boolean
/**
* The total number of individuals that may attend an event or venue.
*/
maximumAttendeeCapacity?: number
}
Related Schemas
- Organization: Event organizer
- Person: Event performer
- LocalBusiness: Event venue
EmployerAggregateRating Schema
Add Google employer rating structured data with defineEmployerAggregateRating(), including the reviewed organization and aggregate score.
Food Establishment Schema
Use defineFoodEstablishment() to describe a food-related business, including its menu, reservations, cuisine, address, and opening hours.