> ## Documentation Index
> Fetch the complete documentation index at: https://evalgate.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# NLWeb /ask

> Public, rate-limited NLWeb search and streaming over EvalGate's published documentation.

# NLWeb /ask

EvalGate exposes a public NLWeb 0.55 `/ask` endpoint for agents
that need to find published documentation. It performs bounded deterministic
search over EvalGate's published documentation catalog. It does not call a
model, read repositories, access customer data, or summarize private content.

No account or API key is needed for this public documentation catalog:

```bash theme={null}
curl 'https://www.evalgate.com/ask?q=MCP&streaming=false'
```

The endpoint also accepts the modern POST shape:

```json theme={null}
{
  "query": { "text": "How do I connect MCP?" },
  "prefer": { "streaming": false }
}
```

The legacy POST shape `{ "query": "How do I connect MCP?", "streaming":
true }` remains accepted. `GET` uses `query`, `q`, or `text` as the query
parameter. Results are list/search results only; `summarize` and `generate`
modes return a truthful unsupported-mode error.

## JSON response

Non-streaming requests return `query_id`, the normalized query, a deterministic
`results` list, and NLWeb metadata:

```json theme={null}
{
  "query_id": "nlweb-…",
  "query": "How do I connect MCP?",
  "results": [
    {
      "@type": "TechArticle",
      "name": "MCP integration",
      "identifier": "platform/mcp-integration",
      "title": "MCP integration",
      "url": "https://www.evalgate.com/docs/platform/mcp-integration",
      "site": "evalgate.com",
      "description": "Configure Claude, coding agents, and other MCP clients.",
      "text": "…",
      "score": 9,
      "schema_object": {
        "@context": "https://schema.org",
        "@type": "TechArticle",
        "name": "MCP integration",
        "description": "Configure Claude, coding agents, and other MCP clients.",
        "url": "https://www.evalgate.com/docs/platform/mcp-integration"
      }
    }
  ],
  "_meta": { "response_type": "answer", "version": "0.55" }
}
```

## Streaming response

Set `prefer.streaming` to `true` (or use the legacy `streaming` field) to
receive `text/event-stream`. Events are emitted in this order:

```bash theme={null}
curl --no-buffer https://www.evalgate.com/ask \
  -H 'Content-Type: application/json' \
  --data '{"query":"MCP integration","prefer":{"streaming":true}}'
```

1. `start` — includes answer metadata with `version: "0.55"` and `streaming: true`.
2. `result` — includes the result `index` and a typed `item` for each matching document.
3. `error` — includes failure metadata and an error code when no documents match.
4. `complete` — includes final metadata and the result count.

Set `prefer.mode` to `list` and `prefer.response_format` to
`conversational_search`. Unsupported modes/formats return explicit errors; an
explicit `prefer.streaming: false` takes precedence over the legacy field.
Results contain only published documentation. `NO_RESULTS` is a failure
envelope, and a stream still ends with `complete` after its error event. The
legacy request fields remain accepted; response metadata and indexed events
now use [NLWeb 0.55](https://nlweb.ai/docs/specification).

Requests share the anonymous quota of 100 requests per hour. Read `RateLimit`
and `RateLimit-Policy` on each response and respect `Retry-After` on `429`.
Queries are limited to 200 characters, POST bodies to 64,000 bytes, and results
to ten public documents. No model provider or customer API is invoked.

Authentication is optional. If you send credentials, they must be valid and
include `docs:read`; invalid credentials receive `401`, and a key without that
scope receives `403`. The `WWW-Authenticate` challenge points to EvalGate's
protected-resource metadata. Supplying invalid credentials never silently falls
back to anonymous access.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.