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.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.
Base URL
All API requests use the following base URL:Available endpoints
| Method | Path | Description | Auth required |
|---|---|---|---|
GET | /api/inject | Fetch published schemas for a page as JSON | No |
GET | /api/embed | Fetch published schemas for a page as rendered HTML | No |
POST | /api/generate | Generate JSON-LD from a schema type and field data | No (higher limits when authenticated) |
POST | /api/validate | Validate existing JSON-LD against Schema.org and Google guidelines | No |
POST | /api/generate-from-url | Extract and generate JSON-LD from a live URL using AI | Yes (Pro or Agency plan) |
Error format
All error responses return JSON with anerror field and an optional details object.
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
| Code | Meaning |
|---|---|
200 | Request succeeded. |
400 | The request body or query parameters failed validation. Check the details field. |
403 | Access denied. Either your plan limit has been reached or the requested resource is restricted. |
429 | Too many requests. You have exceeded the rate limit for this endpoint. Wait before retrying. |
500 | An unexpected server error occurred. |
503 | A 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.
429 response:
/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 a403 with error code limit_reached:
/api/generate without a usage limit, but are subject to IP-based rate limits.