{"description":"Searches the Ubuntu package archive like its package search page: one line per matching package and Ubuntu release, with the release name, the package page link and the section, description, version and architectures as printed on the page. Exact hits come first, then other hits. First results page only. Returns an empty list when nothing matches.","effect":"read","id":"packages.ubuntu.com/search-packages","keywords":["ubuntu","ubuntu packages","packages.ubuntu.com","deb","debian","apt","linux","package","packages","software","repository","archive","jammy","noble"],"output":{"schema":{"properties":{"packages":{"items":{"properties":{"name":{"description":"Source package name, e.g. 'htop'","type":"string"},"release":{"description":"Ubuntu release, e.g. 'noble (24.04LTS)'","type":"string"},"summary":{"description":"Section, description, version and architectures for this release, as one line","type":["string","null"]},"url":{"type":"string"}},"required":["name","release","url"],"type":"object"},"type":"array"},"query":{"type":"string"}},"required":["query","packages"],"type":"object"},"value":"{query: params.query, packages: steps.search.packages[?href != `null` && release != `null`].{name: split(href, '/')[2], release: release, summary: summary || `null`, url: join('', ['https://packages.ubuntu.com', href])}}"},"params":{"additionalProperties":false,"properties":{"query":{"description":"Package name or keyword, e.g. 'htop', 'git', 'curl'","maxLength":100,"minLength":2,"type":"string"}},"required":["query"],"type":"object"},"provenance":{"method":"har","notes":"GET /search?keywords=<query> answers 200 HTML. Results are li items in #psearchres (under the 'Exact hits' and 'Other hits' headings): a.resultlink holds the release and the package path /<release>/<name>. The line text gives section, description and version. Only the result list is read.","recorded_at":"2026-11-08T16:22:40.000Z","recorded_by":"wield-forge (claude-haiku agent)"},"requires_login":false,"schema":"https://wield.run/schema/recipe/v1.json","site":{"country":"GB","id":"packages.ubuntu.com","language":"en","name":"Ubuntu Packages","origin":"https://packages.ubuntu.com","origins":["https://packages.ubuntu.com"]},"steps":[{"description":"Ubuntu package search /search?keywords=…; read-only GET. Results are li items inside #psearchres, each linking to the package page of one release (a.resultlink) and printing section, description and version.","expect":{"assert":"status == `200` && contains(body, 'Package Search Results')","content_type":"html","status":[200]},"extract":{"html_items":{"packages":{"fields":{"href":{"attr":"href","selector":"a.resultlink"},"release":{"selector":"a.resultlink"},"summary":{"selector":":scope"}},"max":100,"selector":"#psearchres ul > li"}}},"id":"search","request":{"headers":{"Accept":"text/html"},"method":"GET","query":{"keywords":"{{params.query}}"},"url":"/search"}}],"task":"Search Ubuntu packages","tos":{"notes":"Not reviewed. One search page per call, the same page a visitor loads. The site's terms on automated access were not checked.","reviewed":false},"verify":{"checks":["length(output.packages) > `0`","length(output.packages[?starts_with(url, 'https://packages.ubuntu.com/')]) == length(output.packages)","length(output.packages[?name != `null`]) == length(output.packages)","length(output.packages[?release != `null`]) == length(output.packages)"],"example_params":{"query":"htop"},"max_ms":5000},"version":1}