---
title: "Look up a transaction by hash, optionally with decoded data and logs"
method: POST
path: "/?ankr_getTransactionsByHash"
tags: ["Query API"]
---

# Look up a transaction by hash, optionally with decoded data and logs

`POST /?ankr_getTransactionsByHash`

## Request

- Base URL: `https://rpc.ankr.com/multichain/569ca1f392f7d3d0bb1073a1173ecb649af1d9249231fe59fa95db19d5ae41fe`
- URL: `https://rpc.ankr.com/multichain/569ca1f392f7d3d0bb1073a1173ecb649af1d9249231fe59fa95db19d5ae41fe/?ankr_getTransactionsByHash`
- Auth: none declared
- TypeScript: <https://skmtc.dev/ankr/apis/ankr-advanced-api/docs/%3Fankr_getTransactionsByHash/post.ts> (a function with typed inputs; its response is checked against the schema)

Returns the transaction(s) matching a single hash. Optionally embeds logs and resolves method/event signatures to human-readable form.

Pass `transactionHash`. Multi-chain dispatch is automatic — Ankr will search across supported chains and return the transaction with its `blockchain` field populated. Use `includeLogs`, `decodeTxData`, and `decodeLogs` for richer responses; you can optionally scope the search with the `blockchain` array.

Part of the **Query API** product (700 compute units per call, $0.00007 at base rate).

## Request body

- object
  - `id` integer, required: Client-supplied request ID echoed in the response.
  - `jsonrpc` '2.0', required
  - `method` 'ankr_getTransactionsByHash', required
  - `params` object, required
    - `transactionHash` string, required: Transaction hash to look up.
    - `blockchain` string[]: Chains to query. Omit or pass an empty array to query all supported chains.
    - `decodeLogs` boolean: Resolve event signatures and decode log inputs.
    - `decodeTxData` boolean: Resolve method signatures and decode transaction inputs.
    - `includeLogs` boolean: Embed the transaction's log array.

## Response `200`

Success. JSON-RPC `result` envelope contains the `transactions` array (usually a single entry). JSON-RPC errors are returned with HTTP 200; check the response body for an `error` key.

- object
  - `id` integer, required
  - `jsonrpc` '2.0', required
  - `result` object, required
    - `transactions` object[], nullable, required
      - `blockchain` string, required
      - `blockHash` string, required
      - `blockNumber` string, required
      - `contractAddress` string, nullable
      - `cumulativeGasUsed` string
      - `from` string, required
      - `gas` string
      - `gasPrice` string
      - `gasUsed` string
      - `hash` string
      - `input` string
      - `nonce` string
      - `r` string
      - `s` string
      - `status` string, required
      - `timestamp` string, required
      - `to` string, nullable, required
      - `transactionIndex` string, required
      - `type` string
      - `v` string
      - `value` string, required
      - `logs` object[], nullable

## Other responses

- `400`: Bad Request — malformed JSON-RPC envelope or invalid `params`. The gateway rejects before the JSON-RPC layer processes the call.
- `401`: Unauthorized — missing or invalid API key in the server URL path. Verify that `{API_KEY}` is set to a valid project key.
- `429`: Too Many Requests — the API key has exceeded its rate or quota limits. Back off and retry; consider upgrading the Premium tier for higher limits.
- `500`: Server error — unexpected condition. Retry with exponential backoff; if it persists, file a ticket at https://www.ankr.com/support/.

---

[API](https://skmtc.dev/ankr/apis/ankr-advanced-api.md) - [All operations](https://skmtc.dev/ankr/apis/ankr-advanced-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ankr/apis/ankr-advanced-api/revisions/77e494aeec1b?raw)
