Skip to main content

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:
<script
  src="https://app.instantschema.com/v1/loader.js"
  data-project-id="YOUR_PROJECT_ID"
  async
></script>
Replace YOUR_PROJECT_ID with the Project ID from your InstantSchema dashboard.

Attributes

AttributeRequiredDescription
data-project-idYesYour InstantSchema project ID
data-api-urlNoOverride API base URL (default: https://app.instantschema.com)
asyncRecommendedNon-blocking load; doesn’t delay page rendering

How it works

The loader reads data-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>.

Detection

The dashboard detects the CDN script by scanning your site’s HTML source for the loader tag. Once the tag is live, the integration panel will show Integration active · via CDN script (the panel polls every 8 seconds while unconfirmed).