# Search tokens

**Overview**

The Search Tokens API allows users to retrieve information about deployed tokens and bonding curve tokens based on various search criteria. \
It supports fetching specific tokens, searching by keywords, or retrieving the top entries when no criteria are provided.

### Query Parameters

* `keyword` (optional): A string to search for in the token's name, symbol, or description.
* `token_contract` (optional): A specific token contract to fetch detailed information.

### Response

The API returns a JSON object containing the following fields:

#### Success Response

* **Status Code**: `200 OK`
* **Response Body**:

  ```json
  {
    "ads_tokens": [ /* Array of ads tokens */ ],
    "bonding_curve": [ /* Array of bonding curve tokens */ ],
    "normal": [ /* Array of normal deployed tokens */ ]
  }
  ```

#### Error Response

* **Status Code**: `405 Method Not Allowed`
* **Response Body**:

  ```json
  {
    "error": "Error message"
  }
  ```

### Usage Scenarios

#### 1. Fetching Specific Token

To fetch a specific token using its contract:

**GET /api/searchTokens?token\_contract=\<TOKEN\_CONTRACT>**

#### 2. Searching by Keyword

To search for tokens using a keyword:

**GET /api/searchTokens?keyword=\<SEARCH\_KEYWORD>**
