`/question` runs the same search as [`GET /context`](/docs/api/context), then has a small model write **one concise paragraph** grounded in what it found, with inline `[1]`-style citations. Use it when you want the answer, not the material.

> **Pro plan.** Other plans get `402 Payment Required`. Each call counts toward your monthly AI allowance (2,000 requests on Pro, shared with other AI features).

## Request

One GET with your API key and the question as `query`. The answer comes back with the sources it used:

```bash
curl "https://context-link.ai/api/v1/question?query=what+is+our+refund+policy" \
  -H "Authorization: $CONTEXT_LINK_API_KEY"
```

```json
{
  "result": "ok",
  "answer": "Refunds are available in full within 30 days of purchase [1] and go back to the original payment method within 5 business days [2].",
  "citations": [
    { "n": 1, "title": "Refund policy", "url": "https://example.com/refunds" },
    { "n": 2, "title": "Billing operations SOP", "url": "https://notion.so/..." }
  ],
  "format": "markdown"
}
```

## Request fields

| Field | Type | Description |
|---|---|---|
| `query` | string | Required. The question. Dashes and underscores become spaces. |
| `mode` | string | Optional. A mode name that weights the search, as on [`/context`](/docs/api/context). |
| `connection_type` | string | Optional. Comma-separated hard filter on source types, as on [`/context`](/docs/api/context). |
| `response_format` | string | Optional. `structured` returns the answer in the same structured shape as `/context` (below). |

## Response fields

| Field | Type | Description |
|---|---|---|
| `result` | string | `ok` when there's an answer; `no_context` (HTTP 200) when nothing relevant was found, so don't retry; `llm_unavailable` (HTTP 503) when the model call failed, so retry. |
| `answer` | string | One paragraph of about 120 words or fewer, with inline `[N]` markers. `null` unless `result` is `ok`. |
| `citations` | array | Only the sources the answer actually used, as `{ n, title, url }`. Numbers run `1, 2, 3…` and always match a marker in `answer`. |
| `format` | string | Always `markdown`. |

## Structured response

With `response_format=structured`, the answer comes back in the same shape as a structured `/context` response, with every cited source in full:

```bash
curl "https://context-link.ai/api/v1/question?query=refund+rules&response_format=structured" \
  -H "Authorization: $CONTEXT_LINK_API_KEY"
```

```json
{
  "format": "structured",
  "query": "refund rules",
  "markdown": "Refunds take 30 days [1], with exceptions for faulty goods [2].",
  "results": [
    {
      "content": "Refunds take 30 days [1], with exceptions for faulty goods [2].",
      "position": null,
      "rank": 1,
      "score": null,
      "content_sha": "f3bf95d8a3c2c126bd4d10e23260aca476e1bbb9619e470a54bc38cf79ce6d92",
      "sources": [
        {
          "citation": 1,
          "uid": "refund-policy",
          "title": "Refund policy",
          "url": "https://docs.example.com/refunds",
          "source_updated_at": "2026-08-12T03:14:15Z",
          "connection": {
            "uid": "support-site",
            "type": "Site",
            "name": "docs.example.com",
            "logo_url": "https://www.google.com/s2/favicons?sz=256&domain=docs.example.com"
          }
        }
      ]
    }
  ]
}
```

`results` has one entry (the answer) or none. No answer gives `markdown: null` and `results: []`: with HTTP 200 that's `no_context`, with HTTP 503 it's `llm_unavailable` and worth a retry.

## From your subdomain

The same answer is available without an API key on your Context Link subdomain, which is handy to paste into an AI chat. `/q/` and `/question/` are equivalent:

```
https://yourname.context-link.ai/q/what-is-our-refund-policy?p=YOUR_PIN
```

Send `Accept: application/json`, `text/markdown` or `text/plain` to choose the format. ChatGPT and Gemini get HTML by default, since they handle markdown responses poorly.

## Good to know

- Identical questions (same `query`, `mode`, `connection_type` and `response_format`) are cached for an hour.
- Rate limit: 2 requests per 10 seconds per API key, because each answer takes a couple of seconds to write. See [Errors and limits](/docs/api/errors-and-limits).
