{"description":"Searches Hex.pm, the Erlang and Elixir package index, like its packages page sorted by recent downloads: package name, description, total downloads and link. First page of results (about 30 packages). Returns an empty list when nothing matches.","effect":"read","id":"hex.pm/search-packages","keywords":["hex","hex.pm","elixir","erlang","packages","phoenix","ecto","jason","hex packages","libraries","library","mix","beam"],"output":{"schema":{"properties":{"packages":{"items":{"properties":{"description":{"type":["string","null"]},"name":{"type":"string"},"total_downloads":{"type":["integer","null"]},"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[?name != `null` && href != `null`].{name: name,description: description || `null`, total_downloads: (total_downloads && to_number(replace(split(total_downloads, ': ')[1], ' ', ''))) || `null`, url: join('', ['https://hex.pm', href])}}"},"params":{"additionalProperties":false,"properties":{"query":{"description":"Package name or keyword, e.g. 'phoenix', 'ecto', 'json'","maxLength":100,"minLength":2,"type":"string"}},"required":["query"],"type":"object"},"provenance":{"method":"har","notes":"GET /packages?search=<query>&sort=recent_downloads answers 200 HTML with the first page of results as li.group items. Name and link come from the package link, description from its paragraph, and total downloads from the title attribute ('total downloads: N'). Selectors use the link href and title attributes, not hashed classes.","recorded_at":"2026-11-08T16:20:00.000Z","recorded_by":"wield-forge (claude-haiku agent)"},"requires_login":false,"schema":"https://wield.run/schema/recipe/v1.json","site":{"country":"US","id":"hex.pm","language":"en","name":"Hex","origin":"https://hex.pm","origins":["https://hex.pm"]},"steps":[{"description":"Server-rendered packages page /packages?search=…&sort=recent_downloads; read-only GET. Each result is an li.group with a package link (href /packages/<name>), a description paragraph and a total-downloads element whose title attribute holds the total.","expect":{"content_type":"html","status":[200]},"extract":{"html_items":{"packages":{"fields":{"description":{"selector":"p.line-clamp-2"},"href":{"attr":"href","selector":"a[href^='/packages/']"},"name":{"selector":"a[href^='/packages/']"},"total_downloads":{"attr":"title","selector":"div[title^='total downloads']"}},"max":50,"selector":"li.group"}}},"id":"search","request":{"headers":{"Accept":"text/html"},"method":"GET","query":{"search":"{{params.query}}","sort":"recent_downloads"},"url":"/packages"}}],"task":"Search Elixir 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://hex.pm/packages/')]) == length(output.packages)","length(output.packages[?name != `null`]) == length(output.packages)","length(output.packages[?total_downloads != `null`]) > `0`"],"example_params":{"query":"phoenix"},"max_ms":5000},"version":1}