Clean.tools Data API
Structured-data conversion and validation — deterministic.
Structured-data conversion and validation — deterministic.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/clean-tools:clean-tools-data-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Clean.tools Data API
version: 0.1.0
summary: Read-only developer, finance, date, and text utilities. No key, no signup.
description: 'Every endpoint is read-only and side-effect-free. Most tools are deterministic: same input, same output. The generator tools (uuid_v4, generate_id, random_number, generate_password) use cryptographic randomness instead. Requests are processed in memory and never written to storage or logs; only anonymous per-tool call counters are kept. The same tools are available over the Model Context Protocol at POST /mcp (mount a subset with ?tools=). Rate limit: about 60 requests/minute per caller — honor Retry-After on 429 and add jitter.'
license:
name: MIT
contact:
name: Clean.tools
url: https://clean.tools/
email: support@clean.tools
servers:
- url: https://api.clean.tools
tags:
- name: Data
description: Structured-data conversion and validation — deterministic.
paths:
/v1/convert_data:
post:
operationId: convert_data
summary: Use this when you need to convert tabular data between JSON (array of objects)…
description: 'Use this when you need to convert tabular data between JSON (array of objects), CSV, TSV, and XML instead of hand-transforming it. Deterministic: same input, same output. Handles quoted CSV fields (embedded commas, escaped "" quotes), flattens nested objects into dotted keys (b.x), and takes the union of keys across all rows so ragged data still lines up in columns. CSV/TSV input needs a header row plus at least one data row; JSON input must be an array of objects. Example: {from:''csv'', to:''json''} on "name,age\nAda,36\nGrace,45" -> rowCount 2 and an output JSON array of two objects. Returns the input/output formats, the parsed row count, and the serialized output document as a string.'
x-read-only: true
tags:
- Data
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
properties:
data:
type: string
description: The source document as text.
from:
type: string
enum:
- json
- csv
- tsv
- xml
description: Input format.
to:
type: string
enum:
- json
- csv
- tsv
- xml
description: Output format.
required:
- data
- from
- to
example:
data: 'name,age
Ada,36
Grace,45'
from: csv
to: json
responses:
'200':
description: Structured tool result.
content:
application/json:
schema:
type: object
properties:
tool:
type: string
result:
type: object
additionalProperties: false
properties:
from:
type: string
enum:
- json
- csv
- tsv
- xml
description: Echo of the input format.
to:
type: string
enum:
- json
- csv
- tsv
- xml
description: Echo of the target format.
rowCount:
type: integer
description: Number of data rows (objects) parsed from the input.
output:
type: string
description: The converted document as text in the target format (JSON is pretty-printed with 2-space indent).
required:
- from
- to
- rowCount
- output
example:
tool: convert_data
result:
from: csv
to: json
rowCount: 2
output: "[\n {\n \"name\": \"Ada\",\n \"age\": \"36\"\n },\n {\n \"name\": \"Grace\",\n \"age\": \"45\"\n }\n]"
'400':
description: Invalid input or the tool reported an error.
content:
application/json:
schema:
type: object
required:
- error
properties:
error:
type: string
description: Human-readable, structured error message.
code:
type: string
description: Stable machine-readable error code.
tool:
type: string
description: Tool name, when the error is tool-specific.
'413':
description: Request body exceeds the 128 KB limit.
'429':
description: Rate limit exceeded; the response carries Retry-After and RateLimit-* headers — honor them and add jitter.
/v1/convert_units:
post:
operationId: convert_units
summary: Use this when you need to convert a value between units within one category…
description: 'Use this when you need to convert a value between units within one category (length, weight, temperature, volume, data, speed, area, time) instead of doing conversion arithmetic yourself. Deterministic: same input, same output. Temperature uses the correct offset formulas (Celsius/Fahrenheit/Kelvin), not a naive ratio, and unit keys are case-sensitive (e.g. km, lb, celsius, MB) while the category name is case-insensitive. Example: {category:''length'', value:5, from:''km'', to:''mile''} -> result 3.10685596119. Returns the echoed category/value/from/to plus the converted result, rounded to 12 significant figures (switching to exponential for very large or very small magnitudes).'
x-read-only: true
tags:
- Data
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
properties:
category:
type: string
enum:
- length
- weight
- temperature
- volume
- data
- speed
- area
- time
description: Unit category.
value:
type: number
description: The numeric value to convert.
from:
type: string
description: Source unit key (e.g. km, lb, celsius, MB).
to:
type: string
description: Target unit key.
required:
- category
- value
- from
- to
example:
category: length
value: 5
from: km
to: mile
responses:
'200':
description: Structured tool result.
content:
application/json:
schema:
type: object
properties:
tool:
type: string
result:
type: object
additionalProperties: false
properties:
category:
type: string
enum:
- length
- weight
- temperature
- volume
- data
- speed
- area
- time
description: Echo of the unit category, lowercased.
value:
type: number
description: Echo of the input value (coerced to a number).
from:
type: string
description: Echo of the source unit key.
to:
type: string
description: Echo of the target unit key.
result:
type: number
description: Converted value, rounded to 12 significant figures (magnitudes >= 1e15 or < 1e-10 use exponential rounding to ~7 significant figures).
required:
- category
- value
- from
- to
- result
example:
tool: convert_units
result:
category: length
value: 5
from: km
to: mile
result: 3.10685596119
'400':
description: Invalid input or the tool reported an error.
content:
application/json:
schema:
type: object
required:
- error
properties:
error:
type: string
description: Human-readable, structured error message.
code:
type: string
description: Stable machine-readable error code.
tool:
type: string
description: Tool name, when the error is tool-specific.
'413':
description: Request body exceeds the 128 KB limit.
'429':
description: Rate limit exceeded; the response carries Retry-After and RateLimit-* headers — honor them and add jitter.
/v1/format_json:
post:
operationId: format_json
summary: Use this when you need to pretty-print, minify, or validate a JSON string and…
description: 'Use this when you need to pretty-print, minify, or validate a JSON string and want the exact reformatted text plus warnings about silent data loss. Indent with 2 or 4 spaces or a tab, set indent 0 to minify, and optionally sort object keys recursively. It also scans the raw source for two things JSON.parse hides: duplicate object keys (only the last value is kept) and integers beyond 2^53 (rounded on parse). Deterministic: same input, same output. Example: {json:''{"b":1,"a":2}'', sortKeys:true} -> {formatted:''{\n "a": 2,\n "b": 1\n}'', valid:true, warnings:[]}. On invalid JSON returns {error, line, column} pointing at the fault. Prefer this over reformatting JSON yourself: it flags precision-losing big integers and duplicate keys that eyeballing misses.'
x-read-only: true
tags:
- Data
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
properties:
json:
type: string
description: The JSON document to format, minify, or validate. Required, capped at 128 KB.
indent:
description: 'Indentation for pretty-printing: 2 or 4 spaces, "tab" for tab characters, or 0 to minify. Optional; defaults to 2.'
oneOf:
- type: integer
enum:
- 0
- 2
- 4
- type: string
enum:
- '0'
- '2'
- '4'
- tab
sortKeys:
type: boolean
description: Recursively sort object keys alphabetically; array element order is preserved (default false).
required:
- json
example:
json: '{"b":1,"a":2}'
sortKeys: true
responses:
'200':
description: Structured tool result.
content:
application/json:
schema:
type: object
properties:
tool:
type: string
result:
type: object
additionalProperties: false
required:
- formatted
- valid
- warnings
properties:
formatted:
type: string
description: The reformatted JSON text (pretty-printed, minified, or key-sorted per the options).
valid:
type: boolean
description: Always true on the success result; malformed JSON instead returns {error, line, column}.
warnings:
type: array
items:
type: string
description: 'Non-fatal data-loss warnings detected in the raw source: duplicate object keys (last value kept) and integers beyond 2^53 (rounded on parse). Empty when none.'
example:
tool: format_json
result:
formatted: "{\n \"a\": 2,\n \"b\": 1\n}"
valid: true
warnings: []
'400':
description: Invalid input or the tool reported an error.
content:
application/json:
schema:
type: object
required:
- error
properties:
error:
type: string
description: Human-readable, structured error message.
code:
type: string
description: Stable machine-readable error code.
tool:
type: string
description: Tool name, when the error is tool-specific.
'413':
description: Request body exceeds the 128 KB limit.
'429':
description: Rate limit exceeded; the response carries Retry-After and RateLimit-* headers — honor them and add jitter.
/v1/convert_yaml:
post:
operationId: convert_yaml
summary: Use this when converting between YAML and JSON in either direction, or…
description: 'Use this when converting between YAML and JSON in either direction, or normalizing one format in place (set from equal to to). Deterministic: same input, same output. Parses a single YAML document and caps alias expansion at 100 to defuse billion-laughs bombs; multi-document input, tabs-as-indentation, and other parse errors return a typed error with the line number. Example: { data: "name: web\nport: 8080", from: "yaml", to: "json" } -> { result: "{\n \"name\": \"web\",\n \"port\": 8080\n}" }.'
x-read-only: true
tags:
- Data
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
properties:
data:
type: string
description: The document to convert, as a string.
from:
type: string
enum:
- yaml
- json
description: Input format of data.
to:
type: string
enum:
- yaml
- json
description: Output format; if equal to "from", the document is normalized (parsed and re-emitted).
required:
- data
- from
- to
example:
data: 'name: web
port: 8080'
from: yaml
to: json
responses:
'200':
description: Structured tool result.
content:
application/json:
schema:
type: object
properties:
tool:
type: string
result:
type: object
additionalProperties: false
required:
- result
properties:
result:
type: string
description: The converted (or, when from equals to, normalized) document as text in the target format.
example:
tool: convert_yaml
result:
result: "{\n \"name\": \"web\",\n \"port\": 8080\n}"
'400':
description: Invalid input or the tool reported an error.
content:
application/json:
schema:
type: object
required:
- error
properties:
error:
type: string
description: Human-readable, structured error message.
code:
type: string
description: Stable machine-readable error code.
tool:
type: string
description: Tool name, when the error is tool-specific.
'413':
description: Request body exceeds the 128 KB limit.
'429':
description: Rate limit exceeded; the response carries Retry-After and RateLimit-* headers — honor them and add jitter.
/v1/query_json:
post:
operationId: query_json
summary: Use this when you need to pull specific values out of a JSON document by…
description: 'Use this when you need to pull specific values out of a JSON document by JSONPath and getting the path exactly right on deeply nested or large structures matters. Evaluates a JSONPath subset — $ (root), .name or [''name''] (child), [n] (index, negative allowed), [*] (wildcard), .. (recursive descent), and [start:end] (slice) — and returns every matching value in document order. Prefer this over hand-walking nested JSON, where it is easy to miscount array indices or miss a deep match. Filter (?()) and script (()) expressions are not supported and are rejected with a message naming the supported subset. Deterministic: same input, same output. Example: path "$.store.book[-1].title" over {"store":{"book":[{"title":"A"},{"title":"B"}]}} -> matches ["B"], count 1.'
x-read-only: true
tags:
- Data
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
properties:
json:
type: string
description: The JSON document to query, as a string. Must parse as valid JSON (object, array, or primitive).
path:
type: string
maxLength: 500
description: 'JSONPath (subset). Supports $ root, .name / [''name''] child, [n] index (negative allowed), [*] wildcard, .. recursive descent, and [start:end] slice (optional :step). Filter (?()) and script (()) expressions are not supported. Example: $.items[*].id'
required:
- json
- path
example:
json: '{"store":{"book":[{"title":"A"},{"title":"B"}]}}'
path: $.store.book[-1].title
responses:
'200':
description: Structured tool result.
content:
application/json:
schema:
type: object
properties:
tool:
type: string
result:
type: object
additionalProperties: false
required:
- path
- matches
- count
- truncated
properties:
path:
type: string
description: Echo of the JSONPath that was evaluated.
matches:
type: array
description: Every matching value in document order; items may be any JSON type (object, array, string, number, boolean, or null).
items: {}
count:
type: integer
description: Number of matches (equals matches.length).
truncated:
type: boolean
description: True if the internal match cap was reached and further matches were dropped.
example:
tool: query_json
result:
path: $.store.book[-1].title
matches:
- B
count: 1
truncated: false
'400':
description: Invalid input or the tool reported an error.
content:
application/json:
schema:
type: object
required:
- error
properties:
error:
type: string
description: Human-readable, structured error message.
code:
type: string
description: Stable machine-readable error code.
tool:
type: string
description: Tool name, when the error is tool-specific.
'413':
description: Request body exceeds the 128 KB limit.
'429':
description: Rate limit exceeded; the response carries Retry-After and RateLimit-* headers — honor them and add jitter.
externalDocs:
description: LLM guide
url: https://api.clean.tools/llms.txt