> For the complete documentation index, see [llms.txt](https://docs.ethgas.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ethgas.com/orderflow/searchers.md).

# Searchers

Searchers receive live orderflow over WebSocket and submit bundles over the same connection or HTTP.

To request a searcher account, contact us at <info@ethgas.com>.

| Transport | Endpoint                                             |
| --------- | ---------------------------------------------------- |
| WebSocket | `wss://searcher.orderflow.ethgas.com/v1/{API_KEY}`   |
| HTTP      | `https://searcher.orderflow.ethgas.com/v1/{API_KEY}` |

## Receive orderflow

Opening the WebSocket subscribes the session automatically. A client may also send the idempotent subscription request:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_subscribe",
  "params": ["ethgas_partialPendingBundles"]
}
```

Notifications contain an ordered array of decoded unsigned transactions. This abridged example omits some type-specific fee fields:

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscription",
  "params": {
    "subscription": "0x...",
    "result": [{
      "chainId": "0x1",
      "to": "0x...",
      "value": "0x0",
      "data": "0x...",
      "nonce": "0x1",
      "gas": "0x5208",
      "type": "0x2",
      "hash": "0x...",
      "from": "0x..."
    }]
  }
}
```

Fanout is live-only: open the WebSocket before the originator submits. Missed notifications are not replayed.

## Submit a backrun

Use the last transaction hash from the notification as the first `txs` entry, followed by your signed transaction(s):

```json
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "eth_sendBundle",
  "params": [{
    "txs": ["0x<ORIGINATOR_REFERENCE_HASH>", "0x<SIGNED_BACKRUN>"],
    "blockNumber": "0x12abcde",
    "replacementUuid": "aaaaaaaa-bbbb-4ccc-8ddd-eeeeeeeeeeee",
    "revertingTxHashes": [],
    "droppingTxHashes": []
  }]
}
```

The response returns a local `bundleHash`. The engine expands a valid originator reference server-side and adds the applicable refund fields before builder submission.

`replacementUuid` is optional for submission. When used, increase either `replacementSeqNumber` or its alias `replacementNonce`; do not send both.

`minTimestamp` is an optional unsigned Unix timestamp in seconds. It must not be later than the bundle's intake time; future values are rejected rather than queued.

## Cancel replacements

```json
{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "eth_cancelBundle",
  "params": [{
    "replacementUuid": "aaaaaaaa-bbbb-4ccc-8ddd-eeeeeeeeeeee"
  }]
}
```

A successful intake response is `200`; it confirms cancellation admission, not builder completion. An empty `txs` bundle with only `replacementUuid` is also a cancellation.

## Connection behavior

Respond to pings promptly. Sessions close after 24 hours and should reconnect. Authorization changes close the connection, and slow readers may be disconnected when their outbound queue fills.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ethgas.com/orderflow/searchers.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
