# Solana Transaction API

Fetch comprehensive Solana transaction details with the Solana Transaction API. Retrieve token transfers, fees, DEX interactions, and more in a single request. Supports up to 20 transactions per query with real-time insights. Perfect for developers, traders, and analysts.

## Actor Statistics

- Total users: 27
- Monthly users: 2
- Runs succeeded: 100.00%
- Categories: Developer tools, E-commerce, Other

## Pricing

$2.00 / 1,000 results

## Input Schema

- **transaction** (type: array): Transaction signatures on the solana blockchain

## API example

## Solana Transaction API

- **OpenAPI Version:** `3.1.1`
- **API Version:** `0.0`

Fetch comprehensive Solana transaction details with the Solana Transaction API. Retrieve token transfers, fees, DEX interactions, and more in a single request. Supports up to 20 transactions per query with real-time insights. Perfect for developers, traders, and analysts.

### Servers

- **URL:** `https://api.apify.com/v2`

### Operations

#### Executes an Actor, waits for its completion, and returns Actor's dataset items in response.

- **Method:** `POST`
- **Path:** `/acts/websift~solana-transaction-api/run-sync-get-dataset-items`
- **Tags:** Run Actor

##### Request Body

###### Content-Type: application/json

- **`transaction` (required)**

  `array` — Transaction signatures on the solana blockchain

  **Items:**

  `string`

**Example:**

```
{
  "transaction": [
    ""
  ]
}
```

##### Responses

###### Status: 200 OK

#### Executes an Actor and returns information about the initiated run in response.

- **Method:** `POST`
- **Path:** `/acts/websift~solana-transaction-api/runs`
- **Tags:** Run Actor

##### Request Body

###### Content-Type: application/json

- **`transaction` (required)**

  `array` — Transaction signatures on the solana blockchain

  **Items:**

  `string`

**Example:**

```
{
  "transaction": [
    ""
  ]
}
```

##### Responses

###### Status: 200 OK

\####### Content-Type: application/json

- **`data`**

  `object`

  - **`actId`**

    `string`

  - **`buildId`**

    `string`

  - **`buildNumber`**

    `string`

  - **`containerUrl`**

    `string`

  - **`defaultDatasetId`**

    `string`

  - **`defaultKeyValueStoreId`**

    `string`

  - **`defaultRequestQueueId`**

    `string`

  - **`finishedAt`**

    `string`, format: `date-time`

  - **`id`**

    `string`

  - **`meta`**

    `object`

    - **`origin`**

      `string`

    - **`userAgent`**

      `string`

  - **`options`**

    `object`

    - **`build`**

      `string`

    - **`diskMbytes`**

      `integer`

    - **`memoryMbytes`**

      `integer`

    - **`timeoutSecs`**

      `integer`

  - **`startedAt`**

    `string`, format: `date-time`

  - **`stats`**

    `object`

    - **`computeUnits`**

      `integer`

    - **`inputBodyLen`**

      `integer`

    - **`rebootCount`**

      `integer`

    - **`restartCount`**

      `integer`

    - **`resurrectCount`**

      `integer`

  - **`status`**

    `string`

  - **`usage`**

    `object`

    - **`ACTOR_COMPUTE_UNITS`**

      `integer`

    - **`DATA_TRANSFER_EXTERNAL_GBYTES`**

      `integer`

    - **`DATA_TRANSFER_INTERNAL_GBYTES`**

      `integer`

    - **`DATASET_READS`**

      `integer`

    - **`DATASET_WRITES`**

      `integer`

    - **`KEY_VALUE_STORE_LISTS`**

      `integer`

    - **`KEY_VALUE_STORE_READS`**

      `integer`

    - **`KEY_VALUE_STORE_WRITES`**

      `integer`

    - **`PROXY_RESIDENTIAL_TRANSFER_GBYTES`**

      `integer`

    - **`PROXY_SERPS`**

      `integer`

    - **`REQUEST_QUEUE_READS`**

      `integer`

    - **`REQUEST_QUEUE_WRITES`**

      `integer`

  - **`usageTotalUsd`**

    `number`

  - **`usageUsd`**

    `object`

    - **`ACTOR_COMPUTE_UNITS`**

      `integer`

    - **`DATA_TRANSFER_EXTERNAL_GBYTES`**

      `integer`

    - **`DATA_TRANSFER_INTERNAL_GBYTES`**

      `integer`

    - **`DATASET_READS`**

      `integer`

    - **`DATASET_WRITES`**

      `integer`

    - **`KEY_VALUE_STORE_LISTS`**

      `integer`

    - **`KEY_VALUE_STORE_READS`**

      `integer`

    - **`KEY_VALUE_STORE_WRITES`**

      `number`

    - **`PROXY_RESIDENTIAL_TRANSFER_GBYTES`**

      `integer`

    - **`PROXY_SERPS`**

      `integer`

    - **`REQUEST_QUEUE_READS`**

      `integer`

    - **`REQUEST_QUEUE_WRITES`**

      `integer`

  - **`userId`**

    `string`

