---
title: "[INDEXER] Search for Transactions"
method: POST
path: "/search/transactions"
tags: ["Search"]
---

# [INDEXER] Search for Transactions

`POST /search/transactions`

`/search/transactions` allows the caller to search for
transactions that meet certain conditions. Some conditions
include matching a transaction hash, containing an
operation with a certain status, or containing an operation
that affects a certain account.

`/search/transactions` is considered an "indexer" endpoint
and Rosetta implementations are not required to complete it
to adhere to the Rosetta spec. However, any Rosetta "indexer"
MUST support this endpoint.

## Request body

- SearchTransactionsRequest — SearchTransactionsRequest is used to search for transactions matching a set of provided conditions in canonical blocks.
  - `network_identifier` NetworkIdentifier, required — unresolved $ref
  - `operator` Operator — unresolved $ref
  - `max_block` integer — max_block is the largest block index to consider when searching for transactions. If this field is not populated, the current block is considered the max_block. If you do not specify a max_block, it is possible a newly synced block will interfere with paginated transaction queries (as the offset could become invalid with newly added rows).
  - `offset` integer — offset is the offset into the query result to start returning transactions. If any search conditions are changed, the query offset will change and you must restart your search iteration.
  - `limit` integer — limit is the maximum number of transactions to return in one call. The implementation may return <= limit transactions.
  - `transaction_identifier` TransactionIdentifier — unresolved $ref
  - `account_identifier` AccountIdentifier — unresolved $ref
  - `coin_identifier` CoinIdentifier — unresolved $ref
  - `currency` Currency — unresolved $ref
  - `status` string — status is the network-specific operation type.
  - `type` string — type is the network-specific operation type.
  - `address` string — address is AccountIdentifier.Address. This is used to get all transactions related to an AccountIdentifier.Address, regardless of SubAccountIdentifier.
  - `success` boolean — success is a synthetic condition populated by parsing network-specific operation statuses (using the mapping provided in `/network/options`).

## Response `200`

Expected response to a valid request

- SearchTransactionsResponse — SearchTransactionsResponse contains an ordered collection of BlockTransactions that match the query in SearchTransactionsRequest. These BlockTransactions are sorted from most recent block to oldest block.
  - `transactions` BlockTransaction[], required — transactions is an array of BlockTransactions sorted by most recent BlockIdentifier (meaning that transactions in recent blocks appear first). If there are many transactions for a particular search, transactions may not contain all matching transactions. It is up to the caller to paginate these transactions using the max_block field. — unresolved $ref
  - `total_count` integer, required — total_count is the number of results for a given search. Callers typically use this value to concurrently fetch results by offset or to display a virtual page number associated with results.
  - `next_offset` integer — next_offset is the next offset to use when paginating through transaction results. If this field is not populated, there are no more transactions to query.

## Other responses

- `500` — unexpected error

## Changes

> 50 revisions in range; 1 could not be searched.

- **2020-12-04** `fa4ea049bbde` — 1 info
  - added the required property `total_count` to the response with the `200` status
- **2020-11-09** `05e6fffe76dc` — 1 info
  - the request property `operator` became optional
- **2020-11-06** `115cb371a3f1` — 1 info
  - added the new optional request property `coin_identifier`
- **2020-11-06** `cd2381c52ab8` — 1 warning, 2 info
  - removed the optional property `next_max_block` from the response with the `200` status
  - added the new optional request property `offset`
  - added the optional property `next_offset` to the response with the `200` status
- **2020-11-06** `a23317e2dc2b` — 4 breaking, 11 info
  - added the new required request property `network_identifier`
  - added the new required request property `operator`
  - the request's body type/format changed from ``/`` to `object`/``
  - the response's body type/format changed from ``/`` to `object`/`` for status `200`
  - …11 more

[Full history](https://skmtc.dev/coinbase/apis/rosetta/changes/search/transactions/post.md)

---

[API](https://skmtc.dev/coinbase/apis/rosetta.md) · [All operations](https://skmtc.dev/coinbase/apis/rosetta/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/coinbase/rosetta/revisions/758497aacc08/schema)
