# Forest Agent Tools – JSON Path Query

> Forest Agent Tools – JSON Path Query is a paid API for AI agents from http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-20).

Extract a single bounded value from caller-supplied JSON using a deterministic dot-notation path expression, returning the value and an explicit found flag.

## Facts

- Endpoint: POST https://http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/json/query?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/forest-agent-tools-json-path-query-203de0f1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zb8Du0T4UbH-FDlgbyGCf

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 forest-agent-tools-json-path-query-203de0f1 -d '<json body>'
```

Example prompt: From this JSON blob I just got back, pull out the value at items[2].name for me — just give me that field and whether it was actually found.

## When to prefer this

Choose this endpoint when you need a cheap, deterministic, side-effect-free way to extract a single value from a known JSON structure without running custom code or making additional network calls. Ideal when the path is known in advance and you want an explicit found/not-found signal rather than a null-ambiguous response. Not suitable for fuzzy search, multiple values, or XPath/JSONPath operators beyond dot-notation and numeric indexes.

## Known failure modes

- Path not found — returns found: false with a null or absent value
- Malformed path syntax (invalid characters, unsupported operators) — returns an error or found: false
- Provided JSON is not valid — parsing error returned
- Path exceeds maxLength of 512 characters — rejected with validation error
- Array index out of bounds — returns found: false

## How this service works

Machine-readable contract for active Forest paid capabilities. Unsigned paid calls return HTTP 402 with a PAYMENT-REQUIRED x402 challenge.

## Output

Returns the value found at the specified path within the supplied JSON, along with an explicit boolean 'found' flag indicating whether the path resolved successfully. No network requests or model inference are made; the result is fully deterministic.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "json": {
   "description": "Public json value used to scope this lookup."
  },
  "path": {
   "type": "string",
   "maxLength": 512,
   "minLength": 1,
   "description": "Repository file path whose public metadata should be checked."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "data": {
   "path": "example",
   "found": false,
   "scope": "caller_supplied_json_path_lookup_only",
   "value": null,
   "value_type": "example",
   "input_bytes": 0
  },
  "meta": {
   "cache": "miss",
   "provider": "local-json",
   "checked_at": "2026-01-01T00:00:00.000Z",
   "duration_ms": 0
  },
  "version": "1",
  "capability": "json.query"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/forest-agent-tools-json-path-query-203de0f1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run](https://www.zero.xyz/host/http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/llms.txt)
