> 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"]
}
```

The params can also be `mevblocker_partialPendingBundles` or `blink_partialPendingBundles` for compatibility to other protocols.

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.

If the `result` array contains only 1 object, it is a transaction only. If it contains more than 1 object, that is a bundle. You only need to reference the hash of the last transaction in your backrun bundle.

`eth_unsubscribe` is not supported. To stop receiving orderflow, close the WebSocket connection.

## 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.

`txs` accepts 0–100 entries. An empty `txs` array is a cancellation by `replacementUuid` and behaves identically to `eth_cancelBundle`; in this case `replacementUuid` is required and no other field is permitted.

`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 `eth_cancelBundle` response contains the integer `200` in the JSON-RPC `result` field, over either HTTP or WebSocket:

```json
{"jsonrpc":"2.0","id":3,"result":200}
```

An empty `txs` bundle with only `replacementUuid` is also a cancellation, but its JSON-RPC result is `{"bundleHash":""}`. Both responses confirm durable cancellation admission; builder completion is asynchronous.

## 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
