SeoClientConfig. Anything you don’t pass falls back to environment variables.
Your store’s API key (
ask_…), from the dashboard under Settings → API Keys. Sent as Authorization: Bearer. Falls back to process.env.AGENTSHOP_API_KEY (on Hydrogen/Oxygen: context.env.AGENTSHOP_API_KEY, resolved by the adapter). It’s a secret — server-side only, never in a client bundle. See Security.Base URL of the AgentShop headless-SEO endpoint, e.g.
https://api.useagentshop.com/api/v1/headless-seo. Falls back to process.env.AGENTSHOP_SEO_URL (Hydrogen: context.env). Trailing slashes are stripped.Per-request fetch timeout in milliseconds, applied via
AbortSignal.timeout (feature-detected). The 3-second default suits the warm endpoint; raise it (e.g. 15000) when testing against a cold or local backend.Extra options merged into the underlying
fetch call. The main use is framework caching, e.g. Next.js ISR: { next: { revalidate: 60 } }. The Next.js helpers already default this to { next: { revalidate: 3600 } }; anything you pass here overrides it.Environment variables
AGENTSHOP_API_KEY is a secret, use a server-side/secret env var — never a NEXT_PUBLIC_* (or otherwise client-exposed) variable.
Failure behavior
The fetch helpers never throw. On any failure — missing config, missing/invalid key (401), 404, timeout, network error — they returnnull. A missing base URL additionally logs a single warning:
null.)