**Example:**

```
{
  "data": {
    "id": "",
    "actId": "",
    "userId": "",
    "startedAt": "2025-01-08T00:00:00.000Z",
    "finishedAt": "2025-01-08T00:00:00.000Z",
    "status": "READY",
    "meta": {
      "origin": "API",
      "userAgent": ""
    },
    "stats": {
      "inputBodyLen": 2000,
      "rebootCount": 0,
      "restartCount": 0,
      "resurrectCount": 0,
      "computeUnits": 0
    },
    "options": {
      "build": "latest",
      "timeoutSecs": 300,
      "memoryMbytes": 1024,
      "diskMbytes": 2048
    },
    "buildId": "",
    "defaultKeyValueStoreId": "",
    "defaultDatasetId": "",
    "defaultRequestQueueId": "",
    "buildNumber": "1.0.0",
    "containerUrl": "",
    "usage": {
      "ACTOR_COMPUTE_UNITS": 0,
      "DATASET_READS": 0,
      "DATASET_WRITES": 0,
      "KEY_VALUE_STORE_READS": 0,
      "KEY_VALUE_STORE_WRITES": 1,
      "KEY_VALUE_STORE_LISTS": 0,
      "REQUEST_QUEUE_READS": 0,
      "REQUEST_QUEUE_WRITES": 0,
      "DATA_TRANSFER_INTERNAL_GBYTES": 0,
      "DATA_TRANSFER_EXTERNAL_GBYTES": 0,
      "PROXY_RESIDENTIAL_TRANSFER_GBYTES": 0,
      "PROXY_SERPS": 0
    },
    "usageTotalUsd": 0.00005,
    "usageUsd": {
      "ACTOR_COMPUTE_UNITS": 0,
      "DATASET_READS": 0,
      "DATASET_WRITES": 0,
      "KEY_VALUE_STORE_READS": 0,
      "KEY_VALUE_STORE_WRITES": 0.00005,
      "KEY_VALUE_STORE_LISTS": 0,
      "REQUEST_QUEUE_READS": 0,
      "REQUEST_QUEUE_WRITES": 0,
      "DATA_TRANSFER_INTERNAL_GBYTES": 0,
      "DATA_TRANSFER_EXTERNAL_GBYTES": 0,
      "PROXY_RESIDENTIAL_TRANSFER_GBYTES": 0,
      "PROXY_SERPS": 0
    }
  }
}
```

#### Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.

- **Method:** `POST`
- **Path:** `/acts/websift~solana-transaction-api/run-sync`
- **Tags:** Run Actor

##### Request Body

###### Content-Type: application/json

- **`transaction` (required)**

  `array` — Transaction signatures on the solana blockchain

  **Items:**

  `string`

**Example:**

```
{
  "transaction": [
    ""
  ]
}
```

##### Responses

###### Status: 200 OK

### Schemas

#### inputSchema

- **Type:**`object`

* **`transaction` (required)**

  `array` — Transaction signatures on the solana blockchain

  **Items:**

  `string`

**Example:**

```
{
  "transaction": [
    ""
  ]
}
```

#### runsResponseSchema

- **Type:**`object`

