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

# tx_search

> Search for transactions with their results.

### Parameters

<ParamField query="chainId" type="string" default="osmosis" required>
  Unique identifier for a blockchain network.
</ParamField>

<ParamField body="id" type="number" default={1} required>
  Request identifier used to match responses.
</ParamField>

<ParamField body="jsonrpc" type="string" default="2.0" required>
  JSON-RPC version.
</ParamField>

<ParamField body="method" type="string" default="tx_search" required>
  JSON-RPC method name.
</ParamField>

<ParamField body="params" type="object" default={["tx.height=1000",true,1,30,"asc",true]} placeholder="[&#x22;tx.height=1000&#x22;,true,1,30,&#x22;asc&#x22;,true]" required>
  Transaction search parameters in the order: \[query, prove, page, per\_page, order\_by, match\_events]

  Positional parameters for <code>tx\_search</code>:

  <ul>
    <li><code>params\[0]</code>: A transaction query string (e.g., "tx.height=1000").</li>
    <li><code>params\[1]</code>: Include proofs of the transaction inclusion in the block.</li>
    <li><code>params\[2]</code>: Page number (1-based).</li>
    <li><code>params\[3]</code>: Number of entries per page (max: 100).</li>
    <li><code>params\[4]</code>: Order of transaction sorting ("asc" or "desc"), by height & index.</li>
    <li><code>params\[5]</code>: Match attributes in query within events in addition to height & txhash.</li>
  </ul>
</ParamField>

### Returns

<ResponseField name="result" type="object">
  The transactions returned with the search queries.
</ResponseField>

<RequestExample>
  ```bash Curl theme={null}
  curl --request POST \
    --url https://api.uniblock.dev/uni/v1/json-rpc?chainId=osmosis \
    --header 'content-type: application/json' \
    --data '{
      "id": 1,
      "jsonrpc": "2.0",
      "method": "tx_search",
      "params": [
        "tx.height=1000",
        true,
        1,
        30,
        "asc",
        true
      ]
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json Success theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
      "txs": [
        {
          "hash": "D70952032620CC4E2737EB8AC379806359D8E0B17B0488F627997A0B043ABDED",
          "height": "1000",
          "index": 0,
          "tx_result": {
            "__truncated": true
          },
          "tx": "5wHwYl3uCkaoo2GaChQmSIu8hxpJxLcCuIi8fiHN4TMwrRIU/Af1cEG7Rcs/6LjTl7YjRSymJfYaFAoFdWF0b20SCzE0OTk5OTk1MDAwEhMKDQoFdWF0b20S...",
          "proof": {
            "__truncated": true
          }
        }
      ],
      "total_count": "2"
    }
  }
  ```
</ResponseExample>
