---
title: "Ask a question (POST)"
method: POST
path: "/ask"
tags: ["ask"]
---

# Ask a question (POST)

`POST /ask`

## Request

- Base URL: `https://hangingcontext.com`
- URL: `https://hangingcontext.com/ask`
- Auth: none required

Answer a question from recent stories. The reply copies facts word for word. It uses no LLM. Set prefer.streaming to true to get text/event-stream.

## Headers

- `HC-API-Version` '1'

## Request body

- AskRequest: An NLWeb question.
  - `query` string, required: The question.
  - `prefer` object
    - `streaming` boolean: Set to true for text/event-stream.
  - `topic` string: Only search this topic slug.
  - `days` integer
  - `limit` integer

## Response `200`

The answer.

- AskAnswer: An NLWeb answer. Each result is a fact copied word for word from a story.
  - `_meta` object, required
    - `response_type` string, required
    - `version` string, required
    - `protocol` string
    - `uses_llm` boolean
  - `query` string, required
  - `no_match` boolean
  - `results` object[], required
    - `url` string, uri
    - `name` string
    - `description` string
    - `datePublished` string
    - `manifest_ids` string[]
  - `next_step` string

## Other responses

- `400`: The request is not valid.
- `429`: Too many calls from this address. Wait, then call again.
- `500`: The server could not answer. Try again later.

---

[API](https://skmtc.dev/hangingcontext/apis/hanging-context-public-read-api.md) · [All operations](https://skmtc.dev/hangingcontext/apis/hanging-context-public-read-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hangingcontext/apis/hanging-context-public-read-api/revisions/48912c502036?raw)
