yq filter
Try it interactively →POST /api/yq-filterApply jq filter expressions to YAML over HTTP. Same expression language as jq-filter — the input is YAML and the result is reformatted as YAML by default.
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| filter* | string | "." | filter expression applied to the YAML-decoded value. |
| yaml* | file | — | YAML input. UTF-8. |
| outputFormat | enum (yaml | json) | "yaml" | Output format. yaml (default) re-serializes; json passes stdout through. |
| rawOutput | boolean | false | -r: raw strings without quoting. Only honored when outputFormat is "json". |
| compact | boolean | false | -c: compact output. Only honored when outputFormat is "json". |
| indent | number (1…8) | 2 | Indent width for the YAML output. Ignored when outputFormat is "json". |
Response
Modes: text, json. Cache: yes (24h TTL).
Code samples
Built from the list-features example.
# Download or substitute the example input:
# curl -O https://xtract.bot/examples/yq-filter/config.yaml
YAML=$(base64 -w0 < config.yaml)
curl -X POST https://api.xtract.bot/api/yq-filter \
-H "Content-Type: application/json" \
-H "Accept: text/plain" \
-H "X-Account-Id: $XTRACT_ACCOUNT_ID" \
-H "X-Api-Key: $XTRACT_API_KEY" \
-d '{
"filter": ".service.features[]",
"yaml": "'"$YAML"'"
}'