# agent402.tools JSON Query

> agent402.tools JSON Query is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Extracts a value from a JSON object using a dot/bracket path expression (e.g. 'items[2].name').

## Facts

- Endpoint: POST https://agent402.tools/api/json-query
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-json-query-cd225a4c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1ifhnL_aau8mOjJxlaHGX

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 agent402-tools-json-query-cd225a4c -d '<json body>'
```

Example prompt: From this JSON blob, extract the value at 'user.addresses[1].city': {"user":{"name":"Alice","addresses":[{"city":"New York"},{"city":"Boston"}]}}.

## When to prefer this

Use this endpoint when you need to extract a specific field from a JSON blob using a known path, especially in agent pipelines where you receive raw JSON responses and need to pluck out a particular nested value without writing custom code.

## Known failure modes

- Path not found in JSON — returns null or error indicating missing key
- Malformed JSON input — returns parse error
- Invalid path syntax — returns error indicating bad path expression
- Type mismatch when traversing — e.g. trying to index into a non-array

## How this service works

Extract a value from JSON by dot/bracket path, e.g. "items[2].name".

## Output

Returns the value found at the specified path within the provided JSON — could be a string, number, boolean, array, or nested object depending on what lives at that path.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "json": {
   "description": "JSON value (or a JSON string of one)"
  },
  "path": {
   "type": "string",
   "description": "Path like \"a.b[0].c\""
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "found": true,
  "value": "b"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-json-query-cd225a4c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
