…
Skip to content
Topics
On this page

Schema Markup (Structured Data)

Schema markup is code added to a web page that labels its key facts, such as a business name, address, opening hours or product price, using the shared Schema.org vocabulary. Search engines read these labels as structured data, which helps them understand the page precisely and can make it eligible for rich results in Google.

  • Vocabulary: Schema.org defines hundreds of types, such as LocalBusiness, Product, Event and Article.
  • Format: JSON-LD, a small script block, is the format Google recommends.
  • Purpose: It removes guesswork about what the facts on a page mean.
  • Reward: Eligible pages may show extras such as prices, availability or ratings in search results.
  • Rule: Markup must match what visitors can see on the page and must be true.
Schema markup: JSON-LD on the page turns into facts a search engine can readOn the left, a JSON-LD block on the kirana store's website declares the type GroceryStore, the name Verma Kirana Store, an address in Indore, opening hours, a phone number and accepted payments of cash and UPI. An arrow labelled search engine reads points to the right, where the same facts appear as labelled fields: type, name, area, opening hours and payment methods.JSON-LD on the store's page"@type": "GroceryStore","name": "Verma Kirana Store","address": { ... "Indore" },"openingHoursSpecification": [...],"telephone": "+91-...","paymentAccepted": "Cash, UPI"read byGoogleWhat the search engine understandsTypeGrocery storeNameVerma Kirana StoreAreaVijay Nagar, IndoreOpen8 am to 10 pm, Mon to SatPaysCash and UPISimplified illustration: markup makes a page eligible for rich results, never guaranteed
Schema markup: JSON-LD on the page turns into facts a search engine can read

This tutorial follows one example: a family kirana store in Vijay Nagar, Indore, called Verma Kirana Store here. It has a simple website with its address, timings, a list of staples, and a WhatsApp number for home delivery orders within a few kilometres. The owner wants search engines to read those facts correctly.

Prerequisites for Schema Markup

  • Access: A way to add code to the page's HTML, through the site builder, a plugin or a developer.
  • Facts: The exact business name, address, phone number, opening hours and payment methods, written the same way everywhere.
  • Visibility: Those facts already shown as text on the page, because markup must describe visible content.
  • Profile: A Google Business Profile with matching details, set up as shown in local SEO.
  • Tools: Google's Rich Results Test and the Schema Markup Validator, both available in a browser.

Setup: Choose the Right Schema Type

Pick the most specific type that is true for the page. The store's home page and contact page describe a shop, so the type is GroceryStore, which is a kind of LocalBusiness. Other common choices are listed below.

PageSchema typeUseful properties
Shop, clinic, restaurantLocalBusiness or a subtype such as GroceryStore, Dentist, Restaurantname, address, telephone, openingHoursSpecification, geo
Product pageProduct with Offername, image, description, offers (price, priceCurrency, availability)
Blog postArticle or BlogPostingheadline, author, datePublished, image
Event pageEventname, startDate, location, offers
Every pageBreadcrumbListthe path from the home page to this page

Google supports only some types for rich results, and it has limited or removed rich results for others, such as FAQ and How-to results.

Step-by-Step: Add Schema Markup to a Page

Step 1: Collect the Facts

Write down every fact exactly as it appears on the page: the store name, street address, locality, pin code, phone number, hours for each day, and accepted payments. If the page says "Cash and UPI", the markup should say the same.

Step 2: Write the JSON-LD

Here is valid JSON-LD for the kirana store. Replace every value with your own details.

JSON
{
  "@context": "https://schema.org",
  "@type": "GroceryStore",
  "name": "Verma Kirana Store",
  "description": "Neighbourhood grocery store in Vijay Nagar, Indore, with home delivery on WhatsApp orders.",
  "url": "https://vermakirana.example/",
  "image": "https://vermakirana.example/images/store-front.jpg",
  "telephone": "+91-00000-00000",
  "address": {
    "@type": "PostalAddress",
    "streetAddress": "Shop 12, Scheme No. 54",
    "addressLocality": "Indore",
    "addressRegion": "Madhya Pradesh",
    "postalCode": "452010",
    "addressCountry": "IN"
  },
  "geo": {
    "@type": "GeoCoordinates",
    "latitude": 22.7533,
    "longitude": 75.8937
  },
  "openingHoursSpecification": [
    {
      "@type": "OpeningHoursSpecification",
      "dayOfWeek": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
      "opens": "08:00",
      "closes": "22:00"
    },
    {
      "@type": "OpeningHoursSpecification",
      "dayOfWeek": "Sunday",
      "opens": "09:00",
      "closes": "14:00"
    }
  ],
  "paymentAccepted": "Cash, UPI",
  "currenciesAccepted": "INR",
  "areaServed": "Vijay Nagar, Indore"
}
  • @context and @type: Tell search engines the vocabulary (Schema.org) and what the thing is (a grocery store).
  • address: A nested PostalAddress, with the country as the two-letter code "IN".
  • geo: The shop's latitude and longitude, copied from Google Maps.
  • openingHoursSpecification: One entry per set of days with the same hours, in 24-hour time.

Step 3: Add It to the Page

