Skip to main content

Overview

When building crypto applications, you often need to identify which blockchain a token contract belongs to. Traditional approaches require expensive RPC calls to multiple chains, which is slow and resource-intensive. Mobula’s Universal Search (/api/2/fast-search) automatically detects the chain for any contract address in under 30ms - no RPC calls, no chain guessing.

Quick Start

Simply pass the contract address to the search endpoint:
The response includes the chainId field that tells you exactly which chain the token is on:

How It Works

When you provide a contract address to the search endpoint:
  1. Cross-chain lookup: Mobula searches across all supported blockchains simultaneously
  2. Instant matching: Uses indexed data instead of live RPC calls
  3. Returns chain info: The response includes chainId identifying the exact blockchain
This is significantly faster than the traditional approach of making sequential RPC calls to each chain.

Code Examples

TypeScript / JavaScript

Python

Get Full Token Data

Once you have the chain ID, you can fetch complete token details:
The search endpoint already returns comprehensive token data including price, volume, liquidity, and trading metrics. In most cases, you won’t need to make a second API call.

Multi-Chain Tokens

Some tokens exist on multiple chains (like USDT or USDC). The search returns all instances sorted by trading activity:

Chain ID Format

Mobula uses standardized chain identifiers:
ChainChain ID
Ethereumevm:1
BSCevm:56
Baseevm:8453
Arbitrumevm:42161
Polygonevm:137
Optimismevm:10
Solanasolana:solana
Suisui:sui
See the Blockchains endpoint for the complete list of supported chains and their identifiers.

Performance Comparison

MethodLatencyRPC Calls
Sequential RPC checks (10 chains)2-5 seconds10+
Parallel RPC checks (10 chains)500ms-1s10+
Mobula Universal Search<30ms0

Best Practices

1. Handle Multiple Results

When a token exists on multiple chains, the API returns all matches. Always check if your expected chain is in the results:

2. Cache Results

Chain IDs for contracts don’t change. Cache the results to avoid repeated lookups:

3. Filter by Specific Chains

If you only support certain chains, filter the results:

Response Fields

Each token in the response includes:
FieldTypeDescription
addressstringToken contract address
chainIdstringBlockchain identifier
symbolstringToken symbol
namestringToken name
priceUSDnumberCurrent price in USD
volume24hUSDnumber24h trading volume
liquidityUSDnumberTotal liquidity
marketCapUSDnumberMarket capitalization
The full response includes 100+ fields. See the Universal Search API Reference for complete documentation.

Use Cases

  • Trading bots: Quickly identify token chains for cross-chain arbitrage
  • Portfolio trackers: Auto-detect chains for user-provided addresses
  • Token analytics: Build chain-agnostic token dashboards
  • Wallet integrations: Display correct chain info without RPC overhead

Next Steps

Support

Need help? Join our community: