> For the complete documentation index, see [llms.txt](https://doc.duaer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.duaer.com/getting-started/hacker-news.md).

# Hacker News in Duaer

In Duaer: Hacker News via Algolia: stories, Ask HN, Show HN, and comments by words, by relevance or newest. One successful search uses 1 credit.
## What you get

Duaer Hacker News searches Hacker News through its Algolia index, with points, comments, and the discussion link.

Pick Duaer Data → Hacker News in the node creator, or open the [data market](/getting-started/data-market.md). Related: [GitHub repositories](/getting-started/github-repos.md), [Wikipedia pageviews](/getting-started/wiki-pageviews.md).

## When to use it

- See what developers said about a new database.
- List today’s Show HN launches.

## When not to use it

- Code repositories. Use [GitHub repositories](/getting-started/github-repos.md).
- Package versions. Use [npm packages](/getting-started/npm.md).

## Search on the canvas

1. Open the node creator and pick Duaer Data → Hacker News.
2. Fill Words (such as rust database). Optional: Type (show), Sort (date).
3. Limit defaults to 10, max 20. Execute.

A search uses 1 credit only when it returns rows. No rows, wrong input, or an upstream failure uses 0.

## Call the API

- GET https://api.duaer.com/v1/data/hacker-news?words=rust%20database
- Authorization: Bearer <Duaer key>

The call skill below matches Copy skill in the Duaer data market, with parameters, examples, and result fields.

## Call skill

Same text as Copy skill.

```
---
name: duaer-hacker-news
description: >-
  Duaer Hacker News. Hacker News via Algolia: stories, Ask HN, Show HN, and comments by words, by relevance or newest.
  One successful search uses 1 Duaer credit.
---

# Duaer Hacker News

Duaer Hacker News searches Hacker News through its Algolia index, with points, comments, and the discussion link.

## When to use

- See what developers said about a new database.
- List today’s Show HN launches.

## When not to use

- Code repositories. Use https://skills.duaer.com/github-repos.md.
- Package versions. Use https://skills.duaer.com/npm.md.

## Call

`GET https://api.duaer.com/v1/data/hacker-news?words=rust%20database`

Header: `Authorization: Bearer <Duaer key>`

Use an account key or a model API key.

Get a Duaer key: https://skills.duaer.com/keys.md

## Parameters

Provide `words`, or `type` with `sort=date`.

- `words` — Words to search, such as rust database.
- `type` — Optional. `story`, `ask`, `show`, or `comment`. Default story.
- `sort` — Optional. `relevance` or `date`. Default relevance.
- `limit` — Optional. Rows to return, from 1 to 20. Default 10.

## Examples

- `GET https://api.duaer.com/v1/data/hacker-news?words=rust%20database` — the most relevant stories.
- `GET https://api.duaer.com/v1/data/hacker-news?type=show&sort=date` — the newest Show HN posts.

## Result

The response is `{ "items": [...] }`. Each item has `source`, `title`, `url`, and `summary`, plus:

- `itemId`, `author`, `createdAt` — post and time.
- `points`, `comments` — score and comment count.
- `link` — the linked article, when there is one.

`url` is the Hacker News discussion page.

Fields without a value are left out.

## Credits

A search that returns at least one row uses 1 credit.
An empty search, a search that finds nothing, or a failed search uses 0.
Wrong input returns 400 with a message and uses 0.
No remaining credits returns 402 and does not search.
A missing key returns 401.

## Related

- https://skills.duaer.com/github-repos.md — Duaer GitHub repositories
- https://skills.duaer.com/wiki-pageviews.md — Duaer Wikipedia pageviews

```
## Questions

### How many credits does a Hacker News search use in Duaer?

One credit when Duaer returns rows. A search with no rows or an error uses 0.

### What is the difference between url and link in Duaer Hacker News?

url is the Hacker News discussion page; link is the shared article. Posts such as Ask HN have no link.

## Related

- [GitHub repositories in Duaer](https://doc.duaer.com/getting-started/github-repos.md)
- [Wikipedia pageviews in Duaer](https://doc.duaer.com/getting-started/wiki-pageviews.md)

