AURA

LocalBusiness structured data step by step: JSON-LD for a small business and how to test it

Correct JSON-LD code doesn't guarantee an enhanced result in Google, but without it a machine reads your business data by guesswork. The type, a facts table, a ready example, and testing step by step.

Published
10 min read2000 words

AURA — a virtual business manager. Management on facts, not impressions. Who we are

Key takeaways

  • LocalBusiness has more precise subtypes like HealthAndBeautyBusiness or LegalService — the more precise the type, the less ambiguous the description of the business.
  • The data in the code should match what's visible on the site and in the Google listing — name, address, phone and hours need to agree everywhere.
  • Correct JSON-LD code doesn't guarantee an enhanced search result — Google states this explicitly.
  • The Rich Results Test checks the code before and after publishing; critical errors differ from warnings about recommended fields.
  • A business with several locations needs a separate data block on each branch's own page, not one shared block.

LocalBusiness structured data describes a company in a format a machine can read unambiguously: name, address, phone, hours and a price range packed into one block of code, instead of scattered across the page's text. Google recommends the JSON-LD format for this (Google Search Central, introduction to structured data).

One thing worth knowing upfront: correct code doesn't guarantee an enhanced search result. Google explicitly states that marking up structured data enables a feature to be present, it does not guarantee that it will be present (Google Search Central, structured data policies). This page still walks through doing it properly: picking a type, gathering the facts, assembling the code, placing it in the right spot, and checking the result with Google's own tool.

Wooden building blocks stacked into a small house shape on a charcoal desk
Structured data is a set of pieces that have to fit together correctly

Step 1 — pick a type, not just "LocalBusiness"

LocalBusiness in schema.org has more specific subtypes, including HealthAndBeautyBusiness, HomeAndConstructionBusiness, LegalService, LodgingBusiness, MedicalBusiness and ProfessionalService (Schema.org, LocalBusiness). The more precise the type, the less ambiguous the description of what the business actually does.

IndustrySchema.org type
Hair, beauty or spa salonHealthAndBeautyBusiness
Renovation and construction companyHomeAndConstructionBusiness
Law firmLegalService
Hotel, guesthouse, apartmentsLodgingBusiness
Medical or dental practiceMedicalBusiness
Accounting, consulting, agencyProfessionalService

When none of the subtypes fits exactly, the general LocalBusiness type remains a valid, accepted choice — just a less precise one.

Step 2 — gather the facts into one table before writing any code

Before a single curly brace appears, it's worth writing down, in one place, exactly the data that's already public anyway: the business name, identical to the one on the sign and in the Google listing, the address, the phone number in international format, the website URL, opening hours by day of the week, and an approximate price range. The rule is simple: the code should carry the same data visible on the site and in the Google listing — the name in the listing should match the real business name, and the listing also shows the address or service area, opening hours, and category (Google, guidelines for representing your business). Keeping the listing itself — its categories and hours — in order is a separate job, handled by Google Business Profile.

Two brass puzzle pieces being fitted together above a walnut table
Business facts need to match everywhere — on the site, in the code, and in the listing

If any of this data is missing from the visible page — say, opening hours — add it to the visible content first, and only then to the code. Structured data is meant to reflect content visible to users, not replace it or run ahead of it.

Step 3 — the JSON-LD code, on an example

The block below is an example built on made-up numbers — the brackets and fields themselves are real and match Google's documentation, but the name, address and phone number are invented and serve only as a template to fill in with your own data:

{
  "@context": "https://schema.org",
  "@type": "HomeAndConstructionBusiness",
  "name": "Example Renovation Company",
  "address": {
    "@type": "PostalAddress",
    "streetAddress": "12 Example Street",
    "addressLocality": "Warsaw",
    "postalCode": "00-001",
    "addressCountry": "PL"
  },
  "telephone": "+48123456789",
  "url": "https://example.com",
  "priceRange": "$$",
  "openingHoursSpecification": [
    { "@type": "OpeningHoursSpecification", "dayOfWeek": ["Monday","Tuesday","Wednesday","Thursday","Friday"], "opens": "08:00", "closes": "16:00" },
    { "@type": "OpeningHoursSpecification", "dayOfWeek": "Saturday", "opens": "09:00", "closes": "13:00" }
  ]
}

The priceRange field — an approximate price range — appears in Google's own examples right next to the phone number and hours, as one of the recommended properties (Google Search Central, LocalBusiness). Change @type to the exact subtype from the table above, and replace the rest of the fields with your own data from the facts table.

Different hours by day, a lunch break, and Saturday

When hours differ by day — one schedule on weekdays, another on Saturday, a lunch break in the middle of the day — openingHoursSpecification takes a list of separate objects, one for each distinct hours pattern, exactly as in Google's own restaurant example, where Monday and Tuesday carry different hours than Wednesday through Friday, and Saturday and Sunday get their own entries (Google Search Central, LocalBusiness). A lunch break is written as two separate objects for the same day — one up to the break, one after it.

Step 4 — where to paste the code

JSON-LD code goes inside a <script type="application/ld+json"> tag, usually in the page's <head> section. With one address, a single block on the homepage is enough — or, better still, the same block on every page, so each one carries the same description of the business.

WordPress and website builders

In WordPress, the code usually goes through a code field in theme settings, an SEO plugin's structured data section, or a header code editor. Website builders typically have a separate "head code" field in page or site-wide settings — the exact name differs between platforms, but the mechanism is the same: the pasted code lands in <head> unchanged.

A business with two addresses

