Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.schemagen.io/llms.txt

Use this file to discover all available pages before exploring further.

The SchemaGen API is a set of HTTP endpoints that power schema delivery, generation, and validation. You can call these endpoints directly to build custom integrations, server-side pipelines, or CMS plugins without relying on the SchemaGen JavaScript SDK.

Base URL

All API requests use the following base URL:
https://schemagen.io

Available endpoints

MethodPathDescriptionAuth required
GET/api/injectFetch published schemas for a page as JSONNo
GET/api/embedFetch published schemas for a page as rendered HTMLNo
POST/api/generateGenerate JSON-LD from a schema type and field dataNo (higher limits when authenticated)
POST/api/validateValidate existing JSON-LD against Schema.org and Google guidelinesNo
POST/api/generate-from-urlExtract and generate JSON-LD from a live URL using AIYes (Pro or Agency plan)

Error format

All error responses return JSON with an error field and an optional details object.
{
  "error": "string describing the error",
  "details": {}
}
The details field appears on validation errors and contains a structured breakdown of what failed. It is omitted on rate limit, auth, and server errors.

HTTP status codes

CodeMeaning
200Request succeeded.
400The request body or query parameters failed validation. Check the details field.
403Access denied. Either your plan limit has been reached or the requested resource is restricted.
429Too many requests. You have exceeded the rate limit for this endpoint. Wait before retrying.
500An unexpected server error occurred.
503A downstream service (such as the AI extraction engine) is temporarily unavailable.

Rate limiting

SchemaGen applies rate limits at the endpoint level to ensure fair use.
  • Authenticated users are rate-limited per user account and receive higher request allowances.
  • Unauthenticated users are rate-limited per IP address and have lower allowances.
When you exceed the rate limit, the API returns a 429 response:
{
  "error": "Too many requests. Please wait a moment."
}
The /api/validate endpoint has its own independent rate limit separate from the generation endpoints.
Rate limits are applied on a fail-open basis: if the rate limit service is temporarily unavailable, requests are allowed through rather than blocked.

Usage limits

Authenticated users on paid plans have a monthly usage quota that applies to schema generation and AI extraction. When you reach your plan’s limit, the API returns a 403 with error code limit_reached:
{
  "error": "limit_reached"
}
Guest (unauthenticated) users can call /api/generate without a usage limit, but are subject to IP-based rate limits.