# Solana Tokens Leaderboard (`websift/solana-tokens-leaderboard`) Actor

Easily retrieve real-time rankings of Solana tokens with the Solana Token Leaderboard API. Sort by market cap, holders, or price with customizable limits and sorting options. Perfect for investors, researchers, and blockchain analysts tracking token performance

- **URL**: https://apify.com/websift/solana-tokens-leaderboard.md
- **Developed by:** [Jacob](https://apify.com/websift) (community)
- **Categories:** Developer tools, Other, Automation
- **Features:** Limited permissions
- **Stats:** 42 total users, 0 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Solana Token Leaderboard Crawler

Retrieve comprehensive data about top Solana tokens effortlessly.

### Important Notes

- For optimal performance increase memory to 2048 in the input section under run options
- Minimum of **10 results** per run

### Features

- Fetch top Solana tokens
- Flexible sorting options for tokens
- Customizable data retrieval limits
- Supports sorting by:
  - **Price**
  - **Number of Holders**
  - **Market Capitalization**
- Asynchronous data collection for efficient processing

### Input

The actor accepts three optional input parameters to customize your token leaderboard search:

#### Input Parameters

##### `max_items` (integer, required):

- Maximum number of tokens to retrieve
- Must be a positive integer
- Determines the total number of tokens in the final dataset

##### `sort_by` (string, optional):

- Specify the column to sort tokens
- Allowed values:
  - `Price`
  - `Holder`
  - `Market Cap`

##### `order_by` (string, optional):

- Specify the sorting order
- Allowed values:
  - `Asc` (Ascending)
  - `Desc` (Descending)

### Output

For each token, the actor collects the following information:

- **Token Address**
- **Current Market Cap**
- **Current Price**
- **24-Hour Price Change**
- **Number of Holders**

### Example Usage

Retrieve Top 500 Tokens by Market Cap (Descending)

```
{
  "max_items": 500,
  "sort_by": "market_cap",
  "order_by": "desc"
}
```

### Example output

```
[
    {
        "address": "So11111111111111111111111111111111111111112",
        "market_cap": 126315721570.19452,
        "price": 217.09,
        "price_24h_change": 8.4408,
        "holder": 1215073
    }
]
```

### Limitations

- Some tokens might have **missing data fields** marked as `"N/A"` if not available on

### Error Handling

The actor includes robust error handling:

- Validates input parameters
- Raises clear exceptions for invalid inputs
- Gracefully handles API request failures
- Provides informative error messages

### Support

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

# Actor input Schema

## `max_items` (type: `integer`):

Maximum results returned

## `sort_by` (type: `string`):

Sort transactions by price, holder count, or market cap.

## `order_by` (type: `string`):

Set sorting order: ascending or descending.

## Actor input object example

```json
{
  "max_items": 100,
  "sort_by": "Price",
  "order_by": "Desc"
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## 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 = {
    "sort_by": "Price",
    "order_by": "Desc"
};

// Run the Actor and wait for it to finish
const run = await client.actor("websift/solana-tokens-leaderboard").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 = {
    "sort_by": "Price",
    "order_by": "Desc",
}

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

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

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

```

## CLI example

```bash
echo '{
  "sort_by": "Price",
  "order_by": "Desc"
}' |
apify call websift/solana-tokens-leaderboard --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,websift/solana-tokens-leaderboard"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Wzukw9lK9XmoxDSYc/builds/SbbGbPSHWLVyPanri/openapi.json
