# DexScreener Token API - Live DEX Price, Liquidity & Volume (`stas_k/dexscreener-token-api`) Actor

A token symbol is not an identity: PEPE lives on a dozen chains, and one address can be a different coin on another chain. This actor prices a token by contract address, DexScreener link or exact symbol, on the chain you name, and refuses to guess when one address trades on several chains.

- **URL**: https://apify.com/stas_k/dexscreener-token-api.md
- **Developed by:** [Stas K](https://apify.com/stas_k) (community)
- **Categories:** Developer tools, Automation, E-commerce
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 tokens

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

## DexScreener Token API - live DEX price, liquidity and volume

A token symbol is not an identity, and the first search hit is usually a different coin. This
actor reads the live DexScreener data of a token by **contract address**, **DexScreener link** or
**exact symbol**, across every DEX the source indexes, and puts the whole picture in one row.

### What you get

One paid row per token:

- **price** - `priceUsd` and `priceNative` of the deepest pair the source knows;
- **market** - `liquidityUsd`, `fdv`, `marketCap`, `volume24h`, `txns24Buys`, `txns24Sells`;
- **movement** - `priceChange5m`, `priceChange1h`, `priceChange6h`, `priceChange24h`;
- **identity** - `tokenAddress`, `tokenSymbol`, `tokenName`, `chain`, `chainsInSource` (every chain
  the answer carried this contract on), `pairCreatedAt`, `socials`, `websites`;
- **every pair** - `pairs` lists the deepest pairs first (chain, DEX, pair address, link, price,
  liquidity, volume), and `pairsInSource` says how many pairs **the answer the run read** carried.
  A contract is read from the token endpoint, a symbol from the search answer, and the search
  answer can carry fewer pairs than the same token read by address (PEPE: 3 pairs by symbol
  against 30 by contract). `pairsInSource` describes that answer, not the whole market: pass the
  contract address when you need the full pair list.

### How a token is resolved

| Input | What happens |
| --- | --- |
| `ethereum:0xdAC17F958D2ee523a2206206994597C13D831ec7` | one chain, read on that chain only |
| `0x6982508145454ce325ddbe47a25d4ec3d2311933` | read as an EVM contract; if the source carries it on several chains the line comes back **free** as `AMBIGUOUS_CHAIN` |
| `So11111111111111111111111111111111111111112` | read as a base58 contract (Solana style) |
| `solana:So11111111111111111111111111111111111111112` | same, restricted to one chain |
| `https://dexscreener.com/ethereum/0x1195...` | the contract and the chain are taken from the link, host checked; a **pair** page and a **token** page both work |
| `PEPE` | exact symbol **or** exact name only |

#### One address is not one token

PulseChain copied the Ethereum state, so **USDT, PEPE and WETH trade under the same hex address on
ethereum and on that fork**, at prices that differ by orders of magnitude: USDT is about 1.00 on
ethereum and about 0.00047 as a PulseChain fork. The source's cross-chain answer is cut at 30
pairs and can drop a whole chain (for USDT it carried 30 pairs on pulsechain and **not one** on
ethereum), so "the deepest pair of the answer" is not a price, it is a coin flip.

This actor treats the chain as part of the identity:

- a **link** or a `chain:address` prefix is binding: the contract is read on that chain and
  nowhere else, and the row's `chain` is the chain you asked for;
- a **bare address** the source carries on several chains comes back as a free
  `AMBIGUOUS_CHAIN` row that lists those chains and shows how to ask for one;
- a chain that does **not** carry the contract is a free `NOT_ON_CHAIN` row naming the chains
  that do. It is never `NOT_FOUND`: the token exists, and "no such token" would be a false verdict;
- `chainsInSource` says on which chains this run really found the contract.

Inside one chain, the row is the **deepest pair by liquidity** of that chain. When the token sits
on the **quote side** of that pair (USDT is the quote of almost every Ethereum pool), `priceUsd`
of the pair is the other coin's price, so the token's own price is `priceUsd / priceNative`;
in that case `priceNative` is left `null`, because the pair's value belongs to the base coin.

A symbol search sells only an exact match: `PEPE` is sold, while `PEPEE`, `PEPE3` and `pepe 3.0`
come back as a free `NOT_FOUND` that lists up to five symbols the source did carry. Case, spaces
and separators are ignored, so a contract whose symbol is literally `pep ` is an exact match for
`pep` and is sold, and `pepe 2.0` is the same token as `PEPE2.0`: a name that merely looks like
the one you meant can still be a real, different token (nine contracts carry the name `smol
pepe `). When several
contracts share the exact name, the row is the one with the deepest liquidity and carries
`exactMatches` and a note; pass the contract address to pick another.

### Price and free rows

- A delivered token is **one paid event** named `token`.
- A token the source does not carry, a token without a USD price, an invalid line and a duplicate
  come back as **free status rows** with a reason and no price data. You are never charged for a
  lookup that found nothing.
- An address the source carries on several chains is a free `AMBIGUOUS_CHAIN` row, and a chain
  that does not carry the contract is a free `NOT_ON_CHAIN` row: neither is sold, and neither is
  called `NOT_FOUND`.
- A duplicate (the same contract **on the same chain** sent twice, or a link and its address) is
  delivered once; the second line is a free `DUPLICATE` row. The same address on two chains is two
  products and two events.

### Limits

- `maxTokens` - lines read per run, default and maximum 200; a line past the cap is a free
  `NOT_CHECKED_CAP` row that names the cap.
- `maxPairsPerToken` - pairs kept in each row, default 25, maximum 100.
- `chains` - optional filter, and binding: a contract with no pair on the requested chains is a
  free `NOT_ON_CHAIN` row that names the chains which do carry it. One chain in the filter is the
  same as a `chain:address` prefix.
- A symbol costs **one** search. A bare address costs **two**: the cross-chain read and, for an
  EVM address the cross-chain answer does not place on ethereum, one more read of ethereum (that
  is how USDT was caught). A **link costs two** - the pair and its chain - and **four** when the
  chain it names does not carry the contract: the pair, the chain, the cross-chain read and the
  ethereum probe. A bare address with a chain filter that the named chain does not carry costs
  three. The source allows about 200 contract lookups in a row from one address (measured), so
  **200 symbols** stay inside its public rate limit, while 200 links or 200 addresses are up to
  400 reads and the run stops them on `timeoutSecs`, not on the source.
  If the source answers HTTP 429 the line is a free `NOT_CHECKED_ERROR` row and the run keeps its
  money: nothing is charged for a rate limit.

### What this actor does not do

- It does not read every DEX in existence: it reads what DexScreener indexes. A token that trades
  only on an exchange the source does not track comes back as `NOT_FOUND`, not as a price of 0.
- It does not invent numbers. A field the source does not publish (for example `volume24h` on a
  thin pair, or `marketCap` when the source omits it) is **null**, never 0.
- It does not verify that a token is safe, audited or a good investment. Liquidity and volume are
  facts from the source; they are not a promise about the token.

### Summary

The run summary carries counters (`delivered`, `chargedEvents`, `tokensNotFound`,
`tokensWithoutPrice`, `tokensInvalid`, `tokensDuplicate`, `counterMismatch`, `stopReason` and so
on). `RUN_SUMMARY` lives in the default store of the run, and a copy under `RUN_SUMMARY-<runId>`
is kept in the named store `dexscreener-summary` so two runs do not overwrite each other.

### Source

DexScreener public API, no key, no account, no browser. Data is quoted as the source returns it.

# Actor input Schema

## `tokens` (type: `array`):

Tokens to price: a contract address such as So11111111111111111111111111111111111111112 or 0x6982508145454Ce325dDbE47a25d4ec3d2311933, an optional chain prefix such as solana:So11111111111111111111111111111111111111112, a DexScreener link, or an exact symbol such as PEPE. Only an exact symbol or name is sold: a symbol that is merely close is a different token and comes back free with the symbols the source did carry. The last line of the default list does not exist, so it comes back free.

## `chains` (type: `array`):

Optional chain filter, for example solana or ethereum. Empty means every chain the source indexes. The filter is binding: a contract with no pair on the requested chains comes back as a free NOT_ON_CHAIN row that names the chains which do carry it, and an address the source carries on several chains comes back as a free AMBIGUOUS_CHAIN row listing them. Nothing is charged for either.

## `maxPairsPerToken` (type: `integer`):

How many pairs to keep in the pairs list of each row. Default 25, maximum 100. How many pairs the answer the run read carried is reported in pairsInSource; a symbol search can carry fewer pairs than the same token read by contract address.

## `maxTokens` (type: `integer`):

How many lines of the list this run reads. Default and maximum 200; a line past the cap comes back as a free NOT_CHECKED_CAP row that names the cap.

## Actor input object example

```json
{
  "tokens": [
    "So11111111111111111111111111111111111111112",
    "PEPE",
    "https://dexscreener.com/ethereum/0xdAC17F958D2ee523a2206206994597C13D831ec7",
    "not-a-real-token-xyz"
  ],
  "maxPairsPerToken": 25,
  "maxTokens": 200
}
```

# Actor output Schema

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

One row per token. A paid row carries tokenAddress, tokenSymbol, tokenName, priceUsd, priceNative, chain (the chain the row is priced on), chainsInSource (every chain the answer carried this contract on), dex, pairAddress, pairUrl, quoteSymbol, liquidityUsd, fdv, marketCap, volume24h, priceChange5m, priceChange1h, priceChange6h, priceChange24h, txns24Buys, txns24Sells, pairCreatedAt, socials, websites, imageUrl, pairsInSource, pairsReturned, pairs (the deepest pairs first, each with chain, dex, pairAddress, url, priceUsd, liquidityUsd, volume24h) and fetchedAt. A symbol search adds matchedBy (exact symbol or exact name); when several contracts carry the same name, it also adds exactMatches and a note saying the row is the deepest-liquidity one, so pass the contract address to pick another. Every row carries billable (true on a paid row, false on a free status row). A status row carries status (OK, DUPLICATE, NOT_FOUND, NO_PRICE, AMBIGUOUS_CHAIN, NOT_ON_CHAIN, INVALID_INPUT, NOT_CHECKED_CAP, NOT_CHECKED_ERROR, NOT_CHECKED_BILLING, NOT_CHECKED_TIME) and note with the plain reason, plus actorInput and actorIndex, and never carries price data. A token the source does not carry is never a paid row: it comes back as a free NOT_FOUND, NO_PRICE or NOT_CHECKED\_\* row with a reason and no price data. An address the source carries on several chains is a free AMBIGUOUS_CHAIN row listing them (PulseChain copies Ethereum addresses, so the same hex is a different token there), and a chain that does not carry the contract is a free NOT_ON_CHAIN row naming the chains that do: neither is ever called NOT_FOUND, because the token exists. Status rows are written in batches, so sort by actorIndex to get the input order back. A number the source does not publish is null, never 0.

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

Counters of the run: requested, attempted, delivered, chargedEvents, deliveredUncharged, deliveredUnverified, chargeUncertain, writeErrors, cappedNotCharged, tokensNotFound, tokensWithoutPrice, tokensInvalid, tokensDuplicate, tokensAmbiguous, tokensNotOnChain, cutByDeadline, cutByStop, cutByLimit, byStatus, counterMismatch, stopReason, datasetNote, firstFailure, billingActive, priceNote, eventName, chains, maxPairsPerToken, maxTokens, source, startedAt, finishedAt and runId. The bare RUN_SUMMARY lives in the default store of the run; a copy under RUN_SUMMARY-<runId> is kept in the named store dexscreener-summary, so two runs do not overwrite each other.

# 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 = {
    "tokens": [
        "So11111111111111111111111111111111111111112",
        "PEPE",
        "https://dexscreener.com/ethereum/0xdAC17F958D2ee523a2206206994597C13D831ec7",
        "not-a-real-token-xyz"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("stas_k/dexscreener-token-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 = { "tokens": [
        "So11111111111111111111111111111111111111112",
        "PEPE",
        "https://dexscreener.com/ethereum/0xdAC17F958D2ee523a2206206994597C13D831ec7",
        "not-a-real-token-xyz",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("stas_k/dexscreener-token-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 '{
  "tokens": [
    "So11111111111111111111111111111111111111112",
    "PEPE",
    "https://dexscreener.com/ethereum/0xdAC17F958D2ee523a2206206994597C13D831ec7",
    "not-a-real-token-xyz"
  ]
}' |
apify call stas_k/dexscreener-token-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,stas_k/dexscreener-token-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/HNXc1LCRi8jbK5Mq8/builds/SLtX1EgK2CdSSsGZs/openapi.json
