data $0.0003 / call
JSON Pointer
Select JSON values with up to 100 RFC 6901 pointer strings, preserving missing versus null.
data.json-pointerdata.json-patch · v1.0.0
Apply up to 100 RFC 6902 operations transactionally to supplied JSON, with strict pointers, safe object properties and bounded intermediate results.
{
"data": {
"cart": [
{
"sku": "BEANS-500",
"quantity": 1
}
],
"currency": "USD"
},
"patch": [
{
"op": "test",
"path": "/currency",
"value": "USD"
},
{
"op": "replace",
"path": "/cart/0/quantity",
"value": 2
},
{
"op": "add",
"path": "/cart/-",
"value": {
"sku": "MUG",
"quantity": 1
}
}
]
}{
"documentExists": true,
"data": {
"cart": [
{
"sku": "BEANS-500",
"quantity": 2
},
{
"sku": "MUG",
"quantity": 1
}
],
"currency": "USD"
},
"operationsApplied": 3,
"scope": "RFC 6902 operations on supplied JSON only; no remote writes. Atomic failure, own object properties and exact JSON comparison. At most 100 operations, depth 32, 12000 nodes and 60000 bytes after each operation; numbers have JSON/JavaScript precision."
}Generated from the actual handler using this example input; this is a preview, not a paid API call. Paid responses wrap the result with a receipt and recovery expiry.
Add credits in the workspace and keep your API key in private environment storage. Use the same request ID and exact body to recover a lost response within ten minutes.
// Node.js 22+. Read the key from your private environment.
const requestId = Date.now() + '_' + crypto.randomUUID();
const response = await fetch('https://agent-utilities.agent-utilities.workers.dev/v1/tools/data.json-patch', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + process.env.AGENT_UTILITIES_API_KEY,
'Idempotency-Key': requestId
},
body: JSON.stringify({
"data": {
"cart": [
{
"sku": "BEANS-500",
"quantity": 1
}
],
"currency": "USD"
},
"patch": [
{
"op": "test",
"path": "/currency",
"value": "USD"
},
{
"op": "replace",
"path": "/cart/0/quantity",
"value": 2
},
{
"op": "add",
"path": "/cart/-",
"value": {
"sku": "MUG",
"quantity": 1
}
}
]
})
});
const data = await response.json();
if (!response.ok) throw new Error(data.error?.message ?? 'Request failed');
console.log(data);
// On response loss, retry this SAME requestId, tool and body.
// Do not rerun the line that generates requestId for a retry.{
"type": "object",
"properties": {
"data": {},
"patch": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"op": {
"const": "add"
},
"path": {
"type": "string",
"maxLength": 2048
},
"value": {}
},
"required": [
"op",
"path",
"value"
]
},
{
"type": "object",
"properties": {
"op": {
"const": "replace"
},
"path": {
"type": "string",
"maxLength": 2048
},
"value": {}
},
"required": [
"op",
"path",
"value"
]
},
{
"type": "object",
"properties": {
"op": {
"const": "test"
},
"path": {
"type": "string",
"maxLength": 2048
},
"value": {}
},
"required": [
"op",
"path",
"value"
]
},
{
"type": "object",
"properties": {
"op": {
"const": "remove"
},
"path": {
"type": "string",
"maxLength": 2048
}
},
"required": [
"op",
"path"
]
},
{
"type": "object",
"properties": {
"op": {
"const": "move"
},
"path": {
"type": "string",
"maxLength": 2048
},
"from": {
"type": "string",
"maxLength": 2048
}
},
"required": [
"op",
"path",
"from"
]
},
{
"type": "object",
"properties": {
"op": {
"const": "copy"
},
"path": {
"type": "string",
"maxLength": 2048
},
"from": {
"type": "string",
"maxLength": 2048
}
},
"required": [
"op",
"path",
"from"
]
}
]
},
"maxItems": 100
}
},
"required": [
"data",
"patch"
],
"additionalProperties": false
}{
"type": "object",
"properties": {
"documentExists": {
"type": "boolean"
},
"data": {},
"operationsApplied": {
"type": "number"
},
"scope": {
"type": "string"
}
},
"required": [
"documentExists",
"operationsApplied",
"scope"
],
"additionalProperties": false
}Prices are experimental. The service currently allows 1,000 new calls per day across all accounts. Failed operations return reserved credits. Successful results are encrypted for ten-minute retry recovery. Review data handling and service limits.
data $0.0003 / call
Select JSON values with up to 100 RFC 6901 pointer strings, preserving missing versus null.
data.json-pointerdata $0.0005 / call
Compare JSON structures and return bounded changes at JSON Pointer paths.
data.json-diffdata $0.0003 / call
Serialize JSON with sorted object keys for deterministic comparison; not RFC 8785 certification.
data.json-canonical