---
title: Structured data for a restaurant website, copy and paste · The Direct Index
url: https://directindex.org/guides/structured-data-restaurant
---

[The Direct Index](https://directindex.org/)
[Scanner](https://directindex.org/scan)[Cities](https://directindex.org/cities)[Guides](https://directindex.org/guides)[Why](https://directindex.org/why)[Method](https://directindex.org/methodology)[About](https://directindex.org/about)

Guide

# Structured data for a restaurant website, copy and paste

Structured data is a short block of JSON in the page that states the facts an assistant needs: who you are, where, when you are open, what you serve, where the menu is, whether you take bookings. It is the single cheapest fix on this site and the one every assistant reads first.

## The block

Replace the values, keep the keys. One block on the homepage is enough.

```
&lt;script type="application/ld+json"&gt;
{
 "@context": "https://schema.org",
 "@type": "Restaurant",
 "name": "Your Business",
 "url": "https://yourbusiness.com/",
 "telephone": "+351 21 000 0000",
 "address": {
 "@type": "PostalAddress",
 "streetAddress": "Rua Exemplo 1",
 "addressLocality": "Lisbon",
 "postalCode": "1100-000",
 "addressCountry": "PT"
 },
 "openingHoursSpecification": [
 { "@type": "OpeningHoursSpecification", "dayOfWeek": ["Tuesday","Wednesday","Thursday","Friday","Saturday"], "opens": "12:00", "closes": "23:00" },
 { "@type": "OpeningHoursSpecification", "dayOfWeek": "Sunday", "opens": "12:00", "closes": "16:00" }
 ],
 "servesCuisine": "Portuguese",
 "priceRange": "€€",
 "hasMenu": "https://yourbusiness.com/menu",
 "acceptsReservations": "https://yourbusiness.com/book"
}
&lt;/script&gt;
```

Not a restaurant? Change the type: `HairSalon`, `Dentist`, `Store`, `TouristAttraction`, or `LocalBusiness` when nothing fits, and drop `servesCuisine` and `hasMenu`.

## Where to paste it

| Where your site is built | Where the setting lives, October 2026 |
| --- | --- |
| WordPress | Yoast and Rank Math generate a LocalBusiness block from their Local SEO settings; or paste the block into the header with a code snippets plugin, or the theme's **header scripts** field. |
| Wix | SEO, then **Structured data markup** on the homepage settings, add a custom markup; or Wix's own Restaurant preset, then add the missing fields. |
| Squarespace | Settings, Developer tools, **Code injection**, Header. Squarespace adds a basic block of its own; yours can sit next to it. |
| Shopify | Online Store, Themes, Edit code, **theme.liquid**, before the closing head tag. |
| Webflow | Site settings, **Custom code**, Head code; or on the homepage's page settings. |
| GoDaddy, Jimdo, Duda, Weebly | Look for **header code** or **custom code** in the site settings; where there is none, the host's support can add it. |

Dashboards move things around. If a name here does not match, search the dashboard for the word in bold.

## Check what you wrote

Paste your page address into Google's Rich Results Test or schema.org's validator, then rescan here: the report lists address, phone and hours as found or missing.

## Check it

Already have a block and not sure it is complete? Run the [free scanner](https://directindex.org/scan) on your address: the report names each crawler that was refused, what it found for the menu, the structured data and the booking path, and what to fix first. Rescans are free.

## More guides

- [ChatGPT doesn't show my restaurant. Why, and what to do](https://directindex.org/guides/chatgpt-does-not-show-my-restaurant)
- [Am I blocking ChatGPT, Claude and Perplexity without knowing?](https://directindex.org/guides/blocking-ai-crawlers-without-knowing)
- [robots.txt for AI agents: who to allow, and how](https://directindex.org/guides/robots-txt-for-ai-agents)
- [My menu is a PDF. Can AI assistants read it?](https://directindex.org/guides/menu-pdf-ai)
- [All guides](https://directindex.org/guides)

Updated 2026-10-14. Dashboard names are as of that date.

#### The Direct Index

[Why direct](https://directindex.org/why)[About and principles](https://directindex.org/about)[Methodology](https://directindex.org/methodology)[Privacy](https://directindex.org/privacy)

#### Use it

[Free scanner](https://directindex.org/scan)[City indexes](https://directindex.org/cities)[Guides](https://directindex.org/guides)[Common fixes](https://directindex.org/fix)[What agent-direct means](https://directindex.org/agent-direct)

#### For agents

[llms.txt](https://directindex.org/llms.txt)[llms-full.txt](https://directindex.org/llms-full.txt)[OpenAPI](https://directindex.org/openapi.json)[MCP server](https://directindex.org/.well-known/mcp/server-card.json)[A2A agent](https://directindex.org/.well-known/agent-card.json)

#### Data

[City data, JSON and Markdown](https://directindex.org/cities)[Sitemap](https://directindex.org/sitemap.xml)

Business listings from OpenStreetMap contributors, ODbL. Scores under the same licence.

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://directindex.org/#org","name":"The Direct Index","url":"https://directindex.org/","logo":"https://directindex.org/favicon.svg","founder":{"@type":"Person","name":"Antonio Curado"},"description":"Independent measurement of whether AI agents can find, read and act on a business's own website."},{"@type":"WebSite","@id":"https://directindex.org/#site","url":"https://directindex.org/","name":"The Direct Index","publisher":{"@id":"https://directindex.org/#org"},"inLanguage":"en","potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://directindex.org/scan?url={url}"},"query-input":"required name=url"}},{"@type":"WebAPI","name":"The Direct Index API","url":"https://directindex.org/openapi.json","documentation":"https://directindex.org/llms-full.txt","provider":{"@id":"https://directindex.org/#org"}}]}
{"@context":"https://schema.org","@graph":[{"@type":"Article","@id":"https://directindex.org/guides/structured-data-restaurant#article","headline":"Structured data for a restaurant website, copy and paste","description":"A JSON-LD block with name, address, phone, opening hours, cuisine, menu and bookings, and where to paste it on each site builder.","datePublished":"2026-10-14","dateModified":"2026-10-14","inLanguage":"en","author":{"@id":"https://directindex.org/#org"},"publisher":{"@id":"https://directindex.org/#org"},"mainEntityOfPage":"https://directindex.org/guides/structured-data-restaurant","isPartOf":{"@id":"https://directindex.org/#site"}},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Guides","item":"https://directindex.org/guides"},{"@type":"ListItem","position":2,"name":"Structured data for a restaurant website, copy and paste","item":"https://directindex.org/guides/structured-data-restaurant"}]}]}
```
