LocalBusiness Schema: A Copy-Paste Example for Restaurants and Cafés
This is a working example you can copy, edit and paste into your own site. It's built from schema.org's type definitions and Google's structured data documentation, and it flags the small mistakes that break this kind of markup.
Which type to use
Use Restaurant for a restaurant or CafeOrCoffeeShop for a café. Both are types of LocalBusiness. A restaurant can also name its cuisine, menu and whether it takes bookings. See schema.org for the full list of fields.
People may ask when you close, what you serve or whether they need to book. Put those facts on your page first. The code below labels the same facts so software can read them.
What's required versus what's recommended
Google asks for a business name and address for its local business search feature. It also suggests hours, phone, a map point, a price range and a web link. Check the current Google Search Central guide before you publish.
The example
EXAMPLE. This is a fictional business. Replace every placeholder with your own details before publishing.
Paste this inside your homepage's <head>, and replace every value with your own real information:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Restaurant",
"name": "Example Name Restaurant",
"url": "https://example.com/restaurant",
"telephone": "+1-217-555-0109",
"priceRange": "$$",
"servesCuisine": ["Italian", "Pizza"],
"acceptsReservations": true,
"address": {
"@type": "PostalAddress",
"streetAddress": "[your street]",
"addressLocality": "[your town]",
"addressRegion": "[your state]",
"postalCode": "[your postal code]",
"addressCountry": "US"
},
"openingHoursSpecification": [
{
"@type": "OpeningHoursSpecification",
"dayOfWeek": ["Tuesday", "Wednesday", "Thursday", "Sunday"],
"opens": "11:00",
"closes": "21:00"
},
{
"@type": "OpeningHoursSpecification",
"dayOfWeek": ["Friday", "Saturday"],
"opens": "11:00",
"closes": "22:00"
}
]
}
</script>
For a café, change "@type": "Restaurant" to "@type": "CafeOrCoffeeShop" and drop acceptsReservations if it doesn't apply.
Mistakes that break this
These are common mistakes to check before publishing:
- Address as a plain string instead of a
PostalAddressobject."address": "[your street], [your town], [your state]"is valid JSON, but tools may not read the street, city and ZIP as separate facts. Use the fields shown above. - Hours as a loose string.
"openingHours": "Mon-Fri 9-5"can work, but Google suggestsopeningHoursSpecification. It gives each day and time its own field. - Phone number on the wrong node. If the phone sits in a different code block, the business block may have no
telephonefield. A tool that reads that block may miss the number. - Copy-pasting another business's schema and forgetting to change every field. Check the address, phone and map point before you post the code. Remove all sample facts.
How to check your work
Check two things before you post the code. First, paste the code into a JSON test tool. A stray quote or comma can break it. Next, check that each field has the right fact for your shop. Do not leave sample facts in it. Our free checker reads the live page and shows which fields it finds. Google also has tools you can use to check the code.
Google says valid code can help a page show in search, but it does not promise that it will (Google Search Central). Clear business facts help tools read your page.
Check my business, free for a one-page check of what nearby customers are told.