---
title: "Country Schema"
description: "Add Schema.org Country structured data to your Sanity-powered site with sanity-plugin-seofields. Describe nations with ISO codes, flag images, and authoritative same-as URLs."
canonical: https://sanity-plugin-seofields.thehardik.in/docs/schema-org/country
---

# Country

The Country schema type identifies a sovereign nation with its name, ISO code, and authoritative same-as references. It is the building block search engines use to understand geographic scope on travel, e-commerce, and reference sites.

## About Country

Country is a specialised Place subtype. Adding ISO codes plus sameAs links to Wikidata anchors your entity in Google&apos;s Knowledge Graph and prevents ambiguity between similarly named places. Use Country wherever you would otherwise describe a region — for nested locality data prefer the Place or PostalAddress types.

## Fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | Yes | The common English name of the country, e.g. "United States". |
| `alternateName` | string | No | Alternate name (native name or abbreviation). |
| `identifier` | string \| PropertyValue | No | ISO 3166-1 alpha-2 country code, e.g. "US", "DE", "JP". |
| `description` | text | No | A short description of the country. |
| `url` | url | No | Canonical URL — e.g. Wikipedia or official government site. |
| `image` | url \| ImageObject | No | An image representing the country, such as a flag. |
| `sameAs` | url | No | URL to authoritative pages (Wikidata, Wikipedia, GeoNames, etc.). |
| `address.addressCountry` | string | No | ISO country code as a postal address. |

## Plugin Registration

```typescript
import { defineConfig } from 'sanity'
import { schemaOrgCountryPlugin } from 'sanity-plugin-seofields/schema'

export default defineConfig({
  // ... your sanity config
  plugins: [
    schemaOrgCountryPlugin(),
  ],
})
```

## Schema Usage

Add the `schemaOrgCountry` field to any document schema:

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

export default defineType({
  name: 'country',
  title: 'Country',
  type: 'document',
  fields: [
    defineField({
      name: 'schemaOrgCountry',
      title: 'Country Schema',
      type: 'schemaOrgCountry',
    }),
  ],
})
```

## GROQ Query

```javascript
*[_type == "country"][0]{
  schemaOrgCountry {
    name,
    alternateName,
    identifier,
    description,
    url,
    image,
    sameAs,
    address
  }
}
```

## Next.js Component

```tsx
import { CountrySchema } from 'sanity-plugin-seofields/schema/next'

export default function Layout({ data }) {
  return <CountrySchema data={data.schemaOrgCountry} />
}
```

## JSON-LD Output

```json
{
  "@context": "https://schema.org",
  "@type": "Country",
  "name": "Japan",
  "alternateName": "日本",
  "identifier": "JP",
  "description": "An island nation in East Asia, located in the northwest Pacific Ocean.",
  "url": "https://en.wikipedia.org/wiki/Japan",
  "image": "https://example.com/flags/jp.svg",
  "sameAs": "https://www.wikidata.org/wiki/Q17",
  "address": {
    "@type": "PostalAddress",
    "addressCountry": "JP"
  }
}
```
