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

# Fetch tokens by keyword

> Search tokens with a query string.

export const SupportedChainsList = props => {
  const [data, setData] = useState(null);
  const [isLoading, setIsLoading] = useState(true);
  useEffect(() => {
    const fetchData = async () => {
      try {
        const response = await fetch("https://api.allium.so/api/v1/supported-chains/realtime-apis", {
          method: "GET"
        });
        if (!response.ok) {
          throw new Error(`HTTP error! status: ${response.status}`);
        }
        const responseData = await response.json();
        const filteredData = responseData.filter(entry => {
          const product = entry.endpoints[props.product_name];
          return product !== null;
        });
        setData(filteredData);
        setIsLoading(false);
      } catch (error) {
        setIsLoading(false);
      }
    };
    fetchData();
  }, []);
  if (isLoading) {
    return <div>Loading chain information...</div>;
  }
  if (!data) {
    return <div>No data available</div>;
  }
  const isCustomSQL = props.product_name === "custom_sql";
  return <div>
            {data.length > 0 && <table className="w-full">
                    <thead>
                        <tr>
                            <th>Chain</th>
                            <th>Chain ID</th>
                            <th>Status</th>
                            {isCustomSQL && <th>Tables</th>}
                        </tr>
                    </thead>
                    <tbody>
                        {data.map(chain => {
    const endpoint = chain.endpoints[props.product_name];
    return <tr key={chain.id}>
                                    <td style={{
      padding: '12px'
    }}>{chain.label}</td>
                                    <td style={{
      padding: '12px'
    }}><code>{chain.id}</code></td>
                                    <td style={{
      padding: '12px'
    }}>{endpoint ? endpoint.availability === "beta" ? "🌱 Beta" : "✅ Supported" : "❌ Not Supported"}</td>
                                    {isCustomSQL && <td style={{
      padding: '12px'
    }}>
                                            {endpoint && endpoint.tables ? endpoint.tables.map(t => t.name).join(", ") : "-"}
                                        </td>}
                                </tr>;
  })}
                    </tbody>
                </table>}
        </div>;
};

This endpoint returns tokens that match a keyword.

## Supported Chains

<SupportedChainsList product_name="search_tokens" />

<Note>
  To get Stellar tokens, pass chain=stellar as a query parameter. Sort, granularity, order, and volume thresholds are currently not supported.
</Note>


## OpenAPI

````yaml /_openapi/tokens-api.json GET /api/v1/developer/tokens/search
openapi: 3.1.0
info:
  title: Allium API
  version: 0.1.0
servers:
  - url: https://api.allium.so
security: []
paths:
  /api/v1/developer/tokens/search:
    get:
      tags:
        - TOKENS
        - DEVELOPER
      summary: Search Tokens
      operationId: search_tokens_api_v1_developer_tokens_search_get
      parameters:
        - name: q
          in: query
          required: true
          schema:
            type: string
            description: >-
              The query string to search in name and symbol. Performs a
              case-insensitive substring search.
            title: Q
          description: >-
            The query string to search in name and symbol. Performs a
            case-insensitive substring search.
        - name: chain
          in: query
          required: false
          schema:
            description: >-
              The chain of the tokens. Do not pass anything to search across all
              tokens.
            title: Chain
            type: string
          description: >-
            The chain of the tokens. Do not pass anything to search across all
            tokens.
        - name: sort
          in: query
          required: false
          schema:
            enum:
              - volume
              - trade_count
              - fully_diluted_valuation
            type: string
            description: Sort by a certain field
            default: volume
            title: Sort
          description: Sort by a certain field
        - name: granularity
          in: query
          required: false
          schema:
            anyOf:
              - $ref: >-
                  #/components/schemas/api_server__app__routes__api__developer__tokens__tokens__Granularity
              - type: 'null'
            description: >-
              Granularity of the sorting field. Only used if sort is volume or
              trade_count.
            title: Granularity
          description: >-
            Granularity of the sorting field. Only used if sort is volume or
            trade_count.
        - name: order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            description: Sorting order
            default: desc
            title: Order
          description: Sorting order
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 0
            description: Maximum number of tokens to return.
            default: 200
            title: Limit
          description: Maximum number of tokens to return.
        - name: volume_usd_1d_threshold
          in: query
          required: false
          schema:
            description: >-
              Minimum 1d volume in USD. Only returns tokens with volume >= this
              value.
            title: Volume Usd 1D Threshold
            type: number
          description: >-
            Minimum 1d volume in USD. Only returns tokens with volume >= this
            value.
        - name: volume_usd_1h_threshold
          in: query
          required: false
          schema:
            description: >-
              Minimum 1h volume in USD. Only returns tokens with volume >= this
              value.
            title: Volume Usd 1H Threshold
            type: number
          description: >-
            Minimum 1h volume in USD. Only returns tokens with volume >= this
            value.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Token'
                title: Response Search Tokens Api V1 Developer Tokens Search Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyBearer: []
