{"uid":"cap_NRHsTiSp0efkkf1e7mEw3","slug":"json-query-via-jsonpath-52e151b9","name":"JSON Query via JSONPath","description":"Query a JSON document with a JSONPath expression.","url":"https://x402.agentindex.world/json/query?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","properties":{"data":{"title":"Data"},"path":{"type":"string","title":"Path"}}},"responseSchema":{"type":"json","example":{"matches":["A","B"]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_UqkgxFqnMjl6H3kGtgcco","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Query a JSON document using a JSONPath expression and return the matching values.","exampleAgentPrompt":"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?","exampleUseCases":[{"title":"Extract nested API response field","prompt":"I got this big JSON response from an API and I just need the value at $.data.user.email — can you query it for me? Here's the JSON: {\"data\":{\"user\":{\"name\":\"Alice\",\"email\":\"alice@example.com\",\"role\":\"admin\"}}}"},{"title":"Filter array items by property","prompt":"I have a JSON array of products and I want to find all items where the price is under 20. The JSON is {\"products\":[{\"name\":\"A\",\"price\":15},{\"name\":\"B\",\"price\":35},{\"name\":\"C\",\"price\":10}]} — use the path $.products[?(@.price < 20)] to filter it."},{"title":"Pull config value from settings blob","prompt":"Here's my app's config JSON: {\"app\":{\"settings\":{\"theme\":\"dark\",\"language\":\"en\",\"timeout\":30}}} — what does the JSONPath $.app.settings.timeout return?"}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T07:06:30.263Z","isFirstParty":false,"canonicalSlug":"json-query-via-jsonpath-52e151b9"}