# Swift Bot Labs Toolbox – JSON Query

> Swift Bot Labs Toolbox – JSON Query is a paid API for AI agents from x402-toolbox.swiftbotlab.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-31).

Queries one or more JSONPath expressions against a JSON document and returns the matched values

## Facts

- Endpoint: POST https://x402-toolbox.swiftbotlab.workers.dev/v1/json/query?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/swift-bot-labs-toolbox-json-query-de53710f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_kuw7bGt0Pcst-lYxyWXPq

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability swift-bot-labs-toolbox-json-query-de53710f -d '<json body>'
```

Example prompt: Take this JSON blob and pull out the values at 'items[*].id' and '/meta/next' for me — I need both fields extracted in one shot.

## When to prefer this

Use this endpoint when you need to extract one or more specific fields from a JSON document using JSONPath expressions without setting up an account or API key — ideal for agent pipelines that process API responses, config files, or arbitrary JSON payloads on a pay-per-call basis with USDC via x402. Prefer it over writing inline JSON parsing logic when you need a deterministic, hosted extraction step.

## Known failure modes

- Invalid JSONPath syntax returns an error result with found=false for that path
- Malformed JSON input (not parseable) causes the whole request to fail
- Path not found in document returns found=false with a null value
- Exceeding 20 paths in the paths array is rejected by schema validation
- Payment not attached or insufficient USDC triggers an x402 payment-required response

## How this service works

62 small, deterministic utility APIs (DNS and e-mail checks, web extraction, EVM decoding, x402 checks, IP math, JSON/CSV, hashing, conversions). No account or API key: pay per call in USDC with x402.

## Output

Returns a JSON object with ok=true, tool='json-query', and a result containing an array of path results — each result includes the queried path string, a 'found' boolean, the matched value (or null if not found), and a 'multiple' flag indicating whether the path matched more than one value.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "json": {
   "description": "Document (a JSON value, or a string containing JSON)"
  },
  "path": {
   "type": "string",
   "maxLength": 1000
  },
  "paths": {
   "type": "array",
   "items": {
    "type": "string",
    "maxLength": 1000
   },
   "maxItems": 20
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "tool": "json-query",
  "result": {
   "results": [
    {
     "path": "items[*].id",
     "found": true,
     "value": [
      1,
      2
     ],
     "multiple": true
    },
    {
     "path": "/meta/next",
     "found": true,
     "value": null
    }
   ]
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/swift-bot-labs-toolbox-json-query-de53710f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-toolbox.swiftbotlab.workers.dev](https://www.zero.xyz/host/x402-toolbox.swiftbotlab.workers.dev/llms.txt)
