API Documentation

Complete guide to using the JSON-LD Schema.org Validation API

Quick Start

To use the API, you'll need an API key. Register for a free account to get started.

Base URL:
https://validator.georefit.com/api/
Authentication:

Include your API key in the request header:

X-API-Key: your_api_key_here

Or as a query parameter:

?api_key=your_api_key_here

API Endpoints

POST /api/validate

Validate JSON-LD data against Schema.org vocabulary.

Request Body:
{
  "data": {
    "@context": "https://schema.org",
    "@type": "Person",
    "name": "John Doe",
    "email": "john@example.com"
  },
  "schema_version": "latest",
  "custom_contexts": [
    {"custom": "https://example.com/context"}
  ]
}
Parameters:
  • data (required): JSON-LD object to validate
  • schema_version (optional): Schema.org version (default: "latest")
  • custom_contexts (optional): Additional @context definitions
Response:
{
  "valid": true,
  "errors": [],
  "schema_version": "29.2",
  "suggestions": []
}
Example with cURL:
curl -X POST "https://validator.georefit.com/api/validate" \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"data": {"@context": "https://schema.org", "@type": "Person", "name": "John Doe"}}'
POST /api/validate-url

Validate JSON-LD data from a URL. The API will fetch the content and extract JSON-LD from the page.

Request Body:
{
  "url": "https://example.com/page-with-jsonld",
  "schema_version": "latest",
  "custom_contexts": []
}
Parameters:
  • url (required): URL to fetch and validate
  • schema_version (optional): Schema.org version
  • custom_contexts (optional): Additional @context definitions
Example:
curl -X POST "https://validator.georefit.com/api/validate-url" \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}'
GET /api/schema-versions

Get available Schema.org versions for validation.

Response:
{
  "versions": {
    "latest": "29.2",
    "29.2": "29.2",
    "29.1": "29.1",
    "29.0": "29.0"
  },
  "default": "latest"
}
Example:
curl -H "X-API-Key: your_api_key" "https://validator.georefit.com/api/schema-versions"
GET /api/health

Health check endpoint (no authentication required).

Response:
{
  "status": "healthy",
  "version": "1.0"
}
Error Handling
HTTP Status Codes:
  • 200: Success (validation completed)
  • 400: Bad request (invalid JSON-LD or missing parameters)
  • 401: Unauthorized (missing or invalid API key)
  • 429: Rate limit exceeded
  • 500: Internal server error
Error Response Format:
{
  "valid": false,
  "errors": [
    {
      "type": "missing_required_property",
      "message": "Required property 'name' is missing for type Person",
      "property": "name",
      "expected_type": "Text"
    }
  ],
  "schema_version": "29.2",
  "suggestions": [
    "Add the required property 'name' with a value of type Text"
  ]
}
Error Types:
  • json_syntax_error: Invalid JSON syntax
  • jsonld_syntax_error: Invalid JSON-LD structure
  • missing_type: Missing @type property
  • invalid_type: Unknown Schema.org type
  • missing_required_property: Required property missing
  • invalid_property: Unknown Schema.org property
  • url_error: Invalid URL format
  • fetch_error: Failed to fetch URL content
Rate Limits
  • Free accounts: 1,000 requests per month
  • Rate limits are per API key
  • Rate limit resets on the first day of each month
  • Monitor your usage in the dashboard