docs
SoftwareApplication
Add SoftwareApplication structured data to your Sanity-powered site. Help your app appear in Google's software rich results.
About SoftwareApplication
SoftwareApplication schema helps your app appear in Google's software rich results. Marking up your software with structured data enables rich search results with app details, categories, and platform information, driving more qualified traffic to your download or landing page.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string | ✓ | The name of the software application. |
applicationCategory | string | — | The category of the application (e.g. DeveloperApplication). |
operatingSystem | string | — | The operating system(s) the application supports. |
url | string | — | The URL of the application or its landing page. |
Plugin Registration
sanity.config.ts
import { defineConfig } from "sanity";
import { schemaOrgSoftwareApplicationPlugin } from "sanity-plugin-seofields/schema";
export default defineConfig({
// ... your project config
plugins: [
schemaOrgSoftwareApplicationPlugin(),
],
});Schema Usage
Add theschemaOrgSoftwareApplication field to any document schema:
schemas/page.ts
import { defineField, defineType } from 'sanity'
export default defineType({
name: 'page',
title: 'Page',
type: 'document',
fields: [
// ... your other fields
defineField({
name: 'schemaOrgSoftwareApplication',
title: 'Software Application',
type: 'schemaOrgSoftwareApplication',
}),
],
})GROQ Query
GROQ query
const query = groq`*[_type == "softwareApplication"][0]{
"softwareApplication": schemaOrgSoftwareApplication {
name,
applicationCategory,
operatingSystem,
url
}
}`;Next.js Component
app/layout.tsx
import { SoftwareApplicationSchema } from "sanity-plugin-seofields/react";
export default function Layout({ children }: { children: React.ReactNode }) {
// Fetch your software application data from Sanity
const softwareApp = await sanityClient.fetch(query);
return (
<html lang="en">
<body>
<SoftwareApplicationSchema data={softwareApp.softwareApplication} />
{children}
</body>
</html>
);
}JSON-LD Output
Generated JSON-LD
{
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"name": "My App",
"applicationCategory": "DeveloperApplication",
"operatingSystem": "Any",
"url": "https://example.com"
}Was this page helpful?