The SchemaGen SDK is a lightweight JavaScript snippet that connects your website to the Schema Delivery Network. When a visitor loads a page, the SDK reads the current URL, fetches any published schemas that match that page from SchemaGen’s edge network, and injects them into the DOM asDocumentation Index
Fetch the complete documentation index at: https://docs.schemagen.io/llms.txt
Use this file to discover all available pages before exploring further.
<script type="application/ld+json"> tags — automatically, with no further action required from you.
You install the SDK once. Every schema you publish, update, or pause from the dashboard takes effect immediately across all matching pages on your site.
The SDK is lightweight and edge-optimized. It loads asynchronously so it never blocks page rendering, and schema delivery is served from edge locations worldwide to minimize latency.
Find your Client ID
Before you install the SDK, locate your Client ID. This unique identifier tells the SDK which schemas to fetch for your site. To find it: in the SchemaGen dashboard, go to Settings → Client. Your Client ID is displayed there. Copy it — you’ll paste it into the SDK snippet below.Install the SDK
Choose the installation method that matches your site setup.- HTML / Static
- WordPress
- Shopify
- Next.js / React
Add the following snippet inside the Place the tag as early in the
<head> tag of every page on your site. If you use a shared layout or template file, add it there so it appears on all pages automatically.Replace YOUR_CLIENT_ID with the Client ID from your dashboard.HTML
<head> as possible to give the SDK time to fetch schemas before the page finishes rendering.How the SDK works
When the SDK loads on a page, it:- Reads the current page URL from the browser.
- Sends a request to the SchemaGen inject API:
GET /api/inject?clientId={clientId}&url={pageUrl}. - Receives a list of published schemas matching that URL.
- Injects each schema as a
<script type="application/ld+json">tag into the page DOM.
Verify the SDK is working
After installing the SDK, confirm it’s injecting schemas correctly.Open DevTools
Navigate to a page where you have a published schema. Open your browser’s developer tools (press
F12 or right-click → Inspect).Check the Elements panel
In the Elements tab, search for
application/ld+json (use Ctrl+F or Cmd+F to search within the DOM). You should see one or more <script type="application/ld+json"> tags containing your schema JSON.Next steps
Quick start guide
Walk through creating and publishing your first schema end to end.
SDN overview
Learn how the Schema Delivery Network routes and caches schema delivery.
Publishing and lifecycle
Understand how Draft, Published, and Paused states affect schema delivery.
Domain locking
Restrict your Client ID to specific domains to prevent unauthorized use.