$0.035
per call · USD Coin on Base
Normalize caller-supplied CSV, TSV, JSON, JSON Lines, or YAML to deterministic JSON, infer a Draft 2020-12 schema from that normalized value, and validate one future JSON value in a single x402 call.
Endpoint
POST https://apiacre.com/v1/data/contract2
Calls / 30d
1
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/contract", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"check_formats": true,
"content": "[{\"name\":\"Ada\",\"score\":98}]",
"format": "json",
"instance": [
{
"name": "Lin",
"score": 91
}
],
"max_errors": 25,
"root_mode": "records"
}),
});
const data = await res.json();curl -X POST \
"https://apiacre.com/v1/data/contract" \
-H "Content-Type: application/json" \
-d '{"check_formats":true,"content":"[{\"name\":\"Ada\",\"score\":98}]","format":"json","instance":[{"name":"Lin","score":91}],"max_errors":25,"root_mode":"records"}' \
-H "X-PAYMENT: <signed x402 payment>"Example response
{
"data": {
"contract": {
"inference": {
"csvEmptyStringsAsNull": false,
"csvNumericStringsCoerced": false,
"dialect": "https://json-schema.org/draft/2020-12/schema",
"tabularNumericStringsCoerced": false,
"version": "apiacre-schema-inference/3"
},
"input": {
"characters": 46,
"format": "json",
"records": 1,
"rootMode": "records",
"utf8Bytes": 46
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"items": {
"properties": {
"name": {
"type": "string",
"x-apiacre-observed": {
"missingCount": 0,
"nullCount": 0,
"presentCount": 1,
"sampleCount": 1,
"types": [
"string"
]
}
},
"score": {
"type": "integer",
"x-apiacre-observed": {
"missingCount": 0,
"nullCount": 0,
"presentCount": 1,
"sampleCount": 1,
"types": [
"integer"
]
}
}
},
"required": [
"name",
"score"
],
"type": "object",
"x-apiacre-observed": {
"missingCount": 0,
"nullCount": 0,
"presentCount": 1,
"sampleCount": 1,
"types": [
"object"
]
}
},
"type": "array",
"x-apiacre-observed": {
"missingCount": 0,
"nullCount": 0,
"presentCount": 1,
"sampleCount": 1,
"types": [
"array"
]
}
}
},
"normalized": {
"content": "[\n {\n \"name\": \"Ada\",\n \"score\": 98\n }\n]",
"format": "json",
"records": 1,
"rootMode": "records",
"sourceFormat": "json"
},
"pipeline": {
"deterministic": true,
"networkRequestsMade": 0,
"singlePaymentAuthorization": true,
"steps": [
"normalize-to-json",
"infer-draft-2020-12",
"validate-instance"
],
"version": "apiacre-data-contract/1"
},
"validation": {
"errorCount": 0,
"errorCountExact": true,
"instanceValid": true,
"schemaValid": true,
"valid": true
}
},
"meta": {
"cached": false,
"duration_ms": 42,
"next_actions": [],
"sources": [],
"warnings": []
},
"request_id": "018f1f54-7f38-7ba2-8dc3-5f90272d9f1a",
"service": "data.contract",
"version": "1"
}Payment details
0xa0bfa4f07281c9b248dc3aed2217836bca24869bUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913Is this your API?
Pin it to the top of Onchain Data 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.