> For the complete documentation index, see [llms.txt](https://dexhunter.gitbook.io/dexhunter-partners/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dexhunter.gitbook.io/dexhunter-partners/data/token-search.md).

# Token Search

Search for tokens by name, ticker, or policy ID.

{% hint style="warning" %}
**Required:** Include `X-Partner-Id` header with your API key on all requests.

**Base URL:** `https://api-us.dexhunterv3.app`
{% endhint %}

***

## Search Tokens

Find tokens matching a query.

**Endpoint**

`GET /swap/tokens`

**Query Parameters**

| Param      | Type    | Required | Description        |
| ---------- | ------- | -------- | ------------------ |
| `query`    | string  | ✓        | Search term        |
| `verified` | boolean |          | Filter by verified |

**Response**

| Field          | Type    | Description       |
| -------------- | ------- | ----------------- |
| `token_id`     | string  | Full token ID     |
| `token_policy` | string  | Policy ID         |
| `token_ascii`  | string  | Asset name        |
| `ticker`       | string  | Token ticker      |
| `is_verified`  | boolean | Verification flag |

***

## Search Types

| Input Length | Interpretation     |
| ------------ | ------------------ |
| 1-55 chars   | Ticker/name search |
| 56 chars     | Policy ID          |
| >56 chars    | Full token ID      |

{% hint style="info" %}
Search is case-insensitive. ADA is represented by empty string `""`.
{% endhint %}

***

## Examples

{% tabs %}
{% tab title="Search by ticker" %}

```javascript
const API_KEY = 'YOUR_API_KEY';
const BASE_URL = 'https://api-us.dexhunterv3.app';
const headers = { 'X-Partner-Id': API_KEY };

const { data: tokens } = await axios.get(`${BASE_URL}/swap/tokens`, {
  params: { query: 'NIGHT' },
  headers,
});
```

{% endtab %}

{% tab title="Search by policy" %}

```javascript
const { data: tokens } = await axios.get(`${BASE_URL}/swap/tokens`, {
  params: { query: '0691b2fecca1ac4f53cb6dfb00b7013e561d1f34403b957cbb5af1fa' },
  headers,
});
```

{% endtab %}

{% tab title="Verified only" %}

```javascript
const { data: tokens } = await axios.get(`${BASE_URL}/swap/tokens`, {
  params: { query: 'MIN', verified: true },
  headers,
});
```

{% endtab %}
{% endtabs %}
