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

# Brand Lookup

> Identify the card brand from the BIN and get a brand logo URL.

The Brand Lookup endpoint identifies the card brand (Visa, Mastercard, American Express, etc.) from the card's BIN/IIN and returns a URL to the brand's logo image.

**Endpoint:** `GET /Tools/brand`

## When to Use This

Use Brand Lookup when you need to display the card brand logo in your payment form as the customer types their card number. After the customer enters the first 6 digits, you can call this endpoint to identify the brand and show the corresponding logo, giving the customer immediate visual feedback that their card is recognized.

This is lighter than the full [Metadata Lookup](/guides/rest-api/utilities/card-tools/metadata-lookup) since it only returns the brand name and logo URL.

## How It Works

Pass the first 6 to 11 digits of the card number as the `iin` query parameter. The endpoint returns the identified brand and a URL to the brand's logo.

| Parameter | Type           | Required | Description                                 |
| --------- | -------------- | -------- | ------------------------------------------- |
| `iin`     | string (query) | Yes      | The first 6 to 11 digits of the card number |

## Example: Show Brand Logo During Card Entry

Call the endpoint once the customer has entered at least 6 digits, then display the logo next to the card number field.

<CodeGroup>
  ```javascript Node.js theme={null}
  const cardInput = document.getElementById('card-number');

  cardInput.addEventListener('input', async (e) => {
    const digits = e.target.value.replace(/\D/g, '');

    if (digits.length >= 6) {
      const response = await fetch(
        `https://api.orchestrasolutions.com/Tools/brand?iin=${digits.substring(0, 8)}`,
        { headers: { 'X-Api-Key': 'YOUR_API_KEY' } }
      );

      if (response.ok) {
        const { brand, brandLogoUrl } = await response.json();
        document.getElementById('brand-logo').src = brandLogoUrl;
        document.getElementById('brand-logo').alt = brand;
      }
    }
  });
  ```

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

  def get_brand(card_digits, api_key):
      """Identify the card brand from the first 6-11 digits."""
      response = requests.get(
          'https://api.orchestrasolutions.com/Tools/brand',
          params={'iin': card_digits[:8]},
          headers={'X-Api-Key': api_key}
      )
      response.raise_for_status()
      data = response.json()
      return data['brand'], data['brandLogoUrl']

  brand, logo_url = get_brand('41111111', 'YOUR_API_KEY')
  print(f"Brand: {brand}")    # "VISA"
  print(f"Logo: {logo_url}")
  ```

  ```bash cURL theme={null}
  curl "https://api.orchestrasolutions.com/Tools/brand?iin=411111" \
    -H "X-Api-Key: YOUR_API_KEY"
  ```
</CodeGroup>

## Related

<CardGroup cols={2}>
  <Card title="Metadata Lookup" icon="magnifying-glass" href="/guides/rest-api/utilities/card-tools/metadata-lookup">
    Need more than just the brand? Get full card metadata.
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/tools/brand-lookup">
    Full endpoint specification and response schema
  </Card>
</CardGroup>
