# Dexscreener Api (`crypto-scraper/dexscreener-api`) Actor

Official Dexscreener API to get price changes, liquidity, and market cap across multiple chains. Integrate easily into your workflow and make data-driven investment decisions.

- **URL**: https://apify.com/crypto-scraper/dexscreener-api.md
- **Developed by:** [Crypto Scraper](https://apify.com/crypto-scraper) (community)
- **Categories:** Automation, Developer tools, Other
- **Features:** Full permissions
- **Stats:** 15 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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

## 🚀 DexScreener Tokens Scraper

Looking to supercharge your crypto insights? Get a front-row seat to emerging opportunities with our **DexScreener Tokens Scraper**, now available on the Apify Store. Harness the power of **real-time token data** across multiple blockchains and give your investment strategy a competitive edge.

### Why Choose DexScreener Tokens Scraper?

**For ambitious traders, savvy investors, insightful researchers, and forward-thinking developers**, this Actor provides a streamlined solution for collecting, organizing, and analyzing crypto token data. Whether you’re scouting for the next breakout token or integrating fresh data into your analytics pipeline, our scraper puts you ahead of the curve.

### 💎 Key Benefits

- **Early Access to Trends**: Monitor tokens as soon as they list and catch hot trends before the crowd.
- **Multi-Chain Versatility**: From Ethereum to Solana, effortlessly explore a diversified crypto ecosystem.
- **Data-Driven Decisions**: Gain actionable insights from pricing, volume, liquidity, and more.
- **Streamlined Integration**: Export clean, structured JSON data ready for dashboards, analytics tools, or development projects.

### 🌐 Multi-Blockchain Coverage

Our Actor supports a broad spectrum of networks, giving you a holistic market view:

- **Ethereum (ETH)**
- **Binance Smart Chain (BSC)**
- **Solana (SOL)**
- **Polygon (MATIC)**
- **Avalanche (AVAX)**
- **Fantom (FTM)**
- **...and more!**

### 📊 Comprehensive Data Fields

When you run the Actor, you’ll receive up-to-the-minute details, including:

- **Token Names & Symbols**
- **Current Prices in USD**
- **Token Age Since Listing**
- **Transaction Counts & Unique Makers**
- **Trading Volume & Market Cap in USD**
- **Liquidity Data**
- **Short- and Long-Term Price Changes** (5m, 1h, 6h, 24h)

Armed with this data, you can quickly spot promising projects, identify liquidity shifts, and react faster to market changes.

### ⚙️ Customizable Scraping Options

Control your scraping parameters to focus on what matters most:

- **Targeted Chains & Pagination**: Drill down into specific blockchains and paginate results.
- **Filter Arguments**: Customize queries (e.g., sort by liquidity or volume) to refine your analysis.

### 📝 Input Parameters

| Parameter     | Type    | Required | Description                                            |
|---------------|---------|----------|--------------------------------------------------------|
| `chainName`   | string  | Yes      | Specify the blockchain network (e.g. `ethereum`)       |
| `fromPage`    | number  | No       | Starting page (default: `1`)                           |
| `toPage`      | number  | No       | Ending page (default: `1`)                             |
| `filterArgs`  | array   | No       | Add filters to refine results (e.g. sorting criteria)  |

To obtain filterArgs:

1. Visit dexscreener.com
2. Apply your desired filters and sorting options on the website
3. Copy the part of the URL after the "?" character
4. Paste it into the filterArgs array

Example: If the URL after filtering is "dexscreener.com/solana?rankBy=trendingScoreH24\&order=desc", then use:
`"filterArgs": ["rankBy=trendingScoreH24&order=desc"]`

#### Example Input

```json
{
  "chainName": "solana",
  "fromPage": 1,
  "toPage": 2,
  "filterArgs": [
    "?rankBy=trendingScoreH24&order=desc",
  ],
}
```

### ⚠️ Important Notes on Data Fields

- `address`: This is the **token address**, extracted from the token's image URL. If the image is not available on DexScreener, this field will be `null`.
- `lowerPoolAddress`: This is the **pool address** in lowercase, derived from the `pairDetailUrl`. DexScreener does not provide this directly. To get more pool information, you can use the `pairDetailUrl` with another scraper to fetch additional details.

### 📈 Example Output Structure

```json
{
  "tokenName": "airfryer coin",
  "tokenSymbol": "FRYER",
  "priceUsd": 0.0001097,
  "age": 2.2,
  "transactionCount": 115,
  "volumeUsd": 1000.0,
  "makerCount": 61,
  "priceChange5m": -0.0036,
  "priceChange1h": -0.0036,
  "priceChange6h": -0.0036,
  "priceChange24h": -0.0036,
  "liquidityUsd": 3300.0,
  "marketCapUsd": 109707.0,
  "boost": 1100,
  "pairDetailUrl": "https://dexscreener.com/solana/29jupdw7nqgzeqx9m61jjkgagtg2w283aqyxtcrw6ssu",
  "address": "4qTJV18HH5YUz9KSAdGEnVQuxPkR9c4gDwV7TaMxbonk",
  "lowerPoolAddress": "29jupdw7nqgzeqx9m61jjkgagtg2w283aqyxtcrw6ssu",
  "tokenImageUrl": "https://dd.dexscreener.com/ds-data/tokens/solana/4qTJV18HH5YUz9KSAdGEnVQuxPkR9c4gDwV7TaMxbonk.png?key=176c85"
}
```

### 🔍 TypeScript Type

```typescript
interface TokenData {
  tokenName: string;
  address?: string;
  tokenSymbol?: string;
  priceUsd?: number;
  age?: number;
  transactionCount?: number;
  volumeUsd?: number;
  makerCount?: number;
  priceChange5m?: number;
  priceChange1h?: number;
  priceChange6h?: number;
  priceChange24h?: number;
  liquidityUsd?: number;
  marketCapUsd?: number;
  boost?: number;
  pairDetailUrl?: string;
  lowerPoolAddress?: string;
  tokenImageUrl?: string;
}
```

### 🐍 Pydantic Model

```python
from pydantic import BaseModel
from typing import Optional

class TokenData(BaseModel):
    tokenName: str
    tokenSymbol: Optional[str]
    priceUsd: Optional[float]
    age: Optional[int]
    transactionCount: Optional[int]
    volumeUsd: Optional[float]
    makerCount: Optional[int]
    priceChange5m: Optional[float]
    priceChange1h: Optional[float]
    priceChange6h: Optional[float]
    priceChange24h: Optional[float]
    liquidityUsd: Optional[float]
    marketCapUsd: Optional[float]
    boost: Optional[int]
    pairDetailUrl: Optional[str]
    address: Optional[str]
    lowerPoolAddress: Optional[str]
    tokenImageUrl: Optional[str]

```

### 🚀 Get Started

Install, configure, and run the DexScreener Tokens Scraper today to stay on top of the crypto market. With granular control over output and the ability to zero in on emerging opportunities, this tool is your gateway to smarter, data-driven decision-making in the fast-paced world of digital assets.

**Don’t miss a your scrape now and gain the actionable insights you need to thrive in the crypto market.**

# Changelog

This Actor's version history is a separate document: https://apify.com/crypto-scraper/dexscreener-api/changelog.md

# Actor input Schema

## `chainName` (type: `string`):

Blockchain network to fetch data from.

## `time` (type: `string`):

The timeframe for the pairs.

## `filterArgs` (type: `array`):

Filter arguments to customize your search on DexScreener. Leave empty to scrape the default main page. To use filters, copy the query parameters (everything after '?' in the URL). Example: From 'https://dexscreener.com/solana/?rankBy=trendingScoreH24\&order=desc' you're filter arg is '?rankBy=trendingScoreH24\&order=desc'

## `fromPage` (type: `integer`):

Starting page number to scrape.

## `toPage` (type: `integer`):

Ending page number to scrape. (inclusive)

## Actor input object example

```json
{
  "chainName": "solana",
  "time": "24h",
  "filterArgs": [
    "?rankBy=priceChangeH24&order=desc&minLiq=25000&min24HTxns=50&min24HVol=10000"
  ],
  "fromPage": 1,
  "toPage": 1
}
```

# 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 = {
    "chainName": "solana",
    "filterArgs": [
        "?rankBy=priceChangeH24&order=desc&minLiq=25000&min24HTxns=50&min24HVol=10000"
    ],
    "fromPage": 1,
    "toPage": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("crypto-scraper/dexscreener-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 = {
    "chainName": "solana",
    "filterArgs": ["?rankBy=priceChangeH24&order=desc&minLiq=25000&min24HTxns=50&min24HVol=10000"],
    "fromPage": 1,
    "toPage": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("crypto-scraper/dexscreener-api").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 '{
  "chainName": "solana",
  "filterArgs": [
    "?rankBy=priceChangeH24&order=desc&minLiq=25000&min24HTxns=50&min24HVol=10000"
  ],
  "fromPage": 1,
  "toPage": 1
}' |
apify call crypto-scraper/dexscreener-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,crypto-scraper/dexscreener-api"
        }
    }
}
```

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/OveuSZm8gsoccnRQJ/builds/L6Dj3MpfcIX9aZmid/openapi.json
