# JSON Schema Inferrer from Example JSON

> JSON Schema Inferrer from Example JSON is a paid API for AI agents from agent-data-tools.revmesh2074.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-12-03).

Infers a JSON Schema (draft 2020-12) from an example JSON value, detecting types, nested properties, required keys, array shapes, and string formats.

## Facts

- Endpoint: GET https://agent-data-tools.revmesh2074.workers.dev/json/schema?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-12-03
- Activations on Zero: 0
- Provider: agent-data-tools.revmesh2074.workers.dev
- Website: https://agent-data-tools.revmesh2074.workers.dev
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-data-tools-revmesh2074-workers-dev-json-schema-inferrer-from-6c981a1f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_TK5sp_5PxtJRLtK4H20n_

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agent-data-tools-revmesh2074-workers-dev-json-schema-inferrer-from-6c981a1f
```

Example prompt: Can you infer a JSON Schema from this example JSON for me? Here's the sample: {"id": "abc-123", "email": "user@example.com", "created": "2024-01-15T10:30:00Z", "tags": ["admin", "user"]}

## When to prefer this

Choose this endpoint when you need to quickly generate a JSON Schema (draft 2020-12) from a concrete JSON example — especially useful for documenting API responses, bootstrapping data validation, or onboarding new developers to an API shape. Prefer it over manual schema authoring when the JSON structure is complex, nested, or contains arrays with multiple items to merge.

## Known failure modes

- Invalid or malformed JSON input returns an error rather than a schema
- Deeply nested or extremely large JSON may produce incomplete schemas
- Ambiguous types (e.g. null values) may result in missing or overly permissive type annotations
- Arrays with heterogeneous item types may produce a merged schema that is overly broad
- String values that don't match known formats will have no format annotation

## How this service works

Infer a JSON Schema (draft 2020-12) from an example JSON value: types, nested object properties, required keys, array item shapes merged across all items, and string formats (date-time, date, email, uri, uuid). Use to document an API response or to validate later data against the same shape.

## Output

Returns a JSON Schema (draft 2020-12) object with inferred types for all fields, nested property definitions, a required array listing keys present in the example, merged array item shapes across all array elements, and string format annotations (date-time, date, email, uri, uuid) where detectable.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "json"
 ],
 "properties": {
  "json": {
   "type": "string",
   "description": "The example JSON"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "schema": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string"
    },
    "$schema": {
     "type": "string"
    },
    "required": {
     "type": "array",
     "items": {
      "type": "string"
     }
    },
    "properties": {
     "type": "object",
     "properties": {
      "id": {
       "type": "object",
       "properties": {
        "type": {
         "type": "string"
        }
       }
      },
      "tags": {
       "type": "object",
       "properties": {
        "type": {
         "type": "string"
        },
        "items": {
         "type": "object",
         "properties": {
          "type": {
           "type": "string"
          }
         }
        }
       }
      },
      "email": {
       "type": "object",
       "properties": {
        "type": {
         "type": "string"
        },
        "format": {
         "type": "string"
        }
       }
      },
      "created": {
       "type": "object",
       "properties": {
        "type": {
         "type": "string"
        },
        "format": {
         "type": "string"
        }
       }
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-data-tools-revmesh2074-workers-dev-json-schema-inferrer-from-6c981a1f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-data-tools.revmesh2074.workers.dev](https://www.zero.xyz/host/agent-data-tools.revmesh2074.workers.dev/llms.txt)