When a business has two or more locations, each address gets its own structured data block on that location's own contact page, with its own phone number and its own hours — the same way a Google listing works, where each branch gets a separate listing with that branch's opening hours, and the main office gets its own besides (Google, guidelines for representing your business). One shared block covering every address at once confuses the machine about where the business actually is.

Step 5 — test the code before you publish it

The Rich Results Test is Google's tool for validating structured data, and in some cases it also shows a preview of the search result (Google Search Central, introduction to structured data). It works two ways: paste the URL of a published page, or paste the code itself before it ever reaches a server.

  1. Code
  2. Rich Results Test
  3. fix the errors
  4. publish
  5. check the report in Search Console
The diagram shows the same process step by step — from the first link to the last.

The tool separates critical errors, which block the feature entirely, from warnings — fields that are recommended but not required. After publishing, keep watching the same page in the rich results status report in Search Console, since a page that worked correctly on launch day can break after the next template change.

Common mistakes that break structured data

The most common mistake is a mismatch between the code and the page: hours in the JSON-LD that differ from the visible content, or data about a service the page never actually describes. Google treats this as misleading — structured data is meant to reflect content visible to users, not offer a separate, more convenient version of reality (Google Search Central, structured data policies).

A second mistake is inventing ratings or reviews in the code that nobody actually left — the same requirement to match reality applies to ratings just as it does to hours and address. A third is copying one code block across every cloned subpage without changing the address and phone number, which, with several branches, ends up with every page claiming to be the same place.

Who updates the data when something changes

EventWhere to update
Holiday hoursWebsite, JSON-LD code, Google listing
Phone number changeWebsite, JSON-LD code, Google listing, listings on other directories
Moving to a new addressWebsite, JSON-LD code (new address), Google listing, redirect from the old page
New price rangeWebsite, JSON-LD code (priceRange)

As long as one person keeps these three places — website, code, and Google listing — in sync from a single list, no mismatch appears. Once each one is updated by a different person at a different time, a mismatch is only a matter of time.

Do it yourself in an hour

  1. Write the facts down in one table: name, address, phone, URL, hours by day, price range.
  2. Pick the exact subtype from the industry table above, or stick with LocalBusiness if none fits.
  3. Assemble the JSON-LD code from the example, substituting your own data.
  4. Paste it into the <head> of the homepage or every page.
  5. Check the code in the Rich Results Test and fix any critical errors.
  6. Note the check date in a calendar and come back to the table whenever hours, phone, or address change.

What it looks like in a system

A row of small glass jars with sorted coloured beads on a workbench
Business data organised once and kept in one place
  1. Business data in one place
  2. website, code and Google listing
  3. one source of truth
  4. hours change
  5. update everywhere
  6. weekly mismatch report
The diagram shows the same process step by step — from the first link to the last.

At Aura this starts with SEO and maps, where we tidy up the Google listing and add what the search engine needs to the site itself. The website and its code are built inside Websites and stores, and keeping the business description consistent across the site, structured data, and the sources that confirm it is the job of GEO / AI visibility. When business data lives in several systems at once, Integrations connect them so an update in one place spreads to the rest on its own. The system doesn't promise enhanced results — it only keeps the data consistent everywhere it appears.

More on who should actually be keeping business data current, and why it drifts apart in practice, is covered in restaurant data in Google, on the website, and on portals — the update mechanism is the same regardless of industry. If you're only starting to put a business's online presence in order, four thresholds instead of a general analysis are laid out in small business automation. On why inconsistent or incomplete data turns inquiries away before anyone even calls, see the analysis of Warsaw company websites, and on setting up numbers an owner actually looks at, see reporting automation.

Frequently asked questions

Will structured data improve my ranking in Google?

There's no guarantee of that. Google explicitly states that marking up data enables an enhanced result feature to appear, but doesn't guarantee it will — ranking is decided by other factors.

Do I have to use exactly the LocalBusiness subtype for a medical practice?

It's better to use a more specific subtype if one exists — for example, MedicalBusiness for a medical practice. A more precise type describes what the business does more unambiguously than the general LocalBusiness type.

What should I do if the Rich Results Test shows a warning instead of an error?

Warnings cover fields that are recommended but not required — the page will work without them, but it's worth filling them in if the data is available, since they add completeness to the description.

Can I put a higher rating in the code than the business actually has?

No. Structured data is meant to match reality and the content visible to users — an invented rating or review nobody actually left violates Google's policies and can result in a manual action.

How often should I check structured data in the Rich Results Test?

Every time the page template changes, and every time hours, phone number, or address change — a page that worked correctly on launch day can break after the next theme or plugin update.

Is one shared code block on every page enough for a business with one address?

Yes — if a business has one address, a single shared code block across every page is enough, and simpler to maintain than a separate block on each page.

Who writes this

See your business as a system.

Aura is a virtual business manager: management on facts, not impressions. For a company that wants a system running its processes instead of the owner’s memory.

The website, CRM, admin panel and automations are modules of the same system. We are not a website agency.

Look at my business

You will land on the home page. Give a company name — Aura looks at it in public data and shows what a client sees before calling you. No promises of a result.

See what we do

Related services

Read next Scroll for more

Let us look at your numbers

Tell us how enquiries are handled today — how many there are, who picks them up, where they get lost. Aura walks the process with you and shows what can be taken off a person, and what is better left alone.

Talk to Aura

The home page with Aura opens. Give a company name — she looks at it in public data and shows what a client sees. No promises of a result.

Prefer to write? marketing@auraglobal-merchants.com

Next step

Let us check whether Aura fits your place

We do not take everyone: first we look at your processes, sales and current systems and tell you honestly whether it makes sense for us to come in. A few questions, about five minutes.

Take the assessment →