{"description":"Searches the Gentoo package database like its search page: package atom (category/name), short description and package page link. Returns the first results page only. Returns an empty list when nothing matches.","effect":"read","id":"packages.gentoo.org/search-packages","keywords":["gentoo","gentoo packages","packages.gentoo.org","ebuild","ebuilds","portage","emerge","linux","package","packages","software","source","compile","category"],"output":{"schema":{"properties":{"packages":{"items":{"properties":{"description":{"type":["string","null"]},"name":{"description":"Package atom, category/name, e.g. 'sys-devel/gcc'","type":"string"},"url":{"type":"string"}},"required":["name","url"],"type":"object"},"type":"array"},"query":{"type":"string"}},"required":["query","packages"],"type":"object"},"value":"{query: params.query, packages: steps.search.packages[?atom != `null` && href != `null`].{name: atom, description: (text && trim(split(text, atom)[1])) || `null`, url: join('', ['https://packages.gentoo.org', href])}}"},"params":{"additionalProperties":false,"properties":{"query":{"description":"Package name or keyword, e.g. 'gcc', 'python', 'vim'","maxLength":100,"minLength":2,"type":"string"}},"required":["query"],"type":"object"},"provenance":{"method":"har","notes":"GET /packages/search?q=<query> answers 200 HTML. Results are a.list-group-item-action links to /packages/<category>/<name>, each with an h3 holding the atom and the description as the rest of the link text. 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":"US","id":"packages.gentoo.org","language":"en","name":"Gentoo Packages","origin":"https://packages.gentoo.org","origins":["https://packages.gentoo.org"]},"steps":[{"description":"Gentoo package search /packages/search?q=…; read-only GET. Each result is an a.list-group-item-action card with an h3.kk-search-result-header (category/name) and the description text.","expect":{"assert":"status == `200` && contains(body, 'Search Results')","content_type":"html","status":[200]},"extract":{"html_items":{"packages":{"fields":{"atom":{"selector":"h3.kk-search-result-header"},"href":{"attr":"href","selector":":scope"},"text":{"selector":":scope"}},"max":50,"selector":"div.list-group > a.list-group-item-action"}}},"id":"search","request":{"headers":{"Accept":"text/html"},"method":"GET","query":{"q":"{{params.query}}"},"url":"/packages/search"}}],"task":"Search Gentoo ebuilds","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.gentoo.org/packages/')]) == length(output.packages)","length(output.packages[?name != `null`]) == length(output.packages)","length(output.packages[?contains(name, '/')]) == length(output.packages)"],"example_params":{"query":"gcc"},"max_ms":5000},"version":1}