* **`data`**

  `object`

  - **`actId`**

    `string`

  - **`buildId`**

    `string`

  - **`buildNumber`**

    `string`

  - **`containerUrl`**

    `string`

  - **`defaultDatasetId`**

    `string`

  - **`defaultKeyValueStoreId`**

    `string`

  - **`defaultRequestQueueId`**

    `string`

  - **`finishedAt`**

    `string`, format: `date-time`

  - **`id`**

    `string`

  - **`meta`**

    `object`

    - **`origin`**

      `string`

    - **`userAgent`**

      `string`

  - **`options`**

    `object`

    - **`build`**

      `string`

    - **`diskMbytes`**

      `integer`

    - **`memoryMbytes`**

      `integer`

    - **`timeoutSecs`**

      `integer`

  - **`startedAt`**

    `string`, format: `date-time`

  - **`stats`**

    `object`

    - **`computeUnits`**

      `integer`

    - **`inputBodyLen`**

      `integer`

    - **`rebootCount`**

      `integer`

    - **`restartCount`**

      `integer`

    - **`resurrectCount`**

      `integer`

  - **`status`**

    `string`

  - **`usage`**

    `object`

    - **`ACTOR_COMPUTE_UNITS`**

      `integer`

    - **`DATA_TRANSFER_EXTERNAL_GBYTES`**

      `integer`

    - **`DATA_TRANSFER_INTERNAL_GBYTES`**

      `integer`

    - **`DATASET_READS`**

      `integer`

    - **`DATASET_WRITES`**

      `integer`

    - **`KEY_VALUE_STORE_LISTS`**

      `integer`

    - **`KEY_VALUE_STORE_READS`**

      `integer`

    - **`KEY_VALUE_STORE_WRITES`**

      `integer`

    - **`PROXY_RESIDENTIAL_TRANSFER_GBYTES`**

      `integer`

    - **`PROXY_SERPS`**

      `integer`

    - **`REQUEST_QUEUE_READS`**

      `integer`

    - **`REQUEST_QUEUE_WRITES`**

      `integer`

  - **`usageTotalUsd`**

    `number`

  - **`usageUsd`**

    `object`

    - **`ACTOR_COMPUTE_UNITS`**

      `integer`

    - **`DATA_TRANSFER_EXTERNAL_GBYTES`**

      `integer`

    - **`DATA_TRANSFER_INTERNAL_GBYTES`**

      `integer`

    - **`DATASET_READS`**

      `integer`

    - **`DATASET_WRITES`**

      `integer`

    - **`KEY_VALUE_STORE_LISTS`**

      `integer`

    - **`KEY_VALUE_STORE_READS`**

      `integer`

    - **`KEY_VALUE_STORE_WRITES`**

      `number`

    - **`PROXY_RESIDENTIAL_TRANSFER_GBYTES`**

      `integer`

    - **`PROXY_SERPS`**

      `integer`

    - **`REQUEST_QUEUE_READS`**

      `integer`

    - **`REQUEST_QUEUE_WRITES`**

      `integer`

  - **`userId`**

    `string`

**Example:**

```
{
  "data": {
    "id": "",
    "actId": "",
    "userId": "",
    "startedAt": "2025-01-08T00:00:00.000Z",
    "finishedAt": "2025-01-08T00:00:00.000Z",
    "status": "READY",
    "meta": {
      "origin": "API",
      "userAgent": ""
    },
    "stats": {
      "inputBodyLen": 2000,
      "rebootCount": 0,
      "restartCount": 0,
      "resurrectCount": 0,
      "computeUnits": 0
    },
    "options": {
      "build": "latest",
      "timeoutSecs": 300,
      "memoryMbytes": 1024,
      "diskMbytes": 2048
    },
    "buildId": "",
    "defaultKeyValueStoreId": "",
    "defaultDatasetId": "",
    "defaultRequestQueueId": "",
    "buildNumber": "1.0.0",
    "containerUrl": "",
    "usage": {
      "ACTOR_COMPUTE_UNITS": 0,
      "DATASET_READS": 0,
      "DATASET_WRITES": 0,
      "KEY_VALUE_STORE_READS": 0,
      "KEY_VALUE_STORE_WRITES": 1,
      "KEY_VALUE_STORE_LISTS": 0,
      "REQUEST_QUEUE_READS": 0,
      "REQUEST_QUEUE_WRITES": 0,
      "DATA_TRANSFER_INTERNAL_GBYTES": 0,
      "DATA_TRANSFER_EXTERNAL_GBYTES": 0,
      "PROXY_RESIDENTIAL_TRANSFER_GBYTES": 0,
      "PROXY_SERPS": 0
    },
    "usageTotalUsd": 0.00005,
    "usageUsd": {
      "ACTOR_COMPUTE_UNITS": 0,
      "DATASET_READS": 0,
      "DATASET_WRITES": 0,
      "KEY_VALUE_STORE_READS": 0,
      "KEY_VALUE_STORE_WRITES": 0.00005,
      "KEY_VALUE_STORE_LISTS": 0,
      "REQUEST_QUEUE_READS": 0,
      "REQUEST_QUEUE_WRITES": 0,
      "DATA_TRANSFER_INTERNAL_GBYTES": 0,
      "DATA_TRANSFER_EXTERNAL_GBYTES": 0,
      "PROXY_RESIDENTIAL_TRANSFER_GBYTES": 0,
      "PROXY_SERPS": 0
    }
  }
}
```

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "transaction": [
        "4NaLA8Y71oM39bjhdUutWDGzpNZKVK5cXCfZ5MBxZkaBQ5X1DzLfvRB86vs5MgNjFHHpahuxk9fUAmKcmAqW9n71"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("websift/solana-transaction-api").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "transaction": ["4NaLA8Y71oM39bjhdUutWDGzpNZKVK5cXCfZ5MBxZkaBQ5X1DzLfvRB86vs5MgNjFHHpahuxk9fUAmKcmAqW9n71"] }

