JSONPath tester
Paste a JSON response, type a path, and see the values it returns. It runs in your browser.
What this tool does
JSONPath is to JSON what XPath is to HTML. It describes where a value lives so you can pull it out. This tool implements a small, common subset: $ for the root, .key or ['key'] for a field, [0] or [-1] for an array index, [*] or .* for every child, and ..key to find a key at any depth.
It does not support filter expressions such as [?(@.price < 10)], slices or unions. Keep paths simple and handle conditions in Alertcat instead.
How it relates to Alertcat filters
Alertcat can watch JSON APIs directly. With a JSON filter, you keep only the fields you care about, so unrelated fields such as a request id or a timestamp do not cause alerts. Alertcat supports JSONPath and jq for this. A filter on $.data.price watches a single price in a large response.
Many sites that look like they need a login or a browser also expose their data as JSON. If a page loads its prices from an endpoint, watching that endpoint is often more stable than watching the page. You can set headers and cookies per watch for endpoints that need them.
Combine a JSON filter with a condition to alert only when a value crosses a limit, for example when a price falls below a number you set.
Using the result in a watch
- Paste the JSON and a path, then press Test path.
- Refine the path until the result is just the value or list you want.
- Add the path to the JSON filter field of a watch that points at the API URL.
- Add a condition or notification template if you want an alert only for certain values.
Frequently asked questions
Why does my path return no results?
Check key names and case. Use ..name to find a key at any depth, then tighten the path.
Can I use jq instead?
Yes. Alertcat supports jq in watches. This tool tests JSONPath only.
Is my JSON uploaded?
No. It is parsed in your browser.
Test a JSONPath
Related
Watch the pages that matter
Alertcat is in early access. Tell us what you want to watch and we will set up your team.