# JSON Query via JSONPath

> JSON Query via JSONPath is a paid API for AI agents from x402.agentindex.world, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-29).

Query a JSON document using a JSONPath expression and return the matching values.

## Facts

- Endpoint: GET https://x402.agentindex.world/json/query?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-query-via-jsonpath-52e151b9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NRHsTiSp0efkkf1e7mEw3

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 json-query-via-jsonpath-52e151b9
```

Example prompt: I have this JSON blob — {"store":{"books":[{"title":"Dune","price":9.99},{"title":"Foundation","price":12.99}]}} — can you run the JSONPath expression $.store.books[*].title on it and tell me what it returns?

## When to prefer this

Use this endpoint when you have a JSON document in hand and need to extract specific values using a JSONPath expression without spinning up a local runtime. Ideal for agents that receive JSON payloads from external APIs and need to pull out nested fields on the fly. Preferable over regex or string parsing when the document is deeply nested or when you want to leverage the full power of JSONPath filters and wildcards.

## Known failure modes

- Invalid JSONPath expression returns an error or empty result
- Malformed or non-parseable JSON input causes a parse error
- Path that does not match any node returns an empty array
- Missing required 'data' or 'path' parameter returns a 400-style error
- Very large JSON documents may time out or hit payload limits

## How this service works

Query a JSON document with a JSONPath expression.

## Output

Returns the value or values matched by the JSONPath expression applied to the provided JSON document. This may be a single scalar value, an array of matched elements, or an empty result if nothing matches.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "data": {
   "title": "Data"
  },
  "path": {
   "type": "string",
   "title": "Path"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "matches": [
   "A",
   "B"
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-query-via-jsonpath-52e151b9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.agentindex.world](https://www.zero.xyz/host/x402.agentindex.world/llms.txt)
