How to Search Hacker News from OpenClaw

OpenClaw bots are good at answering questions, but they’re limited to their training data when it comes to what developers are actually saying right now. Connect AgentPatch and your bot gets access to hackernews-search — a tool that queries Hacker News stories and comments, filterable by type, time range, and sort order.

Why This Matters

If you’re a founder, product manager, or team lead, you need to stay plugged into developer conversations. Hacker News is where developers discuss new tools, share war stories, and give blunt feedback on products. That’s valuable market intelligence, but combing through threads manually isn’t a great use of your time.

An OpenClaw bot with HN search can do the legwork. Ask it a question in chat, get a structured answer backed by real community discussions.

Setup

The AgentPatch CLI is designed for AI agents to use via shell access. Install it, and your agent can discover and invoke any tool on the marketplace.

Install (zero dependencies, Python 3.10+):

pip install agentpatch

Set your API key:

export AGENTPATCH_API_KEY=your_api_key

Example commands your agent will use:

ap search "web search"
ap run google-search --input '{"query": "test"}'

Get your API key from the AgentPatch dashboard.

Install the AgentPatch skill from ClawHub — it teaches OpenClaw when to use AgentPatch and how to use the CLI:

clawhub install agentpatch

MCP Server (Alternative)

If you prefer raw MCP tool access instead of the skill, add AgentPatch to ~/.openclaw/openclaw.json:

{
  "mcp": {
    "servers": {
      "agentpatch": {
        "transport": "streamable-http",
        "url": "https://agentpatch.ai/mcp",
        "headers": {
          "Authorization": "Bearer YOUR_API_KEY"
        }
      }
    }
  }
}

Replace YOUR_API_KEY with your actual key from the AgentPatch dashboard. Restart OpenClaw and it discovers all AgentPatch tools automatically.

Example

You’re a developer advocate evaluating whether your documentation needs an overhaul. You message your bot:

“Search Hacker News for mentions of ‘FastAPI documentation’ from the past year. What are developers saying?”

The bot calls hackernews-search and responds:

Found 6 stories and 23 comments mentioning FastAPI documentation.

Positive:
- Multiple threads praise FastAPI's auto-generated OpenAPI docs as a
  major selling point vs Flask/Django.
- Several commenters call the tutorial "one of the best in any framework."

Criticism:
- A recurring complaint is that the docs assume prior knowledge of Pydantic
  v2, which trips up beginners.
- Two threads mention outdated examples that reference Pydantic v1 syntax.
- One commenter notes that advanced topics like dependency injection
  patterns are underdocumented.

Overall sentiment is strongly positive, but the Pydantic v2 migration
left some gaps that developers are noticing.

Now you have a clear picture. You follow up:

“Find the most upvoted story about FastAPI from the past month. What was the discussion about?”

The bot searches again with sort: date and time_range: past_month, finds the top story, and gives you the highlights. You’re getting developer pulse checks without leaving your chat window.

You can also go broader:

“Compare what HN says about FastAPI vs Litestar vs Django Ninja. Search for each one and give me a sentiment comparison.”

The bot runs three searches and puts together a comparison table. That’s competitive research done in under a minute.

Wrapping Up

Connecting AgentPatch to OpenClaw gives your bot Hacker News search plus everything else on the marketplace — Google Search, email, image generation, and more. One setup, all the tools. Start exploring at agentpatch.ai.