jq
Command-line JSON processor.
KaliParrotLinuxpassive
pkg: jq
jq filters, maps and reshapes JSON — essential for API testing and parsing tool output.
Syntax
jq "{filter}" [file]
Example
curl -s https://api/x | jq ".data[].id"
Extracts every id from the data array of a JSON response.
Options & flags
What each switch does. Toggle them in the builder below to assemble a command.
Command builder
Tick options (and fill any values) to build a ready-to-copy command.
jq
Usage examples
curl -s api/x | jq ".data[].id"
Extract every id from an array.
jq -r ".items[].name" file.json
Print names as raw strings.
Advantages
- Powerful JSON querying
- Pipes with curl beautifully
Disadvantages
- Own filter syntax
- JSON only
Tags
#json#api
Official docs: jq ↗
Related commands
Frequently asked questions
What is jq used for?
jq filters, maps and reshapes JSON — essential for API testing and parsing tool output.
What is an example jq command?
A common example is: curl -s https://api/x | jq ".data[].id" — Extracts every id from the data array of a JSON response.
Is jq part of Kali Linux?
Yes. jq ships with Kali Linux (and Parrot OS). If missing, install it with: sudo apt install jq.
What category of security tool is jq?
jq is a Core Linux tool with a passive-risk profile when run against a live target.
Try recon tools live
Run real scans against a domain you control, stage by stage.