{"description":"Searches pkg.go.dev, the Go package index, like its search page: package name, import path, synopsis, number of importing packages, license and link. First page of results (about 25 packages). Returns an empty list when nothing matches.","effect":"read","id":"pkg.go.dev/search-packages","keywords":["go","golang","pkg.go.dev","go packages","modules","go modules","library","libraries","gin","cobra","gorm","package index","open source"],"output":{"schema":{"properties":{"packages":{"items":{"properties":{"import_path":{"description":"Module or package path, e.g. 'github.com/gin-gonic/gin'","type":"string"},"imported_by":{"description":"Number of packages that import it","type":["integer","null"]},"license":{"type":["string","null"]},"name":{"type":"string"},"synopsis":{"type":["string","null"]},"url":{"type":"string"}},"required":["name","import_path","url"],"type":"object"},"type":"array"},"query":{"type":"string"}},"required":["query","packages"],"type":"object"},"value":"{query: params.query, packages: steps.search.packages[?title != `null` && href != `null`].{name: split(title, ' (')[0], import_path: trim_left(href, '/'), synopsis: synopsis || `null`, imported_by: (imported_by && to_number(replace(imported_by, ',', ''))) || `null`, license: license || `null`, url: join('', ['https://pkg.go.dev', href])}}"},"params":{"additionalProperties":false,"properties":{"query":{"description":"Package name or keyword, e.g. 'gin', 'cobra', 'postgres driver'","maxLength":100,"minLength":2,"type":"string"}},"required":["query"],"type":"object"},"provenance":{"method":"har","notes":"GET /search?q=<query> answers 200 HTML with the result snippets in div.SearchSnippet. Titles link to the package path, and the synopsis, imported-by count and license come from the snippet's own labelled elements. Selectors use data-test-id and aria-label attributes, not hashed classes.","recorded_at":"2026-11-08T16:08:00.000Z","recorded_by":"wield-forge (claude-haiku agent)"},"requires_login":false,"schema":"https://wield.run/schema/recipe/v1.json","site":{"country":"US","id":"pkg.go.dev","language":"en","name":"Go Packages","origin":"https://pkg.go.dev","origins":["https://pkg.go.dev"]},"steps":[{"description":"Server-rendered search results page /search?q=…; read-only GET. Each result is div.SearchSnippet with its title link (data-test-id snippet-title), synopsis, imported-by count and license.","expect":{"assert":"status == `200` && contains(body, 'Search Results')","content_type":"html","status":[200]},"extract":{"html_items":{"packages":{"fields":{"href":{"attr":"href","selector":"[data-test-id='snippet-title']"},"imported_by":{"selector":"a[aria-label='Go to Imported By'] strong"},"license":{"selector":"[data-test-id='snippet-license'] a"},"synopsis":{"selector":"[data-test-id='snippet-synopsis']"},"title":{"selector":"[data-test-id='snippet-title']"}},"max":50,"selector":"div.SearchSnippet"}}},"id":"search","request":{"headers":{"Accept":"text/html"},"method":"GET","query":{"q":"{{params.query}}"},"url":"/search"}}],"task":"Search Go 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://pkg.go.dev/')]) == length(output.packages)","length(output.packages[?name != `null`]) == length(output.packages)","length(output.packages[?import_path != `null`]) == length(output.packages)"],"example_params":{"query":"gin"},"max_ms":5000},"version":1}