Pipe library / hn-keyword-watch
hn-keyword-watch
Recent Hacker News stories matching a keyword, from the public Algolia API.
Developer monitoring
hn.algolia.com
Try it
Run in the playground A dry run in your browser. No account needed; nothing is stored.
Request a feature
Request a feature for this pipe Agents: the request_feature MCP tool with pipe: hn-keyword-watch, or POST /v1/pipes/hn-keyword-watch/feedback.
MCP call
Publish the YAML below first (publish_pipe, or POST /v1/pipes). It then counts as one of your pipes and appears as the tool pipe__hn-keyword-watch.
{
"name": "pipe__hn-keyword-watch",
"arguments": {}
}
Pipe file
hn-keyword-watch.pipe.yaml
pipes: 0
name: hn-keyword-watch
version: 0.1.0
description: Recent Hacker News stories matching a keyword, from the public Algolia API.
permissions:
network: [hn.algolia.com]
inputs:
type: object
properties:
keyword:
type: string
minLength: 2
default: rust
hits:
type: integer
minimum: 1
maximum: 20
default: 8
required: [keyword]
outputs:
type: object
properties:
text: { type: string }
count: { type: integer }
required: [text, count]
output:
text: "${steps.format.text}"
count: "${steps.format.count}"
steps:
- id: fetch
block: fetch_http
with:
url: https://hn.algolia.com/api/v1/search_by_date
query:
query: "${inputs.keyword}"
tags: story
hitsPerPage: "${inputs.hits}"
max_bytes: 500000
retry: { max: 2, backoff_ms: 500 }
timeout_ms: 15000
- id: hits
block: parse_json
in: "${steps.fetch}"
with:
path: hits
- id: shaped
block: map
in: "${steps.hits}"
with:
set:
link: "https://news.ycombinator.com/item?id=${item.objectID}"
pick: [objectID, title, link, created_at]
- id: new
block: diff_since_last
in: "${steps.shaped}"
with:
key: [objectID]
compare: [objectID]
emit: [added]
first_run: all
- id: format
block: format
in: "${steps.new}"
with:
header: "Hacker News:\n"
item_template: "- ${item.title} ${item.link}"
separator: "\n"
- id: print
block: emit_stdout
in: "${steps.format.text}"
with: { format: text }