Place the JSON-LD inside a script tag of type "application/ld+json", usually in the page's head. On WordPress, SEO plugins such as Yoast or Rank Math add LocalBusiness markup through their settings, and many Shopify themes add Product markup to product pages automatically. Check what the platform already outputs before adding your own, to avoid two conflicting blocks.

Step 4: Test the Markup

Paste the page URL into the Rich Results Test. It shows which rich result types the page is eligible for, and lists errors (which must be fixed) and warnings (optional properties that are missing). Use the Schema Markup Validator to check types Google does not show as rich results.

Step 5: Publish and Request Indexing

Publish the change, then use URL Inspection in Google Search Console to request indexing, so Google reads the new markup sooner.

Step 6: Monitor the Reports

Search Console shows structured data reports under Enhancements, or a similar section, for supported types such as Product, Breadcrumb and Review snippets. Check them after each site change, because a theme update can quietly break markup. Search Console may not have a separate report for LocalBusiness markup, so for the kirana store the main checks are the Rich Results Test after every edit and a comparison of the markup with the Google Business Profile whenever hours or phone numbers change. Keep a copy of the final JSON-LD in a shared document, so whoever updates the website next can edit it without starting again.

Common Mistakes

  • Mismatch: Schema facts that differ from the visible page, such as different hours or prices, can make Google ignore the markup or take manual action.
  • Fakery: Adding star ratings or reviews that customers did not actually give breaks Google's policies.
  • Vagueness: Using the general "Thing" or "Organization" when a specific type such as GroceryStore fits.
  • Duplication: A plugin and hand-written code both adding LocalBusiness blocks with different details.
  • Staleness: Updating opening hours on the shop board and Google Business Profile, but not in the markup.
  • Syntax: A missing comma or quotation mark makes the whole JSON-LD block invalid.

Next Steps

  • Products: Add Product markup with price and availability to product pages; it also supports shopping feeds, covered in product feed optimization.
  • Local: Complete the Google Business Profile with the same facts, following local SEO.
  • Structure: Add BreadcrumbList markup and review the rest of the site with technical SEO.
  • AI answers: Clear, structured facts also help AI systems describe the business correctly, as covered in how to get cited by AI search.

How AI Changes Schema Markup

What AI Automates Now

AI assistants can write JSON-LD from a plain description of the business, convert hours written in a sentence into the correct format, and spot syntax errors in a pasted block. They can also suggest the most specific Schema.org type for a page. Producing structured output like this is a common AI task, explained in structured output.

What Still Needs a Human

A person must confirm every fact, choose which pages get which types, and decide whether markup is worth adding for a type Google no longer shows as a rich result. Only the owner knows that the store closes early on Sundays.

Risk to Watch

AI tools sometimes invent properties that do not exist in Schema.org, use outdated rich result types, or fill in plausible but wrong facts such as a pin code or coordinates. Always run the result through the Rich Results Test and compare it with the page before publishing.

Do It with AI

Use this prompt to generate JSON-LD for a local business page. It works in ChatGPT, Claude or Gemini.

Prompt for ChatGPT, Claude or Gemini

You are a structured data specialist. Write valid Schema.org JSON-LD for this business page. Business type: [for example grocery store, dental clinic, restaurant] Name: [exact name as on the page] Address: [street, locality, city, state, pin code, country] Phone: [number with country code] Opening hours: [each day and its hours] Payment methods: [as shown on the page] Website URL and image URL: [paste] 1. Choose the most specific Schema.org type that fits, and say why. 2. Output only valid JSON-LD, using only properties defined on Schema.org. 3. Use only the facts I gave you. Leave out any property I did not provide. 4. After the code, list anything I should add to the visible page so the markup matches it.

  1. Collect the facts exactly as they appear on the page.
  2. Run the prompt and copy the JSON-LD into the page's head, or into the plugin's custom code field.
  3. Test the URL in the Rich Results Test and fix every error.
  4. Publish, request indexing, and check the Search Console reports a few weeks later.

Check Before You Use It

  • Facts: Compare every value in the markup with the page, the shop board and the Google Business Profile.
  • Brand fit: Use the exact business name customers know, not a keyword-stuffed version of it.
  • Compliance: Never mark up reviews or ratings that are invented, bought or copied from another site.

Quick Quiz

Pick an answer to check yourself. Nothing is saved.

Question 1 / 3

  1. 1. Which schema type best describes the Indore kirana store?

Frequently Asked Questions

What is schema markup in simple words?

It is a block of code added to a web page that labels the facts on it, such as a business's name, address, opening hours, a product's price or an event's date, in a vocabulary search engines understand. The vocabulary comes from Schema.org.

Is schema markup a ranking factor?

Google has said structured data is not a general ranking boost. It helps search engines understand the page and can make it eligible for rich results, such as prices or ratings in the listing, which may improve clicks.

What is the difference between JSON-LD, Microdata and RDFa?

They are three ways of writing structured data. JSON-LD is a separate script block, while Microdata and RDFa are attributes mixed into the HTML. Google recommends JSON-LD because it is the easiest to add and maintain.

Why is my schema valid but no rich result appears?

Valid markup only makes a page eligible. Google decides whether to show a rich result based on the search, the device, the page's quality and its own policies, and some rich result types are shown only for certain kinds of sites.