# GMGN CopyTrade Wallet Scraper (`khadinakbar/gmgn-copytrade-wallet-scraper`) Actor

Scrape GMGN.ai copytrade wallet leaderboards across Solana, ETH, BSC, Base, Tron, and Monad. Export PnL, win rates, volume, tags, and wallet URLs.

- **URL**: https://apify.com/khadinakbar/gmgn-copytrade-wallet-scraper.md
- **Developed by:** [Khadin Akbar](https://apify.com/khadinakbar) (community)
- **Categories:** Developer tools, AI, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 wallet scrapeds

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

## GMGN CopyTrade Wallet Scraper

Scrape public GMGN.ai copytrade wallet leaderboards into one structured row per wallet. Choose a chain and trader category, sort by profit, PnL, win rate, volume, or activity, and export wallet addresses with realized profit, win rates, transaction counts, volume, tags, and GMGN profile links.

Built for copytrade research, smart-money screens, and MCP agents that need a bounded, billable wallet list from the public GMGN wallets rank API.

### What you get

| Field | Description |
|---|---|
| `walletAddress` | Public wallet address from the GMGN rank API |
| `chain` | `sol`, `eth`, `bsc`, `base`, `tron`, or `monad` |
| `traderType` / `traderTypeLabel` | Category such as Smart Money, KOL/VC, Sniper, Fresh Wallet |
| `realizedProfit1d/7d/30d` | Realized profit in USD for each window |
| `pnl1d/7d/30d` | PnL ratio (GMGN fraction, e.g. `0.42` = 42%) |
| `winRate1d/7d/30d` | Win rate as a 0–1 fraction |
| `transactions*`, `buys*`, `sells*` | Activity counters by window |
| `volume*`, `netInflow*` | Volume and net inflow in USD |
| `tags`, `profile` | GMGN tags plus optional Twitter/Twitch display fields |
| `gmgnWalletUrl` | Canonical GMGN address page for the wallet |
| `sourceRank`, `sourceUrl`, `scrapedAt` | Leaderboard rank, list URL, and scrape time |

### Why this Actor

- Public GMGN copytrade rank API only — no GMGN login, cookie, or private portfolio scrape.
- Six chains and the main trader tags GMGN exposes on the wallets rank endpoint.
- Client-side filters (min profit, win rate, txs, volume) after fetch so you can tighten a screen without re-querying.
- Cloudflare-aware routing: Apify **UNBLOCKER** first, then **RESIDENTIAL**, so the Actor can reach the public JSON API reliably.

### Best fit

- Build a Solana Smart Money or KOL watchlist sorted by 7D profit.
- Screen snipers or fresh wallets by win rate and volume floors.
- Feed a copytrade bot or research notebook with addresses + GMGN URLs.

This Actor is designed for the public wallets rank payload. For live DEX pair price, liquidity, and volume screens after you have wallet addresses, continue with [Dexscreener Realtime Monitor](https://apify.com/khadinakbar/dexscreener-realtime-monitor). For broader multi-asset spot quotes, start with [Crypto Price Tracker](https://apify.com/khadinakbar/crypto-price-tracker).

### Practical scenario

A researcher runs Solana + Smart Money + `profit_7d` + `maxWallets: 10`. The Actor pages the public rank API (100 wallets per page) through Unblocker, normalizes each row, and charges `$0.005` once per saved wallet. Filters such as `minWinRate7d: 40` drop weak rows before billing. If every proxy route returns challenge HTML instead of JSON, the Actor reports `UPSTREAM_FAILED` with zero wallet charges.

### Quick start input

```json
{
  "chain": "sol",
  "traderType": "smart_degen",
  "sortBy": "profit_7d",
  "sortDirection": "desc",
  "maxWallets": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["UNBLOCKER"]
  }
}
```

### Input reference

| Field | Type | What it controls |
|---|---|---|
| `chain` | enum (required) | `sol`, `eth`, `bsc`, `base`, `tron`, `monad` |
| `traderType` | enum | `all`, `smart_degen`, `pump_smart`, `launchpad_smart`, `kol`, `fresh_wallet`, `sniper`, `top_tracked`, `top_renamed`, `top_dev`, `live` |
| `sortBy` | enum | Profit / PnL / winrate / txs / volume / net\_inflow windows, plus `last_active`, `balance`, `tracked`, `renamed` |
| `sortDirection` | enum | `desc` (default) or `asc` |
| `maxWallets` | integer | Cap 1–500. Page size is 100; offset stops at 1000. |
| `minProfit7d`, `minWinRate7d`, … | number | Optional filters. Win rate and PnL thresholds are **percentages** (40 = 40%). |
| `proxyConfiguration` | object | Prefer `UNBLOCKER`. Actor also tries `RESIDENTIAL` if needed. |

### Example output row

```json
{
  "walletAddress": "ExampleSolWallet111111111111111111111111111",
  "chain": "sol",
  "sourceRank": 1,
  "traderType": "smart_degen",
  "traderTypeLabel": "Smart Money",
  "sourceSortBy": "profit_7d",
  "sourceSortDirection": "desc",
  "realizedProfit7d": 125000.5,
  "pnl7d": 0.82,
  "winRate7d": 0.61,
  "transactions7d": 140,
  "volume7d": 890000,
  "tags": ["smart_degen"],
  "gmgnWalletUrl": "https://gmgn.ai/sol/address/ExampleSolWallet111111111111111111111111111",
  "scrapeStatus": "ok",
  "scrapedAt": "2026-09-22T10:00:00.000Z"
}
```

`OUTPUT` and `RUN_SUMMARY` in the key-value store include `outcome`, `itemsPushed`, `pagesFetched`, `route`, and `chargedEventCounts`.

### Cloudflare / Unblocker note

GMGN sits behind Cloudflare. This Actor defaults to Apify **UNBLOCKER** (`rejectUnauthorized: false` via undici `ProxyAgent`) and falls back to **RESIDENTIAL**. Platform Unblocker usage is billed to the run under platform-usage pass-through — keep `maxWallets` small while testing. When every route returns a challenge page, the Actor reports `UPSTREAM_FAILED` rather than inventing wallets.

### Use through the API

```bash
curl -X POST "https://api.apify.com/v2/acts/khadinakbar~gmgn-copytrade-wallet-scraper/runs" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"chain":"sol","traderType":"smart_degen","sortBy":"profit_7d","maxWallets":10}'
```

Download rows as JSON, CSV, Excel, or HTML from the Dataset tab.

### Use with AI agents through Apify MCP

> Scrape the top 10 Solana Smart Money wallets on GMGN sorted by 7D profit. Return walletAddress, realizedProfit7d, winRate7d, volume7d, tags, and gmgnWalletUrl.

Connect via <https://mcp.apify.com>. Tool name follows `apify--gmgn-copytrade-wallet-scraper`. Read `OUTPUT.outcome` and `itemsPushed`. Cost signal: about `$0.005` per saved wallet plus platform usage (including Unblocker).

### Pricing

Pay per event plus Apify platform usage (caller-paid). The live Pricing tab is the source of truth.

| Event | Price |
|---|---|
| `apify-actor-start` | $0.00005 per run (scaled by memory) |
| `wallet-scraped` | **$0.005** per dataset wallet row |

Example: 10 wallets ≈ $0.05 in result events + Unblocker/compute usage. Invalid input and total upstream blocks leave `wallet-scraped` unbilled.

### How it works

1. Normalize chain, trader tag, sort metric, and `maxWallets`.
2. Call `GET /defi/quotation/v1/rank/{chain}/wallets/7d` with tag/orderby/limit/offset.
3. Prefer Unblocker, then Residential; parse `data.rank` JSON.
4. Normalize fields, apply optional filters, `Actor.charge('wallet-scraped')`, then `pushData`.
5. Write `OUTPUT` / `RUN_SUMMARY` with `COMPLETE`, `PARTIAL`, `VALID_EMPTY`, `INVALID_INPUT`, or `UPSTREAM_FAILED`.

### Best results

- Keep `maxWallets` ≤ 25 for first runs until Unblocker billing looks right.
- Leave proxy on Unblocker; that is the reliable path past Cloudflare for this source.
- Enter win-rate filters as percentages (40), not fractions (0.4).
- Empty leaderboard after filters → `VALID_EMPTY` with zero wallet charges.

### Builder's note

I built this around GMGN's public wallets rank JSON because it already carries the copytrade leaderboard fields most agents need. In my testing, bare Residential requests often returned Cloudflare challenge HTML; Unblocker with TLS verification relaxed for the proxy hop was the path that returned real `code: 0` payloads. Caps stay explicit (100/page, offset ≤ 1000, max 500 wallets) so a single run stays bounded.

### Legal and responsible use

Use this Actor only on public GMGN leaderboard data you are authorized to process. Follow applicable law and GMGN's terms. GMGN is a third-party brand. This independent Actor is not affiliated with, associated with, or endorsed by GMGN. Keep output use lawful and within exchange or platform rules.

Issues and feature requests: use the Actor Issues tab on Apify.

# Changelog

This Actor's version history is a separate document: https://apify.com/khadinakbar/gmgn-copytrade-wallet-scraper/changelog.md

# Actor input Schema

## `chain` (type: `string`):

GMGN chain whose copytrade wallet leaderboard to scrape.

## `traderType` (type: `string`):

GMGN wallet group. Use All wallets for the broad leaderboard, or a smart-money category for a narrower copytrade list.

## `sortBy` (type: `string`):

Leaderboard ranking metric.

## `sortDirection` (type: `string`):

Descending for top wallets; ascending for lowest values.

## `maxWallets` (type: `integer`):

Maximum number of wallets to save (1–500). Start with 10 for a quick quality sample.

## `minProfit7d` (type: `number`):

Keep only wallets with at least this realized 7-day profit in USD. Leave empty to skip.

## `minWinRate7d` (type: `number`):

Minimum 7-day win rate percentage (e.g. 40 for 40%). Leave empty to skip.

## `minTxs7d` (type: `integer`):

Minimum 7-day transaction count. Leave empty to skip.

## `minPnl7d` (type: `number`):

Minimum 7-day PnL percentage. Leave empty to skip.

## `minVolume7d` (type: `number`):

Minimum 7-day trading volume in USD. Leave empty to skip.

## `minProfit1d` (type: `number`):

Minimum 1-day realized profit in USD. Leave empty to skip.

## `minWinRate1d` (type: `number`):

Minimum 1-day win rate percentage. Leave empty to skip.

## `minProfit30d` (type: `number`):

Minimum 30-day realized profit in USD. Leave empty to skip.

## `minWinRate30d` (type: `number`):

Minimum 30-day win rate percentage. Leave empty to skip.

## `proxyConfiguration` (type: `object`):

Apify Proxy settings. Default routing prefers UNBLOCKER then RESIDENTIAL because GMGN is Cloudflare-protected.

## Actor input object example

```json
{
  "chain": "sol",
  "traderType": "smart_degen",
  "sortBy": "profit_7d",
  "sortDirection": "desc",
  "maxWallets": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "UNBLOCKER"
    ]
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `summary` (type: `string`):

No description

## `runSummary` (type: `string`):

No description

# 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 = {
    "chain": "sol",
    "traderType": "smart_degen",
    "sortBy": "profit_7d",
    "sortDirection": "desc",
    "maxWallets": 10,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "UNBLOCKER"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/gmgn-copytrade-wallet-scraper").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 = {
    "chain": "sol",
    "traderType": "smart_degen",
    "sortBy": "profit_7d",
    "sortDirection": "desc",
    "maxWallets": 10,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["UNBLOCKER"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("khadinakbar/gmgn-copytrade-wallet-scraper").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 '{
  "chain": "sol",
  "traderType": "smart_degen",
  "sortBy": "profit_7d",
  "sortDirection": "desc",
  "maxWallets": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "UNBLOCKER"
    ]
  }
}' |
apify call khadinakbar/gmgn-copytrade-wallet-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,khadinakbar/gmgn-copytrade-wallet-scraper"
        }
    }
}
```

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/ejyTAK9SdhoqSGcJQ/builds/aay9B4OQFNG5byPRo/openapi.json
