XooCode(){

Structured Data Validation API

Validate JSON-LD structured data on any URL. Built for AI agents, CI pipelines, and developers automating schema.org checks.

Quick start

1

Create an account

Sign up at xoocode.com, verify your email. Sign up

2

Generate an API key

Go to Account > API Keys, name your key, copy it (shown once). API Keys

3

Make your first call

POST to the validate endpoint with your key. See endpoints

Authentication

Include your API key in the X-Api-Key header on every request.

curl -X POST https://xoocode.com/api/v1/validate/url/ \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: xoo_your_key_here" \
  -d '{"url": "https://example.com"}'

Your API key is shown once when created. Store it securely. If lost, delete it and create a new one.

Tiers

Free

No credit card required

  • 50 requests per month
  • Both endpoints included
  • Rate limit headers on every response
Get started free

Pro

$19.99/month

For production workloads

  • 500 requests per day
  • Both endpoints included
  • Priority support
Upgrade to Pro

Endpoints

POST /api/v1/validate/url/

Fetch a URL and validate all JSON-LD blocks found on the page.

Request:

{
  "url": "https://example.com/product-page"
}

Response (200):

{
  "source": "https://example.com/product-page",
  "summary": {
    "blocks": 2,
    "errors": 1,
    "warnings": 3
  },
  "blocks": [
    {
      "index": 0,
      "type": "Product",
      "blockId": null,
      "blockName": "Widget Pro",
      "snippet": "{\n  \"@context\": \"https://schema.org\",\n  \"@type\": \"Product\",\n  \"name\": \"Widget Pro\",\n  ...",
      "errors": [
        {
          "path": "offers[0].priceCurrency",
          "value": "dollars",
          "message": "\"dollars\" is not a recognized ISO 4217 currency code",
          "suggestion": "USD"
        }
      ],
      "warnings": [
        {
          "path": "brand",
          "value": null,
          "message": "Missing property \"brand\" (recommended by Google for Product rich result)"
        }
      ]
    }
  ],
  "prompt": "# Structured Data Fix Instructions\n\nFix the following...",
  "usage": {
    "tier": "free",
    "period": "month",
    "used": 5,
    "limit": 50,
    "remaining": 45
  }
}

POST /api/v1/validate/raw/

Validate raw JSON-LD markup directly without fetching a URL.

Request:

{
  "jsonld": "{\n  \"@context\": \"https://schema.org\",\n  \"@type\": \"Organization\",\n  \"name\": \"Acme Corp\"\n}"
}

Response: Same shape as the URL endpoint.

Response format

Top-level fields in every response:

FieldTypeDescription
sourcestringThe URL tested or "Pasted markup"
summaryobjectTotal blocks, errors, warnings
blocksarrayPer-block validation results
promptstringMarkdown fix instructions ready to paste into an AI agent
usageobjectCurrent rate limit status

Each block contains:

FieldTypeDescription
typestringSchema.org @type (e.g. "Product", "Organization")
blockIdstring?@id from the block
blockNamestring?name or headline from the block
snippetstringFirst 5 lines of the JSON for context
errorsarrayValidation errors with path, value, message, suggestion
warningsarraySame shape as errors

Rate limiting

Every API response includes rate limit headers:

HeaderExampleDescription
X-RateLimit-Limit50Maximum requests in the current period
X-RateLimit-Remaining45Requests remaining
X-RateLimit-Reset2026-05-01T00:00:00.000ZWhen the limit resets
X-RateLimit-PeriodmonthCurrent billing period (month or day)

When you exceed the limit, the API returns 429 with a Retry-After header.

Error codes

CodeHTTP StatusDescription
MISSING_API_KEY401No X-Api-Key header provided
INVALID_API_KEY401API key not recognized
RATE_LIMITED429Rate limit exceeded
INVALID_URL400URL is missing or malformed
INVALID_JSON400Could not parse the JSON-LD input
NO_BLOCKS200No JSON-LD blocks found on the page
FETCH_FAILED502Could not fetch the provided URL

Add to your AI agent

Copy this instruction prompt to give any AI coding agent structured data validation capabilities.

# Structured Data Validation

You can validate JSON-LD structured data on any URL using the XooCode API.

## Setup

1. Sign up at https://xoocode.com/signup
2. Verify your email (check inbox for magic link)
3. Go to https://xoocode.com/account/api-keys
4. Click "Create API key", name it, and copy the key
5. Store the key securely (you will not see it again)

## Validating a URL

POST https://xoocode.com/api/v1/validate/url/
Headers: Content-Type: application/json, X-Api-Key: YOUR_KEY
Body: { "url": "https://example.com" }

## Validating raw JSON-LD

POST https://xoocode.com/api/v1/validate/raw/
Headers: Content-Type: application/json, X-Api-Key: YOUR_KEY
Body: { "jsonld": "{ \"@context\": \"https://schema.org\", ... }" }

## Interpreting results

The response includes:
- summary: total blocks, errors, and warnings found
- blocks: per-block details with path, value, message, and suggested fix for each finding
- prompt: ready-to-use markdown fix instructions
- usage: your current API quota

## Fixing issues

Use the "prompt" field from the response as your fix guide. It contains step-by-step instructions for each finding with suggested values. For missing properties where no value is suggested, ask the user what value to use.

If you have access to the codebase, locate the files that generate each schema block and apply the fixes directly.

## Free tier: 50 requests/month. Pro (19.99/month): 500 requests/day.
## Docs: https://xoocode.com/api-docs