# Run the Actor and wait for it to finish
run = client.actor("websift/solana-transaction-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "transaction": [
    "4NaLA8Y71oM39bjhdUutWDGzpNZKVK5cXCfZ5MBxZkaBQ5X1DzLfvRB86vs5MgNjFHHpahuxk9fUAmKcmAqW9n71"
  ]
}' |
apify call websift/solana-transaction-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?actors=websift/solana-transaction-api",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## Solana Transaction API

A powerful actor for retrieving detailed transaction information from the Solana blockchain. This actor allows you to fetch comprehensive transaction data for multiple Solana transactions in a single request.

### Features

- Fetch detailed transaction data from the Solana blockchain
- Support for multiple transactions (up to 10) in a single request
- Comprehensive transaction information including

### Example Input

The actor accepts input in JSON format with the following structure:

```
{
    "transaction": [
        "transaction_signature_1",
        "transaction_signature_2",
        ...
    ]
}
```

### Important Notes

- Maximum of **10 transaction signatures** per request
- Transaction signatures must be **valid Solana transaction hashes**

### Output

The actor outputs detailed transaction information for each provided signature. Each transaction output includes:

- **Transaction ID** and Solscan link
- **SOL and token balance changes**
- **Detailed token information** for all tokens involved
- **Transaction fees** and computational costs
- **Transaction status** and confirmation details
- **Timestamp and date information**
- **DEX information**
- **Account signers**
- **Block information**
- **Final transaction logs**

### Example Output

```
[
    {
        "txn_id": "...", // Transaction signature
        "txn_link": "https://solscan.io/tx/...",
        "sol_balance_change": [
            {
                "address": "...",
                "pre_balance": 233341175,
                "post_balance": 4147932,
                "change_amount": -229193243
            },
        ],
        "token_balance_change": [
            {
                "address": "...",
                "decimals": 9,
                "change_amount": "91897675202",
                "post_balance": "91897675202",
                "pre_balance": 0,
                "token_address": "23CTZMjEYNNZUE4itfn3iv6kgM4xn7X7dx1kVX1Gr8Xi",
                "owner": "...",
            }
        ],
        "tokens_involved": [
            {
                "token_address": "23CTZMjEYNNZUE4itfn3iv6kgM4xn7X7dx1kVX1Gr8Xi",
                "token_name": "We Love Tits",
                "token_symbol": "TITS",
                "token_icon": "https://bafkreicf3guwowdmyrfwob5ikf4o4x2zlqzqtn7mckhb5p2bvpqq2dpgju.ipfs.nftstorage.link",
                "token_decimals": 9,
                "token_type": "token",
                "price_usdt": 0.01141266
            },
            {
                "token_address": "So11111111111111111111111111111111111111112",
                "token_name": "Wrapped SOL",
                "token_symbol": "SOL",
                "token_icon": "https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/So11111111111111111111111111111111111111112/logo.png",
                "token_decimals": 9,
                "token_type": "token",
                "price_usdt": 212.77
            },
            {
                "token_address": "So11111111111111111111111111111111111111111",
                "token_decimals": 9,
                "token_name": "SOL",
                "token_symbol": "SOL",
                "token_type": "token",
                "token_icon": "https://statics.solscan.io/solscan-img/solana_icon.svg",
                "price_usdt": 212.77
            }
        ]
        "fee": 5000,
        "priority_fee": 0,
        "total_fee": 200000,
        "tx_status": "finalized",
        "confirmations": 32,
        "txn_date": "2024-02-02 15:30:45",
        "txn_timestamp": 1706891445,
        "dex": {
            "tag_id": "raydium",
            "tag_name": "Raydium",
            "tag_type": 1,
            "tag_metadata": {
                "icon": "https://statics.solscan.io/ex-img/5quBtoiQqxF9Jv6KYKctB59NT3gtJD2Y65kdnB1Uev3h.png",
                "website": "https://raydium.io/"
            }
        },
        "account_signers": ["..."],
        "block_id": 12345678,
        "recent_blockhash": "AotEM1wvDMcxGDJJXNYMiyndWZ9kNKfdL3z3vbSc4mZU"
        "final_log": "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success"
    }
]
```

### Limitations

- Only processes **up to 10 transactions per run** to ensure reliable performance
- Some tokens might have **missing data fields** marked as `"N/A"` if not available on

### Error Handling

The actor provides clear error messages for common issues:

- **Invalid input format**
- **Exceeding maximum transaction limit**
- **Failed transaction fetches**

### Support

For issues, feature requests, or questions about this actor, please create an issue.
