---
title: "LocalBusiness Schema"
description: "Add LocalBusiness structured data to Sanity documents — display your business address, hours, phone, and reviews in Google Maps and local search results."
canonical: https://sanity-plugin-seofields.thehardik.in/docs/schema-org/local-business
---

# LocalBusiness

Add LocalBusiness structured data to your Sanity-powered site. Appear in Google&apos;s local pack results and Maps listings with rich business information.

## About LocalBusiness

LocalBusiness schema powers Google&apos;s local pack results and Maps listings. Structured business data helps your business appear prominently when users search for local services, complete with address, phone number, and business details.

## Fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | Yes | The name of the local business. |
| `image` | string \| object | No | Photo of the business — a URL string or a full ImageObject. |
| `logo` | string \| object | No | Business logo — a URL string or a full ImageObject. |
| `telephone` | string | No | The phone number of the business. |
| `address.streetAddress` | string | No | The street address of the business. |
| `address.addressLocality` | string | No | The city or locality of the business. |
| `address.addressCountry` | string | No | The country of the business (ISO 3166-1 alpha-2). |
| `url` | string | No | The website URL of the business. |
| `priceRange` | string | No | Price range indicator, e.g. "$", "$$", "$$$". |
| `geo.latitude` | string | No | Latitude coordinate of the business location. |
| `geo.longitude` | string | No | Longitude coordinate of the business location. |
| `hasMap` | string | No | URL to a map showing the location of the business. |
| `openingHoursSpecification[].dayOfWeek` | string | No | Day(s) of the week these hours apply to. |
| `openingHoursSpecification[].opens` | string | No | Opening time in HH:MM format. |
| `openingHoursSpecification[].closes` | string | No | Closing time in HH:MM format. |
| `sameAs` | string | No | URLs of social profiles and other authoritative pages about this business. |

## Plugin Registration

```typescript
import { defineConfig } from "sanity";
import { schemaOrgLocalBusinessPlugin } from "sanity-plugin-seofields/schema";

export default defineConfig({
  // ... your project config
  plugins: [
    schemaOrgLocalBusinessPlugin(),
  ],
});
```

## Schema Usage

Add the `schemaOrgLocalBusiness` field to any document schema:

```typescript
import { defineField, defineType } from 'sanity'

export default defineType({
  name: 'page',
  title: 'Page',
  type: 'document',
  fields: [
    // ... your other fields
    defineField({
      name: 'schemaOrgLocalBusiness',
      title: 'Local Business Schema',
      type: 'schemaOrgLocalBusiness',
    }),
  ],
})
```

## GROQ Query

```javascript
*[_type == "yourDocument"][0]{
  schemaOrgLocalBusiness {
    name,
    image,
    logo,
    telephone,
    address {
      streetAddress,
      addressLocality,
      addressCountry
    },
    url,
    priceRange,
    geo {
      latitude,
      longitude
    },
    hasMap,
    openingHoursSpecification[] {
      dayOfWeek,
      opens,
      closes
    },
    sameAs
  }
}
```

## Next.js Component

```tsx
import { LocalBusinessSchema } from "sanity-plugin-seofields/schema/next";

export default function Layout({ children }: { children: React.ReactNode }) {
  // Fetch your local business data from Sanity
  const localBusiness = await sanityClient.fetch(query);

  return (
    <html lang="en">
      <body>
        <LocalBusinessSchema data={localBusiness.schemaOrgLocalBusiness} />
        {children}
      </body>
    </html>
  );
}
```

## JSON-LD Output

```json
{
  "@context": "https://schema.org",
  "@type": "LocalBusiness",
  "name": "Springfield Coffee House",
  "image": "https://example.com/coffee-house.jpg",
  "logo": "https://example.com/coffee-house-logo.png",
  "telephone": "+1-555-0100",
  "address": {
    "@type": "PostalAddress",
    "streetAddress": "123 Main St",
    "addressLocality": "Springfield",
    "addressCountry": "US"
  },
  "url": "https://springfieldcoffeehouse.example.com",
  "priceRange": "$$",
  "geo": {
    "@type": "GeoCoordinates",
    "latitude": "39.7817",
    "longitude": "-89.6501"
  },
  "hasMap": "https://maps.google.com/?q=Springfield+Coffee+House",
  "openingHoursSpecification": [
    {
      "@type": "OpeningHoursSpecification",
      "dayOfWeek": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"],
      "opens": "07:00",
      "closes": "18:00"
    }
  ],
  "sameAs": "https://www.facebook.com/springfieldcoffeehouse"
}
```
