# Solana explorer

Source: https://www.scanner.net/docs/api/reference/explorer

> Transactions, addresses, transfers, origin of funds, tokens, trades, charts, blocks, network stats and search resolution on Solana.

The same data as the [Explorer](/docs/explorer) pages, as JSON. Every explorer route is free.

15 routes, all under `/explorer`. Every path below is served under `https://api.scanner.net`, and every request carries the key header, so those two are not repeated per route. Shared errors, limits and response formats are in [Requests and errors](/docs/api/reference/conventions).

* **Response shape:** every route returns `{ "success": true, "data": ... }`. The response sections below describe `data`.
* **Per-IP limit:** explorer routes allow 60 requests per minute per client IP, on top of the key limit. See [Per-IP limits](/docs/api/reference/conventions#per-ip-limits).
* **Filters:** an invalid filter value is ignored, not refused. An invalid `before` cursor starts again from the first page.
* **Route errors:** besides the errors below, any explorer route can return `504 TIMEOUT` when the upstream data provider times out.

Transaction [#transaction]

```http
GET /explorer/tx/{signature}
```

One transaction, parsed and labelled.

| Parameter   | In    | Type   | Required | Notes                                                               |
| ----------- | ----- | ------ | -------- | ------------------------------------------------------------------- |
| `signature` | path  | string | yes      | Transaction signature.                                              |
| `raw`       | query | string | no       | `1` or `true` adds `raw`, the full parsed transaction from the RPC. |

```bash
curl "https://api.scanner.net/explorer/tx/SIGNATURE" \
  -H "x-api-key: $SCANNER_API_KEY"
```

**Response:** an `ExplorerTransactionDetail`. Key fields: `signature`, `slot`, `blockTime` (unix seconds, or `null`), `status` (`success` or `fail`), `error`, `fee` and `priorityFee` (lamports), `signers`, `enhanced` (the decoded description, or `null`), `instructions`, `logMessages`, `balanceChanges`, `tokens` (metadata by mint) and `identities` (labels by address).

| Status | Code            | When                   |
| ------ | --------------- | ---------------------- |
| 400    | `INVALID_INPUT` | Not a valid signature. |
| 404    | `NOT_FOUND`     | Transaction not found. |

Address [#address]

```http
GET /explorer/address/{address}
```

A summary of any Solana address.

| Parameter | In   | Type   | Required | Notes           |
| --------- | ---- | ------ | -------- | --------------- |
| `address` | path | string | yes      | Solana address. |

```bash
curl "https://api.scanner.net/explorer/address/WALLET_ADDRESS" \
  -H "x-api-key: $SCANNER_API_KEY"
```

**Response:** an `ExplorerAddressSummary`: `address`, `solBalance` (lamports), `detection` (`isToken`, `isContract`, `isWallet`, `isPool`, `owner`), `domains`, `identity` when labelled, `cachedScan` (`available`, `scannedAt`, `scanId`) and `txCount` (`value`, and `exact: false` from 1,000 up). An address with no activity still returns a summary.

| Status | Code              | When                  |
| ------ | ----------------- | --------------------- |
| 400    | `INVALID_ADDRESS` | Not a Solana address. |

Address transactions [#address-transactions]

```http
GET /explorer/address/{address}/txs
```

An address's transactions, newest first by default.

| Parameter | In    | Type    | Required | Notes                                                                |
| --------- | ----- | ------- | -------- | -------------------------------------------------------------------- |
| `address` | path  | string  | yes      | Solana address.                                                      |
| `limit`   | query | integer | no       | 1 to 100. Default 25.                                                |
| `before`  | query | string  | no       | Page cursor: `nextBefore` from the previous page.                    |
| `type`    | query | string  | no       | Transaction type, for example `SWAP` or `TRANSFER`.                  |
| `status`  | query | string  | no       | `success` or `failed`.                                               |
| `from`    | query | integer | no       | Earliest time, unix seconds.                                         |
| `to`      | query | integer | no       | Latest time, unix seconds.                                           |
| `by`      | query | string  | no       | Only transactions this address paid the fee for.                     |
| `source`  | query | string  | no       | Comma-separated program sources, for example `JUPITER`. At most 10.  |
| `sort`    | query | string  | no       | `asc` for oldest first. The filters above are then ignored.          |
| `offset`  | query | integer | no       | With `sort=asc`: rows to skip. Default 0.                            |
| `window`  | query | string  | no       | With `sort=asc`: `first1h` for the address's first hour of activity. |

```bash
curl "https://api.scanner.net/explorer/address/WALLET_ADDRESS/txs?limit=50&type=SWAP" \
  -H "x-api-key: $SCANNER_API_KEY"
```

**Response:** `transactions` (each with `signature`, `type`, `source`, `slot`, `timestamp`, `description`, `fee`, `feePayer`, `transactionError`, `nativeTransfers` and `tokenTransfers`), `nextBefore` (cursor, or `null` at the end) and `stillMore`. A filtered page can be shorter than `limit` with `stillMore: true`; keep paging. With `sort=asc` the response adds `nextOffset` and `oldestAvailable`.

Oldest-first walks of addresses that aren't cached yet are limited to a few per IP every 10 minutes. Past that, the route returns an empty page with `oldestAvailable: false` rather than an error. `oldestAvailable: false` also means the history is too long to walk from the start.

| Status | Code              | When                  |
| ------ | ----------------- | --------------------- |
| 400    | `INVALID_ADDRESS` | Not a Solana address. |

Address transfers [#address-transfers]

```http
GET /explorer/address/{address}/transfers
```

SOL and token transfers in and out of an address, newest first.

| Parameter   | In    | Type    | Required | Notes                                                                            |
| ----------- | ----- | ------- | -------- | -------------------------------------------------------------------------------- |
| `address`   | path  | string  | yes      | Solana address.                                                                  |
| `limit`     | query | integer | no       | 1 to 100. Default 25.                                                            |
| `before`    | query | string  | no       | Page cursor: `nextBefore` from the previous page.                                |
| `direction` | query | string  | no       | `in` or `out`.                                                                   |
| `mint`      | query | string  | no       | A token mint, or `native` for SOL.                                               |
| `type`      | query | string  | no       | `sol` or `spl`.                                                                  |
| `from`      | query | string  | no       | Comma-separated sender addresses, at most 20. Prefix one with `-` to exclude it. |
| `to`        | query | string  | no       | Comma-separated recipient addresses, same rules as `from`.                       |
| `amount`    | query | string  | no       | Token amount range, `min-max`. Either side can be left out, for example `1000-`. |
| `usd`       | query | string  | no       | USD value range, `min-max`.                                                      |
| `source`    | query | string  | no       | Comma-separated program sources. At most 10.                                     |
| `action`    | query | string  | no       | Comma-separated transaction types. At most 10.                                   |

```bash
curl "https://api.scanner.net/explorer/address/WALLET_ADDRESS/transfers?direction=in&mint=MINT_ADDRESS" \
  -H "x-api-key: $SCANNER_API_KEY"
```

**Response:** `transfers` (each with `signature`, `blockTime`, `slot`, `mint`, `amount` in token units, `usdValue`, `from`, `to`, `direction` (`in`, `out` or `self`), `source` and `txType`), `nextBefore`, `stillMore`, `tokens` and `identities`. Pages end on a transaction boundary, so a page can hold slightly more than `limit` rows.

| Status | Code              | When                  |
| ------ | ----------------- | --------------------- |
| 400    | `INVALID_ADDRESS` | Not a Solana address. |

Address origin [#address-origin]

```http
GET /explorer/address/{address}/origin
```

Where an address's money came from: its funding chain, walked back to the first labelled entity, up to 20 hops. A trace that isn't cached can take 5 to 15 seconds.

| Parameter | In   | Type   | Required | Notes           |
| --------- | ---- | ------ | -------- | --------------- |
| `address` | path | string | yes      | Solana address. |

```bash
curl "https://api.scanner.net/explorer/address/WALLET_ADDRESS/origin" \
  -H "x-api-key: $SCANNER_API_KEY"
```

**Response:** an `ExplorerAddressOrigin`: `address`, `status` (`ok`, `no_origin`, `not_wallet`, `is_entity` or `unavailable`), `directFunder`, `origin`, `hops`, `terminalReason` (`labeled`, `depth`, `loop` or `no_funder`), `cached` and `tracedAt`.

Cached origins are always served. New traces are limited to a few per IP every 10 minutes.

| Status | Code              | When                                                                                   |
| ------ | ----------------- | -------------------------------------------------------------------------------------- |
| 400    | `INVALID_ADDRESS` | Not a Solana address.                                                                  |
| 429    | `RATE_LIMITED`    | The trace isn't cached and the IP's trace budget is spent. Try again in a few minutes. |

Cached origins [#cached-origins]

```http
POST /explorer/origins
```

Cached funder and origin labels for up to 30 addresses at once. It reads only what is already cached and never starts a trace.

| Parameter   | In   | Type      | Required | Notes                                                                                      |
| ----------- | ---- | --------- | -------- | ------------------------------------------------------------------------------------------ |
| `addresses` | body | string\[] | yes      | Solana addresses. Invalid ones and duplicates are dropped, and only the first 30 are used. |

```bash
curl -X POST "https://api.scanner.net/explorer/origins" \
  -H "x-api-key: $SCANNER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"addresses":["WALLET_ADDRESS"]}'
```

**Response:** `{ "origins": { "<address>": { "address", "funder", "funderEntity", "origin" } } }`. Addresses with nothing cached are left out.

| Status | Code            | When                                                    |
| ------ | --------------- | ------------------------------------------------------- |
| 400    | `INVALID_INPUT` | The body has no non-empty `addresses` array of strings. |

Token [#token]

```http
GET /explorer/token/{mint}
```

A token's metadata, market stats, security flags, pools and top holders.

| Parameter | In   | Type   | Required | Notes               |
| --------- | ---- | ------ | -------- | ------------------- |
| `mint`    | path | string | yes      | Token mint address. |

```bash
curl "https://api.scanner.net/explorer/token/MINT_ADDRESS" \
  -H "x-api-key: $SCANNER_API_KEY"
```

**Response:** an `ExplorerTokenOverview`: `mint`, `metadata` (`symbol`, `name`, `decimals`, `supply`, `logoUri`, links), `stats` (`priceUsd`, `marketCap`, `fdv`, `liquidityUsd`, `volume24h`, `priceChange24h`, `holderCount`), `security` (mint and freeze authority, Token-2022 extensions, `riskScore`, `risks`, `top10HolderPct`), `pools`, `creator`, `createdAt` (unix milliseconds), `launchpad`, `topHolders` (up to 100) and `cachedContractScan`. Fields Scanner has no data for are left out.

| Status | Code           | When                      |
| ------ | -------------- | ------------------------- |
| 400    | `INVALID_MINT` | Not a valid mint address. |

Token transfers [#token-transfers]

```http
GET /explorer/token/{mint}/transfers
```

Transfers of one token, newest first.

| Parameter | In    | Type    | Required | Notes                                                     |
| --------- | ----- | ------- | -------- | --------------------------------------------------------- |
| `mint`    | path  | string  | yes      | Token mint address.                                       |
| `limit`   | query | integer | no       | 1 to 100. Default 25.                                     |
| `before`  | query | string  | no       | Page cursor: `nextBefore` from the previous page.         |
| `from`    | query | string  | no       | Comma-separated senders, at most 20. `-` prefix excludes. |
| `to`      | query | string  | no       | Comma-separated recipients, same rules.                   |
| `amount`  | query | string  | no       | Token amount range, `min-max`.                            |

```bash
curl "https://api.scanner.net/explorer/token/MINT_ADDRESS/transfers?amount=1000-" \
  -H "x-api-key: $SCANNER_API_KEY"
```

**Response:** the same shape as [Address transfers](#address-transfers).

| Status | Code           | When                      |
| ------ | -------------- | ------------------------- |
| 400    | `INVALID_MINT` | Not a valid mint address. |

Token trades [#token-trades]

```http
GET /explorer/token/{mint}/trades
```

Buys and sells of a token, about 50 per page.

| Parameter | In    | Type   | Required | Notes                                    |
| --------- | ----- | ------ | -------- | ---------------------------------------- |
| `mint`    | path  | string | yes      | Token mint address.                      |
| `cursor`  | query | string | no       | `nextCursor` from the previous page.     |
| `sort`    | query | string | no       | `desc` (newest first, default) or `asc`. |
| `side`    | query | string | no       | `buy` or `sell`.                         |
| `minUsd`  | query | number | no       | Smallest trade in USD.                   |
| `maxUsd`  | query | number | no       | Largest trade in USD.                    |
| `wallet`  | query | string | no       | Only this wallet's trades.               |

```bash
curl "https://api.scanner.net/explorer/token/MINT_ADDRESS/trades?side=buy&minUsd=1000" \
  -H "x-api-key: $SCANNER_API_KEY"
```

**Response:** `trades` (each with `signature`, `wallet`, `type`, `amountToken`, `amountUsd`, `priceUsd` and `time` in unix milliseconds), `nextCursor` and `stillMore`.

| Status | Code           | When                      |
| ------ | -------------- | ------------------------- |
| 400    | `INVALID_MINT` | Not a valid mint address. |

Token chart [#token-chart]

```http
GET /explorer/token/{mint}/chart
```

Price candles for a token.

| Parameter  | In    | Type    | Required | Notes                                                                     |
| ---------- | ----- | ------- | -------- | ------------------------------------------------------------------------- |
| `mint`     | path  | string  | yes      | Token mint address.                                                       |
| `interval` | query | string  | no       | `1m`, `5m`, `15m`, `30m`, `1h`, `4h`, `6h`, `12h` or `1d`. Default `15m`. |
| `from`     | query | integer | no       | Start, unix seconds.                                                      |
| `to`       | query | integer | no       | End, unix seconds.                                                        |

```bash
curl "https://api.scanner.net/explorer/token/MINT_ADDRESS/chart?interval=1h" \
  -H "x-api-key: $SCANNER_API_KEY"
```

**Response:** `{ "interval": "1h", "points": [{ "t", "open", "high", "low", "close", "volume" }] }`, with `t` in unix seconds.

| Status | Code           | When                      |
| ------ | -------------- | ------------------------- |
| 400    | `INVALID_MINT` | Not a valid mint address. |

Block [#block]

```http
GET /explorer/block/{slot}
```

A block, with one page of its transactions and stats over the whole block.

| Parameter  | In    | Type    | Required | Notes                                                                                                                         |
| ---------- | ----- | ------- | -------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `slot`     | path  | integer | yes      | Slot number.                                                                                                                  |
| `page`     | query | integer | no       | Default 1.                                                                                                                    |
| `pageSize` | query | integer | no       | 1 to 100. Default 25.                                                                                                         |
| `sort`     | query | string  | no       | `index` (default), or highest first by `fee`, `priorityFee`, `jitoTip`, `feePerCu`, `cuUsed`, `cuRequested` or `solMovement`. |
| `cls`      | query | string  | no       | Comma-separated transaction classes: `0` success, `1` Jito, `2` failed, `3` vote. Default `0,1,2`, which hides votes.         |

```bash
curl "https://api.scanner.net/explorer/block/SLOT?pageSize=50&sort=priorityFee" \
  -H "x-api-key: $SCANNER_API_KEY"
```

**Response:** an `ExplorerBlockDetail`: `slot`, `blockhash`, `parentSlot`, `blockTime`, `blockHeight`, `txCount`, `transactions` (this page), `filteredCount`, `page`, `pageSize`, `totalPages`, `stats` (whole block), `chart` (one row for every transaction in the block, so it can be large) and `identities`.

| Status | Code            | When                              |
| ------ | --------------- | --------------------------------- |
| 400    | `INVALID_INPUT` | Not a valid slot number.          |
| 404    | `NOT_FOUND`     | Block not found or not available. |

Network [#network]

```http
GET /explorer/network
```

Current Solana network stats. No parameters.

```bash
curl "https://api.scanner.net/explorer/network" \
  -H "x-api-key: $SCANNER_API_KEY"
```

**Response:** `slot`, `blockHeight`, `epoch`, `epochProgressPct`, `epochSlotsRemaining`, `tps`, `solPriceUsd`, `recentBlocks` and `history` (recent snapshots).

| Status | Code             | When                           |
| ------ | ---------------- | ------------------------------ |
| 503    | `INTERNAL_ERROR` | Network stats are unavailable. |

Live blocks and activity [#live-blocks-and-activity]

```http
GET /explorer/network/blocks
GET /explorer/network/activity
```

The latest blocks, and the latest blocks with recent transactions. No parameters. Responses aren't cached.

```bash
curl "https://api.scanner.net/explorer/network/activity" \
  -H "x-api-key: $SCANNER_API_KEY"
```

**Response:** `/network/blocks` returns a list of `{ slot, blockHeight, blockTime, txCount }`. `/network/activity` returns `{ blocks, transactions }`.

Resolve a search [#resolve-a-search]

```http
GET /explorer/resolve
```

Works out what a search string is, the way the explorer search box does.

| Parameter | In    | Type   | Required | Notes                                                                                |
| --------- | ----- | ------ | -------- | ------------------------------------------------------------------------------------ |
| `q`       | query | string | yes      | 1 to 100 characters: a slot, signature, address, `.sol` domain or truncated address. |

```bash
curl "https://api.scanner.net/explorer/resolve?q=WALLET_ADDRESS" \
  -H "x-api-key: $SCANNER_API_KEY"
```

**Response:** `{ "kind", "value" }`. `kind` is `block`, `tx`, `address`, `token`, `partial` (a truncated address; look it up with the [wallet finder](/docs/api/reference/lookups#wallet-finder)) or `unknown`. A `.sol` domain resolves to its `address`.

| Status | Code            | When                               |
| ------ | --------------- | ---------------------------------- |
| 400    | `INVALID_INPUT` | `q` is missing, empty or too long. |
