Dev.to WebDev 🛠 Dev 👁 0 📖 3 min read

Structured data for AI search: the JSON-LD that helps ChatGPT and Google understand a small business site

If you build websites for small businesses, there's a good chance your client will ask you this year why they don't show up when someone asks ChatGPT for a recommendation. A lot of the answer sits outside the website: re

If you build websites for small businesses, there's a good chance your client will ask you this year why they don't show up when someone asks ChatGPT for a recommendation. A lot of the answer sits outside the website: reviews, directory listings, what other sites say about the business. But one part sits squarely in your hands as the developer, and it's cheap to get right: structured data.

I've built websites since 1995 and worked with search for most of that time. Here's the JSON-LD I add to every small business site now, and why it matters more with AI search than it did before.

Why AI answers care about structured facts

When an AI tool recommends a business, it needs to state facts about it with some confidence: what the business does, where it is, when it's open, how to reach it. Many AI tools also pull from regular search indexes when they answer. Structured data doesn't guarantee anything, but it removes guesswork. A machine doesn't have to infer your client's opening hours from a footer image if the hours are right there in JSON-LD.

1. Organization or LocalBusiness on every page

For a business with a physical location or service area, use LocalBusiness or a more specific subtype such as Plumber, AccountingService or Dentist.

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Plumber",
  "@id": "https://www.example.com/#business",
  "name": "Example Plumbing",
  "url": "https://www.example.com/",
  "telephone": "+46 8 123 456 78",
  "address": {
    "@type": "PostalAddress",
    "streetAddress": "Storgatan 1",
    "postalCode": "111 22",
    "addressLocality": "Stockholm",
    "addressCountry": "SE"
  },
  "areaServed": "Stockholm",
  "openingHours": "Mo-Fr 07:00-17:00",
  "priceRange": "$$",
  "sameAs": [
    "https://www.facebook.com/exampleplumbing",
    "https://www.linkedin.com/company/exampleplumbing"
  ]
}
</script>

The sameAs array is underrated. It ties the website to the business's other profiles, which helps machines understand that they're all the same entity.

2. FAQPage on the FAQ

Ask your client for the ten questions customers ask most often, answer each in two or three plain sentences on the page, and mark them up:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [{
    "@type": "Question",
    "name": "How quickly can you come out for an emergency?",
    "acceptedAnswer": {
      "@type": "Answer",
      "text": "Usually within two hours in central Stockholm, around the clock."
    }
  }]
}
</script>

The markup only helps if the visible page says the same thing. Don't put answers in JSON-LD that aren't on the page.

Common mistakes I still see

  • Inconsistent details. The address in the JSON-LD differs from the footer, which differs from the Google Business Profile. Pick one canonical version and use it everywhere.
  • Facts in images and PDFs. Price lists as JPGs, opening hours in a banner. If it isn't text, it can't be quoted.
  • Content behind JavaScript only. If the important text only appears after client-side rendering, some crawlers will never see it.
  • Copy-pasted schema from another client. It happens more than you'd think. Validate with the Schema.org validator or Google's Rich Results Test before you ship.

The short version

None of this is new. It's the same groundwork that always helped classic SEO. What AI search changes is how much it costs a business to skip it. When the answer is one paragraph instead of ten links, being easy to describe correctly is most of the game.

This is a big part of what we do for small businesses at Leadly. For the non-technical side, the difference between SEO, AEO and GEO and what a business owner can do this month, I wrote a longer piece: SEO vs AEO vs GEO: what small businesses need to know about AI search

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.