---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/tools/searxng/interfaces/SearxngRequestContext.md
description: >-
  Mutable context handed to each input-pipeline stage **before** the HTTP
  request is sent.
---

# Interface: SearxngRequestContext

Defined in: [batteries/tools/searxng/index.ts:69](https://github.com/NHTIO/ADK/blob/v1.20260609.0/src/batteries/tools/searxng/index.ts#L69)

Mutable context handed to each input-pipeline stage **before** the HTTP request is sent.

## Remarks

Stages mutate this in place (onion `(ctx, next)` style) to adjust the outgoing request —
inject or rotate auth headers, force a language, rewrite the query — or call
[SearxngRequestContext.shortCircuit](#shortcircuit) to skip the fetch entirely (e.g. a cache hit).

## Properties

| Property                                        | Modifier   | Type                                                                                                              | Description                                                                       | Defined in                                                                                                                      |
| ----------------------------------------------- | ---------- | ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
|  `headers`         | `public`   | [`SearxngHeaders`](../type-aliases/SearxngHeaders.md)                                                             | Resolved request headers. Mutable — inject, redact, or rotate auth here.          | [batteries/tools/searxng/index.ts:77](https://github.com/NHTIO/ADK/blob/v1.20260609.0/src/batteries/tools/searxng/index.ts#L77) |
|  `instanceUrl` | `readonly` | `string`                                                                                                          | The target instance base URL (read-only).                                         | [batteries/tools/searxng/index.ts:79](https://github.com/NHTIO/ADK/blob/v1.20260609.0/src/batteries/tools/searxng/index.ts#L79) |
|  `params`           | `public`   | [`Record`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)<`string`, `string`> | Extra SearXNG query parameters (`categories`, `engines`, `language`, …). Mutable. | [batteries/tools/searxng/index.ts:75](https://github.com/NHTIO/ADK/blob/v1.20260609.0/src/batteries/tools/searxng/index.ts#L75) |
|  `query`             | `public`   | `string`                                                                                                          | The search query. Mutable.                                                        | [batteries/tools/searxng/index.ts:73](https://github.com/NHTIO/ADK/blob/v1.20260609.0/src/batteries/tools/searxng/index.ts#L73) |
|  `stash`             | `readonly` | `Map`<`string`, `unknown`>                                                                                      | Cross-stage scratch space; also carried onto the response context.                | [batteries/tools/searxng/index.ts:81](https://github.com/NHTIO/ADK/blob/v1.20260609.0/src/batteries/tools/searxng/index.ts#L81) |
|  `toolName`       | `readonly` | `string`                                                                                                          | The tool's name (read-only).                                                      | [batteries/tools/searxng/index.ts:71](https://github.com/NHTIO/ADK/blob/v1.20260609.0/src/batteries/tools/searxng/index.ts#L71) |

## Methods

### shortCircuit()

```ts
shortCircuit(result: string): void;
```

Defined in: [batteries/tools/searxng/index.ts:83](https://github.com/NHTIO/ADK/blob/v1.20260609.0/src/batteries/tools/searxng/index.ts#L83)

Skip the fetch and return `result` verbatim as the tool's output.

#### Parameters

| Parameter | Type     |
| --------- | -------- |
| `result`  | `string` |

#### Returns

`void`
