> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dexutils.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Search API: Find Tokens, Pools, and DEXes Instantly

> Use GET /search to find tokens, liquidity pools, and DEX protocols by name, ticker, or contract address across all DexUtils-indexed networks at once.

The Search API lets you query the entire DexUtils index by token name, ticker symbol, or contract address and receive ranked results spanning tokens, liquidity pools, and DEX protocols across every supported network. It is designed for search-as-you-type UIs, token pickers, and lookup utilities where you need fast, cross-chain results without knowing the exact network or address up front.

## Search

```http theme={null}
GET /search
```

Queries DexUtils for tokens, pools, and DEXes matching the provided search term. Results are ranked by relevance and, where applicable, by liquidity depth.

### Query Parameters

<ParamField query="q" type="string" required>
  The search query. You can pass a token name (e.g. `Pepe`), ticker symbol (e.g. `PEPE`), or a full contract address for an exact match. Partial symbols and names are supported with a minimum of two characters.
</ParamField>

<ParamField query="type" type="string" default="all">
  Restrict results to a specific entity type. Accepted values:

  * `token` — ERC-20 / SPL tokens and equivalent assets
  * `pool` — liquidity pool pairs
  * `dex` — DEX protocol entries
  * `all` — return all matching entity types
</ParamField>

<ParamField query="network" type="string">
  Narrow results to a single network (e.g. `ethereum`, `solana`). Omit this parameter to search across all supported networks. Retrieve valid network IDs from `GET /networks`.
</ParamField>

<ParamField query="limit" type="integer" default="10">
  Maximum number of results to return. Ceiling is `50`. Increase this value when building autocomplete interfaces that benefit from a wider candidate set.
</ParamField>

### Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  # Replace the token below with your actual API key from the DexUtils dashboard
  curl "https://api.dexutils.io/v1/search?q=PEPE&type=token&limit=5" \
    -H "Authorization: Bearer dxu_sk_live_4f8a2bcd9e1f3a7056c8d2e94b0f1c63"
  ```

  ```python Python theme={null}
  import requests

  # Replace with your actual API key from the DexUtils dashboard
  url = "https://api.dexutils.io/v1/search"
  headers = {"Authorization": "Bearer dxu_sk_live_4f8a2bcd9e1f3a7056c8d2e94b0f1c63"}
  params = {
      "q": "PEPE",
      "type": "token",
      "limit": 5,
  }

  response = requests.get(url, headers=headers, params=params)
  data = response.json()

  for result in data["results"]:
      print(f"[{result['network']}] {result['symbol']} — ${result['price_usd']}")

  print(f"Total results: {data['total']}")
  ```

  ```javascript JavaScript theme={null}
  // Replace with your actual API key from the DexUtils dashboard
  const params = new URLSearchParams({
    q: "PEPE",
    type: "token",
    limit: 5,
  });

  const response = await fetch(
    `https://api.dexutils.io/v1/search?${params}`,
    {
      headers: {
        Authorization: "Bearer dxu_sk_live_4f8a2bcd9e1f3a7056c8d2e94b0f1c63",
      },
    }
  );

  const data = await response.json();

  data.results.forEach((result) => {
    console.log(`[${result.network}] ${result.symbol} — $${result.price_usd}`);
  });

  console.log(`Total results: ${data.total}`);
  ```
</CodeGroup>

### Response Fields

<ResponseField name="results" type="array" required>
  Ranked array of matching entities. Each object includes a `type` discriminator field so you can handle tokens, pools, and DEXes in a single response.

  <Expandable title="Result object">
    <ResponseField name="type" type="string" required>
      Entity type of this result: `token`, `pool`, or `dex`.
    </ResponseField>

    <ResponseField name="network" type="string" required>
      Network ID where this entity exists (e.g. `ethereum`, `solana`).
    </ResponseField>

    <ResponseField name="address" type="string" required>
      Contract address of the token, pool, or DEX factory. For `dex` results this is the factory contract address.
    </ResponseField>

    <ResponseField name="name" type="string" required>
      Full name of the entity (e.g. `Pepe`, `USDC / WETH 0.05%`, `Uniswap V3`).
    </ResponseField>

    <ResponseField name="symbol" type="string">
      Ticker symbol. Present for `token` results; omitted for `pool` and `dex` results.
    </ResponseField>

    <ResponseField name="price_usd" type="string">
      Current price in USD. Present for `token` results; omitted for `pool` and `dex` results.
    </ResponseField>

    <ResponseField name="liquidity_usd" type="string" required>
      Total USD liquidity associated with this entity. For tokens, this is the aggregate across all pools; for pools, it is the pool's TVL.
    </ResponseField>

    <ResponseField name="dext_score" type="integer">
      DexUtils trust score from 0 to 100. Reflects token verification, liquidity lock status, and contract audit data. Higher scores indicate lower assessed risk. Present for `token` and `pool` results; omitted for `dex` results.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="total" type="integer" required>
  Total number of results matching your query, before the `limit` is applied. Use this to show users how many matches exist even when you are displaying only the top results.
</ResponseField>

### Example Response

```json Example Response theme={null}
{
  "results": [
    {
      "type": "token",
      "network": "ethereum",
      "address": "0x6982508145454Ce325dDbE47a25d4ec3d2311933",
      "name": "Pepe",
      "symbol": "PEPE",
      "price_usd": "0.00000847",
      "liquidity_usd": "14823421.00",
      "dext_score": 72
    }
  ],
  "total": 1
}
```

<Tip>
  Pass a full contract address as the `q` value to get an exact match rather than ranked fuzzy results. This is the most reliable way to look up a specific token when you already have its address — for example, when a user pastes an address into your search input.
</Tip>

<Note>
  Newly created tokens and pools may not appear in search results immediately. DexUtils indexes on-chain events in near real time, but search indexing can lag by up to five minutes after a contract first receives liquidity. Use the Tokens or Pools endpoints with the exact address to look up a contract that was deployed very recently.
</Note>
