$0.005
per call · USD Coin on Base
Repair caller-supplied malformed JSON by safely removing an outer Markdown fence, comments, single-quoted strings, unquoted identifier keys, Python literals, and trailing commas, with transformation hashes and strict rejection of duplicate keys or non-finite numbers.
Endpoint
POST https://apiacre.com/v1/data/json-repair3
Calls / 30d
2
Unique payers / 30d
Aug 31
Last called
exact
Payment scheme
Call this service
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";
const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);
const res = await fetchWithPay("https://apiacre.com/v1/data/json-repair", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"content": "```json\n{\n // generated result\n status: 'ok',\n rows: [1, 2, 3,],\n active:...",
"repairs": [
"markdown_fence",
"comments",
"single_quoted_strings",
"unquoted_keys",
"python_literals",
"trailing_commas"
]
}),
});
const data = await res.json();curl -X POST \
"https://apiacre.com/v1/data/json-repair" \
-H "Content-Type: application/json" \
-d '{"content":"```json\n{\n // generated result\n status: 'ok',\n rows: [1, 2, 3,],\n active:...","repairs":["markdown_fence","comments","single_quoted_strings","unquoted_keys","python_literals","trailing_commas"]}' \
-H "X-PAYMENT: <signed x402 payment>"Example response
{
"data": {
"appliedRepairs": [
{
"afterSha256": "e47f9ab1e0ee78db083237290fcdd35f83668f2b939c92e434b2103af7856f4f",
"beforeSha256": "9dd0095fe6576143aa8e835ced506030e8065e2589c4478a4be1342dc1aaa2ed",
"occurrences": 1,
"strategy": "markdown_fence"
}
],
"attemptSha256": "4db25e6c34e4f507a7b3addba28d9c40bda76572ef52c9a7b49facdea7f19440",
"content": "{\n \"active\": true,\n \"rows\": [\n 1,\n 2,\n 3\n ],\n \"status\": \"ok\"\n}",
"error": null,
"inputSha256": "9dd0095fe6576143aa8e835ced506030e8065e2589c4478a4be1342dc1aaa2ed",
"outputSha256": "b1b2333ad8949036facfd8ce006b4da0e612468a0e8a9b016514208af13321d5",
"repair": {
"appliedStrategyCount": 6,
"executionOrder": [
"markdown_fence",
"comments",
"single_quoted_strings",
"unquoted_keys",
"python_literals",
"trailing_commas"
],
"outputCanonicalization": "json-sort-keys-indent-2-utf8",
"permitted": [
"markdown_fence",
"comments",
"single_quoted_strings",
"unquoted_keys",
"python_literals",
"trailing_commas"
],
"version": "apiacre-json-repair/1"
},
"repaired": true,
"valid": true,
"validInput": false,
"warnings": []
},
"meta": {
"cached": false,
"duration_ms": 42,
"next_actions": [
{
"method": "POST",
"path": "/v1/data/schema",
"reason": "Infer a reusable Draft 2020-12 contract from the successfully repaired JSON.",
"service": "data.schema",
"title": "JSON Schema generator"
}
],
"sources": [],
"warnings": []
},
"request_id": "018f1f54-7f38-7ba2-8dc3-5f90272d9f1a",
"service": "data.json-repair",
"version": "1"
}Payment details
0xa0bfa4f07281c9b248dc3aed2217836bca24869bUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913Is this your API?
Pin it to the top of Data & Enrichment and the homepage with a featured placement.
More from API Acre & similar services
API Acre · Crypto Base Network Status
apiacre.com
Read the latest Base mainnet block and a bounded EIP-1559 fee history in one RPC batch, including gas utilization and priority-fee percentile samples.
API Acre · WEB Metadata
apiacre.com
Extract webpage metadata from one public URL: page title, meta description, canonical URL, headings, hreflang, icons, feeds, Open Graph, Twitter Cards, and JSON-LD Schema.org types, with redirect and response provenance plus privacy-safe, publisher-asserted Organization facts with field evidence.
API Acre · Data Schema
apiacre.com
Create and generate a nested JSON Schema Draft 2020-12 contract by inferring field types and required fields from representative JSON, CSV, TSV, JSON Lines, or YAML records, with equivalent CSV/TSV numeric and null inference, input evidence, and non-enforcing observed bounds.