JSON Tools has expanded its accessibility beyond the web interface. All capabilities previously available only through the UI are now exposed via a public REST API. This enables developers to integrate JSON processing operations directly into their automation pipelines, CI/CD workflows, and backend services without relying on browser-based interactions.

API Overview

The API provides programmatic access to the complete JSON Tools suite:

  • DataSculptor – Filter and project JSON data using SQL-like expressions
  • Rewriter – Modify specific JSON fields with path-based targeting
  • Randomizer – Anonymize sensitive data by randomizing field values
  • Generator – Generate mock JSON data from JSON Schema definitions
  • Schema Detector – Infer JSON Schema from existing JSON data
  • Converter – Transform JSON to/from XML and YAML formats
  • Encryption – Encrypt and decrypt specific JSON fields using Post-Quantum Cryptography

Base URL and Authentication

All API requests should be directed to:

https://jsontools.io/api/v1

Authentication is handled via a custom header. Include the following header in all requests:

carleto-client-tenant-apikey: YOUR_API_KEY_HERE

Replace YOUR_API_KEY_HERE with a valid API key. A shared public key is available for evaluation purposes, subject to rate limiting. For production workloads requiring higher quotas, request a dedicated API key by opening an issue in the GitHub project repository.

Available Endpoints

DataSculptor – Filter and Project

POST /api/v1/datasculptor/filter

Filter JSON arrays using SQL-like expressions and select specific fields.

Request Body:

{
  "json": "{ \"persons\": [ { \"name\": \"Ana\", \"age\": 32 }, { \"name\": \"Bob\", \"age\": 24 } ] }",
  "filters": ["persons.age > 30"],
  "fields": ["persons.name", "persons.age"]
}

Rewriter – Modify Fields

POST /api/v1/rewriter/

Rewrite specific JSON fields using path-based targeting.

Request Body:

{
  "json": "{ \"user\": { \"status\": \"inactive\" } }",
  "pathRewriterItems": [
    { "path": "user.status", "jsonContent": "\"active\"" }
  ]
}

Randomizer – Anonymize Data

POST /api/v1/randomizer/

Randomize specified fields for data anonymization.

Request Body:

{
  "json": "{ \"user\": { \"email\": \"john@example.com\", \"name\": \"John\" } }",
  "paths": ["user.email", "user.name"]
}

Generator – Create Mock Data

POST /api/v1/generator/

Generate JSON data from a JSON Schema definition.

Request Body:

{
  "jsonSchema": "{ \"type\": \"object\", \"properties\": { \"id\": { \"type\": \"integer\" }, \"name\": { \"type\": \"string\" } } }"
}

Schema Detector – Infer Schema

POST /api/v1/json/schemadetector/

Detect and infer JSON Schema from existing JSON data.

Request Body:

{
  "json": "{ \"id\": 1, \"name\": \"Example\", \"active\": true }"
}

Converter – Format Transformations

Convert between JSON, XML, and YAML formats.

POST /api/v1/converter/toXml      # JSON to XML
POST /api/v1/converter/toYaml     # JSON to YAML
POST /api/v1/converter/fromXml    # XML to JSON
POST /api/v1/converter/fromYaml   # YAML to JSON

Encryption – Secure Fields

Encrypt or decrypt specific JSON fields using Post-Quantum Cryptography.

POST /api/v1/crypt/encrypt/json   # Encrypt fields
POST /api/v1/crypt/decrypt/json   # Decrypt fields

Request Body:

{
  "json": "{ \"user\": { \"email\": \"john@example.com\", \"ssn\": \"123-45-6789\" } }",
  "paths": ["user.email", "user.ssn"]
}

Example: cURL Request

curl -X POST https://jsontools.io/api/v1/datasculptor/filter \
  -H "Content-Type: application/json" \
  -H "carleto-client-tenant-apikey: YOUR_API_KEY_HERE" \
  -d '{
    "json": "{ \"items\": [ { \"id\": 1, \"price\": 100 }, { \"id\": 2, \"price\": 250 } ] }",
    "filters": ["items.price > 150"],
    "fields": ["items.id", "items.price"]
  }'

Rate Limiting

The public API is rate-limited to ensure fair usage across all consumers. If your use case requires higher throughput, contact the maintainers through the GitHub repository to request a dedicated API key with an increased quota.

OpenAPI Specification

A complete OpenAPI specification is available for reference and client generation:

https://jsontools.io/public-swagger.yaml

This specification documents all endpoints, request schemas, and response formats. It can be imported into tools such as Postman, Swagger UI, or used to generate client libraries in various programming languages.

Privacy and Security

The API maintains the same privacy guarantees as the web interface:

  • Data is processed in memory and immediately discarded
  • No request payloads are logged or stored
  • HTTPS is enforced for all API communications
  • Encryption endpoints use Post-Quantum Cryptography algorithms

Conclusion

The JSON Tools API provides a straightforward mechanism for integrating JSON processing capabilities into automated workflows. Whether filtering data in a CI pipeline, anonymizing records before sharing, or generating test fixtures, the API offers the same functionality as the web interface with the flexibility of programmatic access.

For questions, bug reports, or feature requests, visit the GitHub repository.


Related: JSON Tools Introduces Post-Quantum Cryptography for Field-Level JSON Encryption