# Hacker News API on SandBase

> Read Hacker News data: keyword search, stories with scores and comment counts, full comment trees and user profiles with karma.

Source: https://www.sandbase.ai/apis/hacker-news

- Endpoints: 4
- Call: `POST https://api.sandbase.ai/v1/api/{vendor}/{endpoint}` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body
- Billing: pay per call from one SandBase balance; no provider account or subscription needed

## Endpoints

- [Hacker News Profile](https://www.sandbase.ai/apis/hacker-news/profile.md): From $0.0015 per call
  Get a Hacker News user's public profile by username - karma, bio, and account details as clean JSON.
- [Hacker News Search](https://www.sandbase.ai/apis/hacker-news/search.md): From $0.0015 per call
  Search Hacker News by keyword - matching stories with title, link, author, points, and comment count as clean JSON.
- [Hacker News Story](https://www.sandbase.ai/apis/hacker-news/story.md): From $0.0015 per call
  Get a Hacker News story by id - title, link, author, points, and comment count as clean JSON.
- [Hacker News Story Comments](https://www.sandbase.ai/apis/hacker-news/story-comments.md): From $0.0015 per call
  List the comments on a Hacker News story by id - text, author, and timestamp as clean JSON.

## Use it through SandBase

- Base URL: `https://api.sandbase.ai/v1`, with `Authorization: Bearer $SANDBASE_API_KEY`.
- Language models use the OpenAI-compatible `POST /v1/chat/completions`; media models use `POST /v1/run`; data APIs use `POST /v1/api/{vendor}/{endpoint}`.
- AI agents can connect through the SandBase MCP server or CLI: https://www.sandbase.ai/skill.md
- Every model and API page has a Markdown twin at the same URL plus `.md`. Full index: https://www.sandbase.ai/llms.txt
