# Quickstart

Go from zero to your first API response in under 2 minutes.

## 1. Get your API key

Log in to the [HG Admin Portal](https://admin.hginsights.com) and go to **Settings** > **API Keys** to generate your key. It starts with `hg_v2_`.

Don't have access? Contact your account manager.

## 2. Make your first call

Pick any tool you're comfortable with:

- **Terminal** — Run the curl command below
- **Try-it console** — Click **Try it** on any endpoint in the [API Reference](/v2/openapi) and paste your key
- **Postman** — Import the OpenAPI spec and set your Bearer token
- **Claude Code** — Ask it to "call the HG API to enrich walmart.com"


See the [Explore the API](/v2/guides/explore-the-api) guide for detailed setup instructions for each tool.

Here's the curl version — replace `YOUR_API_KEY` and run:


```bash
curl -X POST "https://api.hginsights.com/data-api/v2/companies/enrich" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "companies": {
    "domains": ["walmart.com"]
  },
  "fields": ["firmographics"]
}'
```

## 3. See the response

You should get back Walmart's firmographic data:


```json
{
  "companies": [
    {
      "id": "1698C53EBC888758570396E0334965C1",
      "domain": "walmart.com",
      "firmographics": {
        "name": "Walmart Inc.",
        "domain": "walmart.com",
        "country_code": "US",
        "city_name": "Bentonville",
        "state_name": "AR",
        "employees_total": 2100000,
        "revenue_total": 713163000000,
        "industry_name": "Retail Trade",
        "fortune_500_rank": 1
      }
    }
  ]
}
```

That's it — you're connected.

## 4. Try adding more data

Add technographics to see the company's tech stack:


```bash
curl -X POST "https://api.hginsights.com/data-api/v2/companies/enrich" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "companies": {
    "domains": ["walmart.com"]
  },
  "fields": ["firmographics", "technographics"]
}'
```

## 5. Filter the results

Only want Salesforce products? Add a filter:


```bash
curl -X POST "https://api.hginsights.com/data-api/v2/companies/enrich" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "companies": {
    "domains": ["walmart.com"]
  },
  "fields": ["technographics"],
  "filters": {
    "technographics": {
      "vendors": {
        "names": ["Salesforce"]
      }
    }
  }
}'
```

## What's next?

| Goal | Guide |
|  --- | --- |
| Understand the data fields | [Understanding HG Data](/v2/guides/understanding-hg-data) |
| Enrich multiple companies at once | [Company Enrichment](/v2/guides/enrichment) |
| Enrich thousands of companies | [Bulk Enrichment](/v2/guides/bulk-enrichment) |
| Find companies by criteria | [Find Companies](/v2/guides/find-companies) |
| Explore with AI tools or Postman | [Explore the API](/v2/guides/explore-the-api) |
| Check your credit balance | [Credits and Usage](/v2/guides/credits-and-usage) |


## Troubleshooting

**401 Unauthorized** — Your API key is missing, incorrect, or has been revoked. Regenerate it from [admin.hginsights.com](https://admin.hginsights.com) under **Settings** > **API Keys**.

**422 Unprocessable Entity** — Check your request body. The `companies` and `fields` parameters are required. Make sure the JSON is valid.

**No data returned** — The company may not be in HG's database, or you may not have access to the requested field groups. Check your entitlements via the [Credits endpoint](/v2/guides/credits-and-usage) or contact your account manager.