# Crypto Prices, Coins & DEX Pairs Scraper | 2Space (`2space/crypto-dex-market-scraper`) Actor

Fast cryptocurrency market cap and DEX liquidity pair scraper via CoinGecko and DexScreener. Scrapes token prices, 24h volume, FDV, liquidity USD, contract addresses, chains, and social links.

- **URL**: https://apify.com/2space/crypto-dex-market-scraper.md
- **Developed by:** [2Space Group](https://apify.com/2space) (community)
- **Categories:** Business, AI, MCP servers
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 1,000 crypto coin or dex pair scraped

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/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

### Crypto Prices, Coins & DEX Pairs Scraper | 2Space

> **Built by 2Space** · Fast, zero-browser **crypto price scraper**, **cryptocurrency market data API**, **CoinGecko scraper**, and **DEX pair scraper** powered by direct CoinGecko and DexScreener endpoints for AI agents, MCP clients, quantitative trading pipelines, and DeFi analytics.

[![Apify Actor](https://img.shields.io/badge/Apify-crypto--dex--market--scraper-00C853?style=flat-square)](https://apify.com/2space/crypto-dex-market-scraper)
[![MCP Ready](https://img.shields.io/badge/MCP-Ready-2563EB?style=flat-square)](https://mcp.apify.com?tools=2space/crypto-dex-market-scraper)
[![Zero Browser](https://img.shields.io/badge/Runtime-Pure%20HTTP-7C3AED?style=flat-square)](https://apify.com/2space/crypto-dex-market-scraper)

Whether you need a reliable **crypto price scraper** for live spot valuations, a **CoinGecko scraper** for top market-cap cryptocurrencies, a **DEX pair scraper** and **DexScreener API alternative** for on-chain liquidity pools, or a clean **cryptocurrency market data API** for AI agents and DeFi research, this Actor delivers structured, deduplicated records in seconds without headless browsers or proxy overhead.

***

### Why Choose This Crypto & DEX Scraper?

- **Dual-Source Market Coverage:** Combines global market-cap rankings from CoinGecko (`/api/v3/coins/markets`) with real-time multi-chain DEX liquidity pools from DexScreener (`/latest/dex/search` and `/latest/dex/tokens`) in a single run.
- **Zero-Browser Speed & Reliability:** Executes pure HTTP JSON requests with automatic retry logic and DexScreener fallback coverage if CoinGecko rate-limits (`429`), keeping empty `{}` default runs fast and dependable.
- **Flat, Agent-Ready Schema:** Outputs clean scalar fields (`recordType`, `symbol`, `name`, `chainId`, `dexId`, `priceUsd`, `priceChange24hPct`, `volume24hUsd`, `liquidityUsd`, `marketCapOrFdvUsd`, `pairOrTokenAddress`, `url`, `websiteUrl`, `twitterUrl`, `extractedAt`) suited for SQL tables, Google Sheets, LLM tool calls, and trading bots.
- **Token Contract & Ticker Lookup:** Search by pair or project keywords (`dexQueries`) or look up exact token contract addresses (`tokenAddresses`) across Solana, Ethereum, Base, Arbitrum, BSC, and more.
- **Empty `{}` Input Ready:** Works immediately with zero configuration—an empty `{}` payload defaults to `mode: "both"`, `dexQueries: ["solana"]`, `topCoinsLimit: 5`, `maxItems: 10`, and `maxCostUsd: 0.25`.
- **No Data, No Charge (Pay-Per-Event):** Uses the `crypto-token-scraped` event (`count: 1`), charged **only after** a validated record is pushed to the dataset, protected by `maxItems` and `maxCostUsd` pre-charge caps.

***

### Popular Use Cases

- **AI Agent Market Intelligence:** Equip Claude, ChatGPT, Cursor, or Antigravity via Apify MCP with real-time token prices, 24h volume, and DEX liquidity depth.
- **DeFi Liquidity & Slippage Screening:** Compare pool liquidity (`liquidityUsd`), 24h volume (`volume24hUsd`), and FDV across Raydium, Orca, Uniswap, and Aerodrome pools.
- **Portfolio & Screener Pipelines:** Schedule hourly or daily Apify runs to export top coins and emerging DEX pairs directly into PostgreSQL, BigQuery, Google Sheets, or webhooks.
- **Token Contract Enrichment:** Pass a list of Solana or EVM token addresses in `tokenAddresses` to retrieve live USD prices, active trading pairs, official websites, and X/Twitter links.

***

### Input Parameters

See the Input tab in Apify Console for full schema validation and form controls.

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | `string` | `"both"` | `"both"` (CoinGecko + DexScreener), `"dex_pairs"` (DexScreener only), or `"top_coins"` (CoinGecko only). |
| `dexQueries` | `string[]` | `["solana"]` | DexScreener search queries such as `"solana"`, `"PEPE"`, or `"ETH/USDC"`. |
| `tokenAddresses` | `string[]` | `[]` | Optional token contract addresses to fetch directly via DexScreener (batched up to 30 per request). |
| `topCoinsLimit` | `integer` | `5` | Number of top coins by market capitalization to fetch from CoinGecko (`1`–`250`). |
| `maxItems` | `integer` | `10` | Hard cap on deduplicated coin and DEX pair items to push and charge (`1`–`10000`). |
| `maxCostUsd` | `number` | `0.25` | Pre-charge spending cap in USD for Pay-Per-Event billing safety. |

***

### Example JSON Output

You can download the dataset in JSON, CSV, Excel, HTML, or XML formats. Each dataset item uses flat scalar fields:

```json
{
  "recordType": "dex_pair",
  "symbol": "SOL/USDC",
  "name": "Wrapped SOL",
  "chainId": "solana",
  "dexId": "orca",
  "priceUsd": 71.12,
  "priceChange24hPct": -1.56,
  "volume24hUsd": 68863193.14,
  "liquidityUsd": 12450890.5,
  "marketCapOrFdvUsd": 64250000000,
  "pairOrTokenAddress": "Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE",
  "url": "https://dexscreener.com/solana/czfq3xzzdmsdgduyrnltrhgc47cxcztlg4crryfu44ze",
  "websiteUrl": "https://solana.com/",
  "twitterUrl": "https://x.com/solana",
  "extractedAt": "2026-12-03T03:45:10.000Z"
}
```

Execution telemetry (request counts, HTTP statuses, deduplication totals, and billing flags) is stored in the default Key-Value Store under `RUN_DIAGNOSTICS`.

***

### 1-Prompt MCP & API Integration

Connect `2space/crypto-dex-market-scraper` to any MCP-compatible AI client (Claude Desktop, Cursor, ChatGPT, or Antigravity) using the one-line Apify MCP URL:

```text
https://mcp.apify.com?tools=2space/crypto-dex-market-scraper
```

Or configure `mcpServers` in Cursor / Claude Desktop:

```json
{
  "mcpServers": {
    "crypto-dex-market-scraper": {
      "url": "https://mcp.apify.com?tools=2space/crypto-dex-market-scraper",
      "headers": {
        "Authorization": "Bearer YOUR_APIFY_TOKEN"
      }
    }
  }
}
```

Then prompt your assistant: *"Use crypto-dex-market-scraper to fetch the top 5 cryptocurrencies and the highest-volume Solana DEX pairs right now."*

You can also invoke the synchronous REST API directly from n8n, Make, Zapier, or backend services:

```text
POST https://api.apify.com/v2/acts/2space~crypto-dex-market-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN
```

***

### Pricing & Anti-1-Star Guarantee

- **Pay-Per-Event (`crypto-token-scraped`):** Billed `count: 1` per validated coin or DEX pair item pushed to the dataset.
- **No Data, No Charge:** If an upstream request returns zero valid items, `Actor.charge()` is never called.
- **Spending Controls:** Both `maxItems` and `maxCostUsd` are evaluated before pushing or charging, and Apify's `eventChargeLimitReached` stops the run cleanly at your budget limit.

***

### Issues & Support

This Actor retrieves strictly public market price, volume, and liquidity metadata and does not collect private personal data. If you encounter an unexpected token response or schema edge case, please open a ticket on the Actor's **Issues** tab at [apify.com/2space/crypto-dex-market-scraper](https://apify.com/2space/crypto-dex-market-scraper) with your anonymized input payload and `RUN_DIAGNOSTICS` summary.

# Actor input Schema

## `mode` (type: `string`):

Data source mode: 'both' (CoinGecko top coins + DexScreener DEX pairs), 'dex_pairs' (DexScreener only), or 'top_coins' (CoinGecko top coins only).

## `dexQueries` (type: `array`):

DexScreener search queries (token symbols, project names, or pair tickers such as 'solana', 'PEPE', or 'ETH/USDC'). Used in 'both' and 'dex_pairs' modes.

## `tokenAddresses` (type: `array`):

Optional list of token contract addresses to look up directly on DexScreener (Solana, Ethereum, Base, Arbitrum, BSC, etc.).

## `topCoinsLimit` (type: `integer`):

Number of top cryptocurrencies by market capitalization to fetch from CoinGecko (used in 'both' and 'top_coins' modes).

## `maxItems` (type: `integer`):

Hard cap on the maximum number of deduplicated coin and DEX pair records to push and charge.

## `maxCostUsd` (type: `number`):

Pre-charge spending safety cap in USD for Pay-Per-Event billing.

## Actor input object example

```json
{
  "mode": "both",
  "dexQueries": [
    "solana"
  ],
  "tokenAddresses": [],
  "topCoinsLimit": 5,
  "maxItems": 10,
  "maxCostUsd": 0.25
}
```

# Actor output Schema

## `overview` (type: `string`):

Dataset items containing extracted coins and DEX pairs with flat scalar fields.

# 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 = {
    "mode": "both",
    "dexQueries": [
        "solana"
    ],
    "tokenAddresses": [],
    "topCoinsLimit": 5,
    "maxItems": 10,
    "maxCostUsd": 0.25
};

// Run the Actor and wait for it to finish
const run = await client.actor("2space/crypto-dex-market-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 = {
    "mode": "both",
    "dexQueries": ["solana"],
    "tokenAddresses": [],
    "topCoinsLimit": 5,
    "maxItems": 10,
    "maxCostUsd": 0.25,
}

# Run the Actor and wait for it to finish
run = client.actor("2space/crypto-dex-market-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 '{
  "mode": "both",
  "dexQueries": [
    "solana"
  ],
  "tokenAddresses": [],
  "topCoinsLimit": 5,
  "maxItems": 10,
  "maxCostUsd": 0.25
}' |
apify call 2space/crypto-dex-market-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,2space/crypto-dex-market-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/ZBmBYAvuFLmsnmCNk/builds/l8OeTz6ejBVt1YRgR/openapi.json
