Last updated: March 22, 2026

Overview

Validate JSON-LD markup by pasting it directly into ValidGraph. Perfect for testing structured data before deploying it to a live site, debugging issues, or validating markup from development environments.

How It Works

1. User pastes raw JSON-LD into the validation textarea
2. ValidGraph parses the JSON syntax and validates against Schema.org
3. Returns the same detailed report as URL validation
4. Supports single objects and arrays of schema objects

Tier Availability

Same limits as URL Validation — each paste counts as one validation.

| Tier | Limit |
|——|——-|
| Free | 5 validations/day |
| Pro | 1,000 validations/month |
| Agency | 10,000 validations/month |
| Enterprise | Unlimited |

API Reference

POST /api/v1/validate

Request:

{
  "json_ld": {
    "@context": "https://schema.org",
    "@type": "Article",
    "headline": "Example Article"
  }
}

URL Validation: Extract and validate from live URLs
Auto-Fix Suggestions: Get code fixes for detected issues

Quick Start: Validate JSON-LD Before Deployment

Step 1: Copy your JSON-LD markup

{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "Understanding Structured Data",
  "author": {
    "@type": "Person",
    "name": "Jane Doe"
  },
  "datePublished": "2024-03-15"
}

Step 2: Submit via API or dashboard

curl -X POST https://api.validgraph.io/wp-json/validgraph/v1/validate 
  -H "Authorization: Bearer YOUR_API_KEY" 
  -H "Content-Type: application/json" 
  -d '{
    "json_ld": {
      "@context": "https://schema.org",
      "@type": "Article",
      "headline": "Understanding Structured Data",
      "author": {"@type": "Person", "name": "Jane Doe"},
      "datePublished": "2024-03-15"
    }
  }'

Step 3: Review results — Errors display immediately; fix and revalidate before deploying

Technical Details

Request/Response Format

Unlike URL validation, JSON-LD paste validation accepts the structured data object directly in the json_ld parameter (instead of data_url).

Request:

{
  "json_ld": {
    "@context": "https://schema.org",
    "@type": "Recipe",
    "name": "Chocolate Chip Cookies",
    "author": {"@type": "Person", "name": "Chef Alice"},
    "prepTime": "PT15M",
    "cookTime": "PT12M",
    "totalTime": "PT27M",
    "recipeYield": "24 cookies",
    "recipeIngredient": ["2 cups flour", "1 cup butter", "1 cup sugar"],
    "recipeInstructions": "Mix and bake at 375F for 12 minutes"
  }
}

Response:

{
  "success": true,
  "data": {
    "validation_id": "val_paste_def456",
    "schemas_found": 1,
    "types": ["Recipe"],
    "score": 85,
    "completeness": {
      "Recipe": {
        "required": {
          "name": true,
          "author": true,
          "prepTime": true,
          "cookTime": true,
          "recipeYield": true,
          "recipeIngredient": true,
          "recipeInstructions": true
        },
        "recommended": {
          "image": false,
          "description": false,
          "totalTime": true,
          "recipeCategory": false
        },
        "optional": {
          "keywords": false,
          "url": false
        }
      }
    },
    "warnings": [
      {
        "type": "Recipe",
        "property": "image",
        "severity": "medium",
        "message": "Recommended property 'image' missing. Images dramatically improve rich result appearance and click-through rates."
      }
    ],
    "errors": [],
    "extraction_method": "json_ld_paste"
  }
}

Validation Differences vs. URL Validation

No HTTP fetch: Validates provided JSON directly
No extraction regex: Assumes valid JSON-LD object (returns INVALID_JSON if malformed)
Same scoring engine: Uses identical completeness calculation
Same tier limits: Each paste counts as one validation against your daily/monthly quota
Perfect for: Testing before deployment, validating dev environment markup, debugging invalid JSON syntax

Array of Objects Support

You can also validate arrays of schema objects:

Request:

{
  "json_ld": [
    {
      "@context": "https://schema.org",
      "@type": "Article",
      "headline": "Article 1",
      "author": {"@type": "Person", "name": "Author A"},
      "datePublished": "2024-03-15"
    },
    {
      "@context": "https://schema.org",
      "@type": "Article",
      "headline": "Article 2",
      "author": {"@type": "Person", "name": "Author B"},
      "datePublished": "2024-03-16"
    }
  ]
}

Each object in the array is validated independently; the response contains combined results.

References

JSON-LD Best Practices: https://json-ld.org/learn
Schema.org Recipe Type: https://schema.org/Recipe
Google Structured Data Testing Tool: https://search.google.com/test/rich-results
Structured Data Markup JSON-LD Guide: https://developers.google.com/search/docs/appearance/structured-data
CommonMark Markdown Spec: https://spec.commonmark.org/ (for content validation)