CDN Script
The fastest integration — paste one tag into your<head> and the hosted loader handles the rest. Schemas are fetched and injected by JavaScript after the page loads.
Schemas are client-injected, not in the raw HTML source. Google indexes them after executing JavaScript (typically a few seconds after the page loads). For schemas in HTML source, use the Next.js SDK or another server-side method.
Add the tag
Paste this into the<head> on every page of your site:
YOUR_PROJECT_ID with the Project ID from your InstantSchema dashboard.
Attributes
| Attribute | Required | Description |
|---|---|---|
data-project-id | Yes | Your InstantSchema project ID |
data-api-url | No | Override API base URL (default: https://app.instantschema.com) |
async | Recommended | Non-blocking load; doesn’t delay page rendering |
How it works
The loader readsdata-project-id and window.location.pathname, calls /api/v1/structured-data, then appends each schema as a <script type="application/ld+json"> tag to <document.head>.