Your website
LocalBusiness Schema Markup: A Working JSON-LD Example and How to Test It
LocalBusiness schema is a JSON-LD code block that states your business name, type, address, phone and hours for machines. Google requires only name and address, recommends phone, hours, geo and url, and says to use the most specific type, such as Plumber or Dentist. Skip star ratings from your own reviews: Google makes those ineligible. Test the code in Google's Rich Results Test and the Schema Markup Validator.
What does LocalBusiness schema actually do?
Schema markup (also called structured data) is a short block of code on your website that states your business facts in a format machines read without guessing: your name, the kind of business you are, your address, phone number, hours and the area you serve. Visitors never see it. Search engines and other software do.
Here is what is documented and what is not, so you can set your expectations before spending an hour on it:
- Google, documented: its local business structured data page says LocalBusiness markup can feed business details into the knowledge panel shown on Search and Maps, and that Google "does not guarantee" any feature that uses structured data will appear.
- Google AI Overviews and AI Mode, documented: Google's AI features page says "There's also no special schema.org structured data that you need to add" to appear in them. The same page lists "making sure your structured data matches the visible text on the page" and keeping your Business Profile up to date as ordinary good practice.
- ChatGPT and Perplexity, not documented: neither OpenAI nor Perplexity publishes anything saying their tools read schema markup. It is likely they read your page text either way, so markup is a backup for clear text, not a replacement.
So the honest case for doing it is modest: it removes ambiguity about who you are and where you work, it costs little, and it cannot hurt when it is accurate. It is not a switch that puts you into AI answers. Our guide on how ChatGPT picks local businesses covers the signals that carry more weight.
A working LocalBusiness JSON-LD example you can copy
JSON-LD is the format Google recommends: its introduction to structured data says "Google recommends using JSON-LD for structured data if your site's setup allows it." It is one self-contained block you paste into the page, so it does not touch your design.
The example below is for a made-up plumbing company. Replace every value with your own, and delete any line you cannot fill in honestly. A missing optional field is fine; a wrong one is not.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Plumber",
"@id": "https://www.example.com/#business",
"name": "Example Plumbing Co.",
"url": "https://www.example.com/",
"telephone": "+1-512-555-0134",
"image": "https://www.example.com/img/van.jpg",
"priceRange": "$$",
"address": {
"@type": "PostalAddress",
"streetAddress": "1200 Main St, Suite 4",
"addressLocality": "Austin",
"addressRegion": "TX",
"postalCode": "78701",
"addressCountry": "US"
},
"geo": {
"@type": "GeoCoordinates",
"latitude": 30.26715,
"longitude": -97.74306
},
"openingHoursSpecification": [
{
"@type": "OpeningHoursSpecification",
"dayOfWeek": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"],
"opens": "07:00",
"closes": "18:00"
},
{
"@type": "OpeningHoursSpecification",
"dayOfWeek": "Saturday",
"opens": "08:00",
"closes": "12:00"
}
],
"areaServed": [
{ "@type": "City", "name": "Austin" },
{ "@type": "City", "name": "Round Rock" },
{ "@type": "City", "name": "Pflugerville" }
],
"sameAs": [
"https://www.facebook.com/exampleplumbingco",
"https://www.yelp.com/biz/example-plumbing-co-austin"
]
}
</script>
What each part does, in plain words:
- @type: the most specific kind of business that fits you. Google says to "use the most specific LocalBusiness sub-type possible." The table in the next section lists the right value by trade.
- @id: a permanent label for your business, usually your homepage address plus
#business. Use the same one on every page so all your markup points to one business. - name and address: the only two fields Google lists as required. Use the exact name and address on your Google Business Profile.
- telephone: Google says to include the country code and area code, so US numbers start with +1.
- geo: your latitude and longitude. Google says the precision "must be at least 5 decimal places." Right-click your pin in Google Maps to copy the numbers, then keep at least five digits after the decimal point.
- openingHoursSpecification: hours in 24-hour time. The next section covers 24/7 and closed days.
- areaServed and sameAs: both are schema.org properties Google's page does not list. areaServed names the towns you cover; sameAs links your other official profiles. They are harmless and help other tools connect the dots.
Which schema type should my business use?
schema.org LocalBusiness has dozens of more specific types. Pick the narrowest one that is true. Many free schema generators and older plugins still default to ProfessionalService or Attorney, and both are deprecated in the current vocabulary. They still parse, but there is no reason to start with a retired label.
| Your trade | @type to use | Notes |
|---|---|---|
| Plumber | Plumber | Under HomeAndConstructionBusiness |
| Electrician | Electrician | Under HomeAndConstructionBusiness |
| Heating and air conditioning | HVACBusiness | Under HomeAndConstructionBusiness |
| Roofer | RoofingContractor | Under HomeAndConstructionBusiness |
| Remodeler or builder | GeneralContractor | Under HomeAndConstructionBusiness |
| Painter, locksmith, movers | HousePainter, Locksmith, MovingCompany | Under HomeAndConstructionBusiness |
| Landscaper, pest control, house cleaner | HomeAndConstructionBusiness | No specific type exists; use the parent |
| Dentist | Dentist | A full type, not marked pending |
| Doctor's office | Physician | Most specialty types (Pediatric, Dermatology) are still pending |
| Law firm or lawyer | LegalService | Attorney is deprecated; schema.org says LegalService "is more inclusive" |
| Accountant, tax preparer | AccountingService | Under FinancialService |
| Insurance agent | InsuranceAgency | Under FinancialService |
| Hair, nail or beauty salon | HairSalon, NailSalon, BeautySalon | Under HealthAndBeautyBusiness |
| Spa or gym | DaySpa, HealthClub | Under HealthAndBeautyBusiness |
| Auto repair or body shop | AutoRepair, AutoBodyShop | Under AutomotiveBusiness |
| Veterinarian | ["VeterinaryCare", "LocalBusiness"] | VeterinaryCare is not a LocalBusiness subtype, so list both |
| Real estate agent | RealEstateAgent | Under LocalBusiness |
Source: schema.org vocabulary, release 29.3, checked November 2026. Avoid ProfessionalService too: schema.org deprecated it "due to confusion with Service."
If you do two things, say plumbing and HVAC, you can list both: "@type": ["Plumber", "HVACBusiness"]. Keep it to what you would put on your truck. The type should match your primary category on Google, which our guide on choosing Google Business Profile categories helps you settle first.
Mistakes that make LocalBusiness markup wrong or useless
Most markup problems fall into a short list. Each one below comes from Google's own documentation.
Adding star ratings from your own reviews
This is the most common one, and most generator tools still offer it. Google's review snippet guidelines say that if a business controls the reviews about itself, its pages with LocalBusiness or Organization markup "are ineligible for star review feature." The example Google gives is a review of business A shown on business A's site, "either directly in their structured data or through an embedded third-party widget," naming Google and Facebook review widgets. The same page says "Don't aggregate reviews or ratings from other websites." So leave aggregateRating and review out. Google only recommends them for sites that collect reviews about other businesses.
Marking up things visitors cannot see
Google's general structured data guidelines say "Don't mark up content that is not visible to readers of the page." If your markup lists Saturday hours, your page should show Saturday hours. Most owners handle this by putting their name, address, phone and hours in the site footer or on a contact page.
Facts that disagree with your Google profile
Different phone numbers, an old suite number or last year's hours give every system two answers to choose between. Copy values straight from your Business Profile, and update the markup on the same day you change hours there.
Small format errors
- Open 24 hours: Google's page says to set opens to "00:00" and closes to "23:59".
- Closed all day: set both opens and closes to "00:00" for that day.
- Late nights past midnight: use one entry, for example Saturday opens "18:00" and closes "03:00".
- priceRange: Google says it "must be shorter than 100 characters" or it will not be shown. "$$" or "$90 to $250" works.
- url: Google says it must be a working link. Use the final address with https, not a redirect.
How do I test my LocalBusiness schema?
Testing takes about ten minutes and catches nearly every problem. Do it before and after the code goes live.
- Check the code before publishing. Paste your block into Google's Rich Results Test (choose the "Code" tab). Google's guidelines name it alongside the URL Inspection tool as the way to "catch most technical errors." Fix anything marked as an error. Warnings about optional fields are fine if you have no honest value for them.
- Check it against the full vocabulary. Run the same code through the Schema Markup Validator at validator.schema.org. Google's test only reports on features Google supports, so it says little about areaServed or sameAs. The validator flags misspelled property names that Google's test may skip.
- Publish, then test the live page. Run the Rich Results Test again with your real page address. This catches plugins or themes that strip out the script block.
- Ask Google to look. In Google Search Console, use URL Inspection on the page and request indexing. Google's local business page says to check a few deployed pages this way.
- Compare with what people see. Open the page on your phone and confirm the name, address, phone and hours shown match the markup line by line.
Passing the test means the code is valid. It does not mean Google will show anything new, and Google says so: structured data is not guaranteed to appear "even if your page is marked up correctly."
Where should the code go on my site?
Google's local business page says "You can add LocalBusiness structured data to any page on your site." In practice:
- One location: put the full block on your homepage. Adding the same block to your contact page is fine; keep the same
@idso it reads as one business. - Several locations: give each location its own page with its own block, address, phone, hours and
@id, such ashttps://www.example.com/locations/round-rock/#business. Do not stack every location on the homepage. - Service-area business with a hidden address: if you hide your street address on Google, do not publish it in markup either, because markup should match what visitors see. Address is required, so give the city, state, ZIP code and country only, and list your towns in areaServed. This is our suggestion, not a documented Google rule for this case.
How to paste it depends on your website builder. WordPress SEO plugins such as Yoast SEO (with its Local SEO add-on) and Rank Math have local business settings that write the markup for you; check the type they pick against the table above. Squarespace, Wix and most other builders let you add custom code to the page header, though some plans limit it, so check your builder's help page. If a web person manages your site, send them the filled-in block and this article. To see whether AI tools can read your business facts from your site today, the Pickd Ai free check reads your homepage the way they do.
How much does schema matter next to everything else?
Less than most schema tools suggest. Google's AI features guidance says no special markup is needed for AI Overviews, and points instead to SEO basics and an up-to-date Business Profile. For a local service business, a complete and accurate Google Business Profile, a steady stream of honest reviews, and a website whose text plainly says what you do and which towns you serve will usually matter more. See which Business Profile fields to complete first and how to ask for reviews within the rules.
Schema is worth an hour because it is cheap, permanent and removes doubt. Do it once, correctly, and then put your time into the work customers and AI tools can actually see.
Sources
- Google Search Central: Local business (LocalBusiness) structured data
- Google Search Central: Review snippet structured data (self-serving reviews)
- Google Search Central: General structured data guidelines
- Google Search Central: Introduction to structured data markup
- Google Search Central: AI features and your website
- schema.org: LocalBusiness
- schema.org: HomeAndConstructionBusiness
- schema.org: LegalService
Frequently asked questions
Does LocalBusiness schema help my business show up in ChatGPT?
Nobody can say for sure. OpenAI does not document whether ChatGPT reads schema markup, and Google says no special schema is needed for AI Overviews or AI Mode. Markup likely helps machines read your facts without guessing, but clear page text, an accurate Google Business Profile and honest reviews carry more weight.
Will adding schema give me star ratings in Google results?
No. Google's review snippet guidelines say a business that controls the reviews about itself is ineligible for star ratings on pages with LocalBusiness or Organization markup, including reviews pulled in through a Google or Facebook widget. Leave aggregateRating and review out of your own site's markup.
Which pages should have LocalBusiness schema?
Google says you can add it to any page. A single-location business usually puts it on the homepage and may repeat it on the contact page with the same @id. A business with several locations should give each location its own page with its own block, address, phone and hours.
Is Attorney or ProfessionalService still a valid schema type?
Both still exist but schema.org marks them deprecated. For a law firm, schema.org says LegalService is more inclusive and less ambiguous. ProfessionalService was retired because people confused it with Service, so pick a specific type like AccountingService or Dentist instead.
What if I am a service-area business with no storefront?
Google lists address as required. If you hide your street address on your Business Profile, a sensible approach is to include only city, state, ZIP and country in the markup so it matches what visitors see, and list the towns you serve in areaServed. Google does not document this exact case.
Is microdata as good as JSON-LD?
Google accepts JSON-LD, Microdata and RDFa, but says it generally recommends JSON-LD when your site allows it. JSON-LD sits in one block apart from your page design, which makes it much easier to update when your hours or phone number change.
See whether AI recommends your business
The free check shows whether ChatGPT, Perplexity and Gemini can read your website and understand what you do and where. The Full Audit asks them your customers' questions and shows who they name.