Skip to main content
@agentshop/seo puts your AgentShop-generated SEO into the initial HTML of your headless storefront: structured data (JSON-LD), title and meta description, Open Graph and Twitter tags, and a product sitemap.

Why server-side rendering matters

AI crawlers — GPTBot, ClaudeBot, PerplexityBot — do not execute JavaScript. If your tags are injected client-side, these crawlers never see them. The same is true for most social scrapers and some search crawlers. The SDK fetches your SEO bundle on the server and renders it into the initial HTML, so every crawler sees complete metadata on the first request.

How it works

Your storefront calls the AgentShop headless-SEO endpoint at render time — on the server, authenticated by your store API key — and receives a ready-to-render bundle. The SDK caches with your framework (Next.js ISR by default), so the endpoint adds negligible latency to your pages.
If the endpoint is ever unreachable or misconfigured, every helper returns null and your page renders without SEO tags — never a 500. See Concepts for the full graceful-degradation contract.

What you get

Measured on a real store, before and after adding the SDK to a fresh Next.js app:
BeforeAfter
Product <title>app nameCreatine for Women + Hydration | Mendi Strong Powder
Canonical / meta descriptionnonereal values from your Shopify SEO fields
Open Graph / Twitter tags0 / 05 / 4
JSON-LDnoneProduct + BreadcrumbList (~2.2 KB, valid)
Collection pagebareCollectionPage + ItemList + breadcrumb
Home pagebareOrganization + WebSite (+ FAQPage when your store has published FAQs)
/sitemap.xml502200, valid XML

Supported frameworks

FrameworkProduct meta + JSON-LDCollectionSite-level JSON-LDSitemap
Next.js App Router (/next)
Next.js Pages Router (/next/pages)
Remix (/remix)
Hydrogen / Oxygen (/hydrogen)
The core package (@agentshop/seo) exposes the raw fetch helpers for any other server-rendered stack — collection and site bundles included. The package is ESM-only and requires Node 18 or later; all peer dependencies are optional, so installing it never pulls in a framework you don’t use.

Next steps

Quickstart

Product SEO on a Next.js App Router storefront in four steps.

Concepts

Bundles, the store API key, caching, and graceful degradation.

Framework guides

Next.js, Remix, and Hydrogen integration guides.

API reference

Configuration, core API, and endpoint reference.