# Algolia HN Search MCP Server — 4 tools via DADL

The Algolia HN Search DADL turns Algolia HN Search's API into an MCP server that Claude, GPT or any MCP-compatible agent can consume directly. One YAML file declares all 4 tools — item, user, full-text — and ToolMesh serves them at runtime. No Python boilerplate, no per-endpoint code, no separate MCP server process.

Below: the endpoint coverage matrix, a two-block ToolMesh setup, the full tool reference grouped by Algolia HN Search feature area.

**Source:** [Algolia HN Search API](https://hn.algolia.com/api)

**Updated:** 2026-04-04

**Tags:** search, crud, analytics, documentation, real-time, user-management, auth:apikey

## Which Algolia HN Search endpoints are covered?

**100%** (4 of ~4 endpoints).

**Focus:** full-text search (relevance and date), item retrieval with comment trees, user profiles

**Missing:** none — full coverage of the Algolia HN Search API

*Last reviewed: 2026-04-04*

## How do you configure the Algolia HN Search DADL?

1. No credentials required — the Algolia HN Search API is fully public
2. No signup or API key needed

[Authentication docs](https://hn.algolia.com/api)

*Completely public API — no authentication, no API keys. Two search endpoints: /search (relevance) and /search_by_date (chronological). Use tags and numericFilters for precise filtering. The /items endpoint returns full nested comment trees, unlike the Firebase API.
*

## How do you install the Algolia HN Search MCP server with ToolMesh?

Add to your `backends.yaml`:

```yaml
- name: algolia-hn-search
  transport: rest
  dadl: algolia-hn-search.dadl
  url: "https://hn.algolia.com/api/v1"

```

Set the credential:

```
CREDENTIAL_ALGOLIA_HN_SEARCH_TOKEN=your-token-here
```

## What 4 tools does the Algolia HN Search DADL expose?

- **GET** `search` — Full-text search ranked by relevance (points, num_comments). Best for finding popular/relevant content. Returns hits with: objectID, title, url, author, points, num_comments, created_at, created_at_i, story_text, comment_text, _tags, _highlightResult. Also returns nbHits, page, nbPages, hitsPerPage at the top level.

- **GET** `search_by_date` — Full-text search ranked by date (newest first). Same parameters and response format as search, but results are sorted chronologically. Best for finding recent content or monitoring new submissions. Identical response fields to the search endpoint.

- **GET** `get_item` — Get an item by ID with its full nested comment tree. Unlike the Firebase API, this returns the complete children array with recursively nested comments already resolved. Each child has: id, created_at, author, text, points, children. The parent item also includes title, url, points, num_comments.

- **GET** `get_user` — Get a user profile by username. Returns: username, about (HTML bio), karma, created_at, avg, and other profile metadata. Username is case-sensitive.


## What composite workflows does the Algolia HN Search DADL provide?

- **FN** `search_stories` — Search for stories only, returning a clean list with title, url, author, points, num_comments, and created_at. Convenience wrapper around search with tags=story.
- **FN** `search_recent_comments` — Search for recent comments matching a query, sorted by date (newest first). Returns comment text, author, story title, and timestamps.
- **FN** `get_front_page` — Get current HN front page stories with full details, sorted by relevance. Equivalent to browsing the HN homepage.
- **FN** `search_distilled` — LLM-optimized search that strips all Algolia metadata cruft before returning results. Implements the _clean_hit() pattern from hn-pulse: raw Algolia hits are ~2 KB each due to _highlightResult, _snippetResult, _rankingInfo, _tags, and other index-internal fields. This composite reduces each hit to ~200 bytes — only data an LLM actually needs. Supports both relevance (sort=relevance) and recency (sort=date) ranking, and all content types via the tags parameter. Designed as the primary search primitive for LangGraph-style ReAct agents that combine this Algolia backend with the Firebase HN backend (hackernews.dadl) for live enrichment.

- **FN** `get_user_activity` — Get a user's recent stories and comments. Fetches the user profile and their most recent submissions of each type.

## Which DADLs are related to Algolia HN Search?

- [Graylog](https://www.dadl.ai/d/graylog/) — Graylog REST API -- log search (Views/Search + legacy universal), streams, pipelines, inputs, alerts, events, dashboards, users, roles, sidecars, index management, and cluster administration. Targets Graylog 6.x.
- [Mastodon](https://www.dadl.ai/d/mastodon/) — Mastodon REST API — statuses, timelines, accounts, notifications, search, media, lists, polls, conversations, trends, filters, and instance info. Base URL must be set to the target Mastodon instance (e.g. https://mastodon.social).
- [Umami](https://www.dadl.ai/d/umami/) — Umami open-source web analytics — privacy-friendly alternative to Google Analytics
- [BookStack](https://www.dadl.ai/d/bookstack/) — BookStack wiki and documentation platform REST API -- shelves, books, chapters, pages (HTML/Markdown content), attachments, image gallery, comments, cross-entity search, exports (HTML/Markdown/PDF/ZIP), ZIP imports, users, roles, content permissions, recycle bin, audit log and tags. Hierarchy: shelves > books > chapters > pages.
- [DokuWiki](https://www.dadl.ai/d/dokuwiki/) — DokuWiki JSON-RPC API — wiki pages, media files, search, ACL management, and user administration
- [Hacker News](https://www.dadl.ai/d/hackernews/) — Hacker News API — read-only access to stories, comments, polls, jobs, users, and live feeds from news.ycombinator.com

---

**Canonical URL:** https://www.dadl.ai/d/algolia-hn-search/
**Raw DADL:** https://github.com/DunkelCloud/dadl-registry/blob/main/algolia-hn-search.dadl
