{"uid":"cap_kGpM8x4vLzAxHo1K_6mix","slug":"402utils-com-jq-filter-acf5c947","name":"402utils.com jq Filter","description":"Apply a jq-style filter to JSON — the JSON swiss-army knife. Supports identity, fields, index/slice/iterate, pipe |, comma, //, and/or/not, arithmetic, comparisons, array/object construction and builtins (select, map, keys, length, add, sort_by, group_by, unique, to_entries, has, range…). A SAFE pure-JS subset (no eval, bounded): no variables, def, reduce, regex or assignment. Returns the whole jq output stream as results[].","url":"https://402utils.com/v1/jq","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"json":{"description":"The input document — any JSON value (object, array, string, number, boolean or null)."},"filter":{"type":"string","description":"A jq-style filter, e.g. '.users | map(.name)'. Max 8192 chars."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_rH0pOGoHHyghhepPO8lGr","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Applies a jq-style filter to a JSON document and returns the full output stream as a results array","exampleAgentPrompt":"Run this jq filter '.users | map(.name)' on the following JSON and give me the results: {\"users\":[{\"name\":\"Alice\",\"age\":30},{\"name\":\"Bob\",\"age\":25}]}.","exampleUseCases":[{"title":"Extract user emails from API response","prompt":"I just got a big JSON response from our CRM with hundreds of user records. Can you run a jq filter to pull out just the email addresses and sort them alphabetically for me?"},{"title":"Filter purchase orders by status","prompt":"Here's a JSON file with all our orders. I need you to use jq to find every order where the status is 'pending' and give me just the order IDs and customer names in a clean list."},{"title":"Reshape nested API data for export","prompt":"This API returns deeply nested user profile data. Can you apply a jq transformation to flatten it and extract only the id, username, and last_login_date fields into a simpler structure I can work with?"}],"resultDescription":"A JSON object with a 'results' array containing all values emitted by the jq filter applied to the input document. Each element in results corresponds to one output value from the jq output stream.","failureModes":["Invalid jq filter syntax returns an error message","Filter uses unsupported jq features (variables, def, reduce, regex, assignment) and is rejected","Filter string exceeds 8192 character limit","Input JSON is malformed and cannot be parsed","Filter produces no output for the given input, returning an empty results array","Payment not received or insufficient USDC balance causes 402 Payment Required response"],"whenToPreferThis":"Use this endpoint when you need to run jq-style queries or transformations on JSON data without installing jq locally or executing untrusted code. Ideal for AI agents that need to reshape, filter, or extract data from JSON documents on the fly. Prefer over regex or manual parsing when the transformation logic is naturally expressible as a jq pipeline. Note: does not support full jq (no variables, def, reduce, regex, or assignment operators).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T18:54:53.437Z","isFirstParty":false}