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

# Search Queries

> To search for coins, categories and markets listed on CoinGecko

export const CacheInfo = ({publicRate, paidRate, rate}) => {
  const fmt = v => v === 0 ? 'Real-time (Cacheless)' : `Every ${v}`;
  if (rate !== undefined) {
    return <Callout icon="clock-rotate-left" color="#2196F3" iconType="regular">
        <strong>Cache / Update Frequency:</strong><br />{fmt(rate)}
      </Callout>;
  }
  if (publicRate !== undefined && paidRate !== undefined) {
    return <Callout icon="clock-rotate-left" color="#2196F3" iconType="regular">
        <strong>Cache / Update Frequency:</strong><ul><li>{fmt(paidRate)} (Paid API)</li><li>{fmt(publicRate)} (Demo / Keyless API)</li></ul>
      </Callout>;
  }
  return null;
};

<Note>
  Results are sorted by market cap in descending order.
</Note>

<CacheInfo rate="15 minutes" />

#### SDK Examples

<CodeGroup>
  ```typescript TypeScript theme={null}
  const response = await client.search.get({
    query: 'bitcoin',
  });

  console.log(JSON.stringify(response, null, 2));
  ```

  ```python Python theme={null}
  response = client.search.get(
    query="bitcoin",
  )

  print(response.model_dump_json(indent=2))
  ```
</CodeGroup>


## OpenAPI

````yaml openapi-specs/demo-api.json get /search
openapi: 3.0.0
info:
  title: CoinGecko Demo API
  version: 3.0.0
servers:
  - url: https://api.coingecko.com/api/v3
security:
  - headerAuth: []
  - queryAuth: []
paths:
  /search:
    get:
      summary: Search Queries
      description: To search for coins, categories and markets listed on CoinGecko
      operationId: search-data
      parameters:
        - name: query
          in: query
          required: true
          description: Search query
          schema:
            type: string
      responses:
        '200':
          description: Search results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Search'
              example:
                coins:
                  - id: ethereum
                    name: Ethereum
                    api_symbol: ethereum
                    symbol: ETH
                    market_cap_rank: 2
                    thumb: >-
                      https://coin-images.coingecko.com/coins/images/279/thumb/ethereum.png
                    large: >-
                      https://coin-images.coingecko.com/coins/images/279/large/ethereum.png
                exchanges:
                  - id: uniswap_v3
                    name: Uniswap V3 (Ethereum)
                    market_type: spot
                    thumb: >-
                      https://coin-images.coingecko.com/markets/images/665/thumb/uniswap-v3.png
                    large: >-
                      https://coin-images.coingecko.com/markets/images/665/large/uniswap-v3.png
                icos: []
                categories:
                  - id: ethereum-pos-iou
                    name: Ethereum PoS IOU
                nfts:
                  - id: ens-ethereum-name-service
                    name: 'ENS: Ethereum Name Service'
                    symbol: ENS
                    thumb: >-
                      https://coin-images.coingecko.com/nft_contracts/images/373/thumb/ens-ethereum-name-service.png
components:
  schemas:
    Search:
      type: object
      required:
        - coins
        - exchanges
        - icos
        - categories
        - nfts
      properties:
        coins:
          type: array
          items:
            type: object
            required:
              - id
              - name
              - api_symbol
              - symbol
              - market_cap_rank
              - thumb
              - large
            properties:
              id:
                type: string
                description: Coin ID
              name:
                type: string
                description: Coin name
              api_symbol:
                type: string
                description: Coin API symbol
              symbol:
                type: string
                description: Coin symbol
              market_cap_rank:
                type: integer
                nullable: true
                description: Coin market cap rank
              thumb:
                type: string
                description: Coin thumb image URL
              large:
                type: string
                description: Coin large image URL
        exchanges:
          type: array
          items:
            type: object
            required:
              - id
              - name
              - market_type
              - thumb
              - large
            properties:
              id:
                type: string
                description: Exchange ID
              name:
                type: string
                description: Exchange name
              market_type:
                type: string
                description: Exchange market type
              thumb:
                type: string
                description: Exchange thumb image URL
              large:
                type: string
                description: Exchange large image URL
        icos:
          type: array
          items:
            type: object
            x-stainless-empty-object: true
        categories:
          type: array
          items:
            type: object
            required:
              - id
              - name
            properties:
              id:
                type: string
                description: Category ID
              name:
                type: string
                description: Category name
        nfts:
          type: array
          items:
            type: object
            required:
              - id
              - name
              - symbol
              - thumb
            properties:
              id:
                type: string
                description: NFT collection ID
              name:
                type: string
                description: NFT collection name
              symbol:
                type: string
                description: NFT collection symbol
              thumb:
                type: string
                description: NFT collection thumb image URL
  securitySchemes:
    headerAuth:
      type: apiKey
      in: header
      name: x-cg-demo-api-key
      description: >-
        Learn how to [set up your API
        key](https://docs.coingecko.com/docs/setting-up-your-api-key)
    queryAuth:
      type: apiKey
      in: query
      name: x_cg_demo_api_key
      description: >-
        Learn how to [set up your API
        key](https://docs.coingecko.com/docs/setting-up-your-api-key)

````