[{"data":1,"prerenderedAt":125},["ShallowReactive",2],{"blog-post-jq-use-with-curl":3,"recent-posts":80},{"id":4,"uid":5,"url":6,"type":7,"href":8,"tags":9,"first_publication_date":10,"last_publication_date":10,"slugs":11,"linked_documents":13,"lang":14,"alternate_languages":15,"data":16},"awgi_hIAACoAhibc","jq-use-with-curl",null,"blog_posts","https:\u002F\u002Fmarks-personal-website.cdn.prismic.io\u002Fapi\u002Fv2\u002Fdocuments\u002Fsearch?ref=axNCmBMAACwA2vJJ&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22awgi_hIAACoAhibc%22%29+%5D%5D",[],"2026-12-04T22:45:44+0000",[12],"how-to-use-jq-with-curl",[],"en-us",[],{"title":17,"date":23,"description":24,"image":29,"content":40},[18],{"type":19,"text":20,"spans":21,"direction":22},"heading1","How to Use 'jq' with 'curl'",[],"ltr","2026-12-04",[25],{"type":26,"text":27,"spans":28,"direction":22},"heading2","Learn how to use jq with curl to read and filter JSON from an API",[],{"dimensions":30,"alt":33,"copyright":6,"url":34,"id":35,"edit":36},{"width":31,"height":32},1280,720,"jq: How to Use jq with curl","https:\u002F\u002Fimages.prismic.io\u002Fmarks-personal-website\u002F3JyqU0cTsv3S-6D0_jq-use-with-curl.png?auto=format,compress","3JyqU0cTsv3S-6D0",{"x":37,"y":37,"zoom":38,"background":39},0,1,"transparent",[41,45,49,52,55,58,61,64,67,70,73,77],{"type":42,"text":43,"spans":44,"direction":22},"paragraph","Before we start, make sure you have jq installed on your computer. On a Mac, you can install it with Homebrew:",[],{"type":46,"text":47,"spans":48,"direction":22},"preformatted","brew install jq",[],{"type":42,"text":50,"spans":51,"direction":22},"curl comes with macOS, so there's nothing else to install. First, save the API address in a variable. We'll use a real WordPress blog, which serves its posts at \u003Ccode>\u002Fwp-json\u002Fwp\u002Fv2\u002Fposts\u003C\u002Fcode>:",[],{"type":46,"text":53,"spans":54,"direction":22},"URL=\"https:\u002F\u002Ftechcrunch.com\u002Fwp-json\u002Fwp\u002Fv2\u002Fposts?per_page=10\"",[],{"type":42,"text":56,"spans":57,"direction":22},"Then pipe the response into jq:",[],{"type":46,"text":59,"spans":60,"direction":22},"curl -s \"$URL\" | jq .",[],{"type":42,"text":62,"spans":63,"direction":22},"The \u003Ccode>-s\u003C\u002Fcode> flag keeps curl silent, so its progress bar doesn't get mixed into the output. The full response is long, so pick out only the fields you need with \u003Ccode>.[] | {title: .title.rendered, link, date}\u003C\u002Fcode>.",[],{"type":42,"text":65,"spans":66,"direction":22},"For plain text you can pass to other commands, add \u003Ccode>-r\u003C\u002Fcode>:",[],{"type":46,"text":68,"spans":69,"direction":22},"curl -s \"$URL\" | jq -r '.[].title.rendered'",[],{"type":42,"text":71,"spans":72,"direction":22},"To filter by a keyword, add \u003Ccode>select(test(\"AI\"))\u003C\u002Fcode>. Be careful with the \u003Ccode>\"i\"\u003C\u002Fcode> flag for short words: \u003Ccode>test(\"AI\"; \"i\")\u003C\u002Fcode> also matches the letters inside words like \u003Ccode>said\u003C\u002Fcode>.",[],{"type":74,"oembed":75},"embed",{"embed_url":76,"type":74},"",{"type":42,"text":78,"spans":79,"direction":22},"If you'd rather use a developer blog, DEV has a clean public API too: \u003Ccode>curl -s \"https:\u002F\u002Fdev.to\u002Fapi\u002Farticles?per_page=5\" | jq -r '.[].title'\u003C\u002Fcode>.",[],{"results":81,"page":38,"results_per_page":123,"results_size":123,"total_results_size":124,"total_pages":38},[82,102,121],{"id":83,"uid":84,"url":6,"type":7,"href":85,"tags":86,"first_publication_date":10,"last_publication_date":10,"slugs":87,"linked_documents":89,"lang":14,"alternate_languages":90,"data":91},"awgi0RIAACYAhiZv","ripgrep-replace-text-in-files","https:\u002F\u002Fmarks-personal-website.cdn.prismic.io\u002Fapi\u002Fv2\u002Fdocuments\u002Fsearch?ref=axNCmBMAACwA2vJJ&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22awgi0RIAACYAhiZv%22%29+%5D%5D",[],[88],"how-to-replace-text-in-files-with-ripgrep-and-sed",[],[],{"image":92,"title":98},{"dimensions":93,"alt":94,"copyright":6,"url":95,"id":96,"edit":97},{"width":31,"height":32},"Ripgrep: How to Replace Text in Files with Ripgrep and Sed","https:\u002F\u002Fimages.prismic.io\u002Fmarks-personal-website\u002FOlJ7le5oNEXxcE_I_ripgrep-replace-text-in-files.png?auto=format,compress","OlJ7le5oNEXxcE_I",{"x":37,"y":37,"zoom":38,"background":39},[99],{"type":19,"text":100,"spans":101,"direction":22},"How to Replace Text in Files with Ripgrep and Sed",[],{"id":103,"uid":104,"url":6,"type":7,"href":105,"tags":106,"first_publication_date":10,"last_publication_date":10,"slugs":107,"linked_documents":109,"lang":14,"alternate_languages":110,"data":111},"awgi2hIAACoAhiaF","ripgrep-case-insensitive-search","https:\u002F\u002Fmarks-personal-website.cdn.prismic.io\u002Fapi\u002Fv2\u002Fdocuments\u002Fsearch?ref=axNCmBMAACwA2vJJ&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22awgi2hIAACoAhiaF%22%29+%5D%5D",[],[108],"ripgrep-how-to-search-case-insensitive",[],[],{"image":112,"title":118},{"dimensions":113,"alt":114,"copyright":6,"url":115,"id":116,"edit":117},{"width":31,"height":32},"Ripgrep: How to Search Case Insensitive","https:\u002F\u002Fimages.prismic.io\u002Fmarks-personal-website\u002F6H2DfjROfkSO4wel_ripgrep-case-insensitive-search.png?auto=format,compress","6H2DfjROfkSO4wel",{"x":37,"y":37,"zoom":38,"background":39},[119],{"type":19,"text":114,"spans":120,"direction":22},[],{"id":4,"uid":5,"url":6,"type":7,"href":8,"tags":9,"first_publication_date":10,"last_publication_date":10,"slugs":11,"linked_documents":13,"lang":14,"alternate_languages":15,"data":122},{"image":29,"title":17},3,137,1796424369380]