components:
  schemas:
    api_server__app__routes__api__developer__tokens__tokens__Granularity:
      type: string
      enum:
        - 1d
        - 1h
      title: Granularity
    Token:
      properties:
        object:
          type: string
          const: token
          title: Object
          default: token
        chain:
          type: string
          title: Chain
          description: Lowercase chain name
        address:
          type: string
          title: Address
          description: Token contract address
        type:
          anyOf:
            - type: string
              enum:
                - native
                - non_native
                - evm_erc20
                - evm_erc721
                - evm_erc1155
                - sol_spl
                - sui_token
                - near_nep141
                - near_nep245
                - stellar_classic
                - stellar_sac
                - stellar_wasm
            - type: 'null'
          title: Type
          description: >-
            Token standard type: evm_erc20/evm_erc721/evm_erc1155 (EVMs),
            sol_spl (Solana), sui_token (Sui), near_nep141/near_nep245 (Near),
            stellar_classic/stellar_sac/stellar_wasm (Stellar), or native (All)
        price:
          anyOf:
            - type: number
            - type: 'null'
          title: Price
          description: Current price (USD)
        decimals:
          anyOf:
            - type: integer
            - type: 'null'
          title: Decimals
          description: Token decimal places
        info:
          anyOf:
            - $ref: >-
                #/components/schemas/api_server__app__core__models__token__TokenInfo
            - type: 'null'
          description: Token name and symbol
        attributes:
          anyOf:
            - $ref: '#/components/schemas/TokenAttributes'
            - type: 'null'
          description: Token market attributes
      type: object
      required:
        - chain
        - address
      title: Token
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    api_server__app__core__models__token__TokenInfo:
      properties:
        name:
          type: string
          title: Name
          description: Token name
        symbol:
          type: string
          title: Symbol
          description: Token symbol
      type: object
      required:
        - name
        - symbol
      title: TokenInfo
    TokenAttributes:
      properties:
        total_liquidity_usd:
          anyOf:
            - $ref: '#/components/schemas/LiquidityResults'
            - type: 'null'
          description: >-
            Liquidity data: {'amount': number} when available, or {'details':
            'LIQUIDITY_TOO_HIGH'} when limit exceeded
        price_diff_1d:
          anyOf:
            - type: number
            - type: 'null'
          title: Price Diff 1D
          description: Price change (USD) over last 24h
        price_diff_pct_1d:
          anyOf:
            - type: number
            - type: 'null'
          title: Price Diff Pct 1D
          description: Price change (%) over last 24h
        price_diff_1h:
          anyOf:
            - type: number
            - type: 'null'
          title: Price Diff 1H
          description: Price change (USD) over last 1h
        price_diff_pct_1h:
          anyOf:
            - type: number
            - type: 'null'
          title: Price Diff Pct 1H
          description: Price change (%) over last 1h
        total_supply:
          anyOf:
            - type: number
            - type: 'null'
          title: Total Supply
          description: Total token supply
        fully_diluted_valuation_usd:
          anyOf:
            - type: number
            - type: 'null'
          title: Fully Diluted Valuation Usd
          description: Fully diluted valuation (USD)
        volume_1h:
          anyOf:
            - type: number
            - type: 'null'
          title: Volume 1H
          description: Trading volume over last 1h
        volume_1d:
          anyOf:
            - type: number
            - type: 'null'
          title: Volume 1D
          description: Trading volume over last 24h
        volume_usd_1h:
          anyOf:
            - type: number
            - type: 'null'
          title: Volume Usd 1H
          description: Trading volume (USD) over last 1h
        volume_usd_1d:
          anyOf:
            - type: number
            - type: 'null'
          title: Volume Usd 1D
          description: Trading volume (USD) over last 24h
        volume_24h:
          anyOf:
            - type: number
            - type: 'null'
          title: Volume 24H
          description: Trading volume over last 24h
        volume_usd_24h:
          anyOf:
            - type: number
            - type: 'null'
          title: Volume Usd 24H
          description: Trading volume (USD) over last 24h
        trade_count_1h:
          anyOf:
            - type: integer
            - type: 'null'
          title: Trade Count 1H
          description: Trade count over last 1h
        trade_count_1d:
          anyOf:
            - type: integer
            - type: 'null'
          title: Trade Count 1D
          description: Trade count over last 24h
        all_time_high:
          anyOf:
            - type: number
            - type: 'null'
          title: All Time High
          description: All-time high price (USD)
        all_time_low:
          anyOf:
            - type: number
            - type: 'null'
          title: All Time Low
          description: All-time low price (USD)
        image_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Image Url
          description: Token logo URL
        token_creation_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Token Creation Time
          description: Token creation timestamp (UTC)
        holders_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Holders Count
          description: Number of token holders
        stellar_fields:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Stellar Fields
          description: Stellar-specific metadata
      type: object
      title: TokenAttributes
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    LiquidityResults:
      properties:
        amount:
          anyOf:
            - type: number
            - type: 'null'
          title: Amount
          description: Liquidity amount (USD)
        details:
          anyOf:
            - type: string
            - type: 'null'
          title: Details
          description: Status when amount unavailable (e.g. LIQUIDITY_TOO_HIGH)
      type: object
      title: LiquidityResults
  securitySchemes:
    APIKeyBearer:
      type: apiKey
      in: header
      name: X-API-KEY

````