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

# API Quickstart

> Get started with the Lance API in minutes

## Prerequisites

Before you begin, make sure you have:

* A Lance account with a paid subscription
* A new API key, created in your account settings ([https://app.lance.so/account/api-keys](https://app.lance.so/account/api-keys))

## Make Your First API Call

### Step 1: Set Up Authentication

All API requests require a Bearer token in the Authorization header:

```bash theme={null}
export LANCE_API_KEY="your-api-key-here"
```

### Step 2: Show your credit balance

Start by retrieving your credit balance:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://app.lance.so/api/v1/operations/credits/balance" \
    -H "Authorization: Bearer $LANCE_API_KEY" \
    -H "Content-Type: application/json"
  ```

  ```typescript JavaScript theme={null}
  const response = await fetch('https://app.lance.so/api/v1/operations/credits/balance', {
    headers: {
      'Authorization': `Bearer ${process.env.LANCE_API_KEY}`,
      'Content-Type': 'application/json'
    }
  });
  const data = await response.json();
  ```
</CodeGroup>

### Step 3: Search for Companies

Find companies matching your criteria:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://app.lance.so/api/v1/entities/prospects/company/search" \
    -H "Authorization: Bearer $LANCE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"page":1,"size":25,"account":{"industry":{"any":{"include":["biotechnology","construction"]}},"location":{"any":{"include":["Germany","Paris, France"]}}},"contact":{"departmentAndFunction":{"any":{"include":["master_information_technology"]}}}}'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://app.lance.so/api/v1/entities/prospects/company/search', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.LANCE_API_KEY}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({"page":1,"size":25,"account":{"industry":{"any":{"include":["biotechnology","construction"]}},"location":{"any":{"include":["Germany","Paris, France"]}}},"contact":{"departmentAndFunction":{"any":{"include":["master_information_technology"]}}}})
  });
  const companies = await response.json();
  ```
</CodeGroup>

### Step 4: Enrich a Contact

Get phone and email for a person:

<CodeGroup>
  ```javascript JavaScript theme={null}
  const personId = "1707CAED-B741-4A3F-B90D-96EC21D876D9"
  const response = await fetch('https://app.lance.so/api/v1/operations/enrichment/' + personId, {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.LANCE_API_KEY}`,
      'Content-Type': 'application/json'
    }
  });
  const enrichedContact = await response.json();
  ```
</CodeGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="API Reference" icon="code" href="/api-reference/introduction">
    Explore all available endpoints
  </Card>

  <Card title="Lead Lists" icon="list" href="/api-reference/entities/leadlists-list">
    Manage your lead lists
  </Card>

  <Card title="Enrichment" icon="sparkles" href="/api-reference/operations/enrichment-person">
    Enrich contacts at scale
  </Card>

  <Card title="CRM Export" icon="arrows-rotate" href="/api-reference/operations/crm-export">
    Export to your CRM
  </Card>
</CardGroup>

## Common Use Cases

| Use Case          | Endpoints                                                                                                                             |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| Build a lead list | [Search Companies](/api-reference/entities/prospects-company-search) + [Add to List](/api-reference/entities/leadlists-add-companies) |
| Enrich contacts   | [Enrich Person](/api-reference/operations/enrichment-person) or [Batch Enrich](/api-reference/operations/enrichment-batch)            |
| Export to CRM     | [CRM Export](/api-reference/operations/crm-export)                                                                                    |

<Note>
  Need help? Contact us from our website [www.lance.so](https://lance.so) and we'll get in touch within 24 hours!
</Note>
