Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library
← Back to context

Comment by andai

2 days ago

    from ddgs import DDGS

    def web_search(query: str, max_results: int = 8) -> list[dict]:
        return DDGS().text(query, max_results=max_results)

0 comments

andai

Reply

No comments yet

Contribute on Hacker News ↗

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities