# Company data in Clay

Enrich every domain or LinkedIn company URL in a Clay table through Clay's HTTP API enrichment. One column, set up once, billed per row.

Clay's HTTP API column needs a Growth plan or higher.

## Save your key as an account

In the HTTP API column's settings, pick or add an **HTTP API (Headers)** account with one header:

| Header | Value |
|---|---|
| `Authorization` | `Bearer ` followed by your key from the console |

Clay then keeps the key out of the column. You can also type it under **Headers**, but then everyone with
access to the table can read it there.

## Add the column

**Add enrichment > HTTP API**, then fill in the settings:

| Setting | Value |
|---|---|
| Method | `POST` |
| Endpoint | `https://api.happyfetch.net/v1/domain` |
| Headers | `Content-Type`: `application/json` (plus `Authorization` if you didn't save an account) |
| Body | `{"domain": "/Domain"}` |
| Field paths to return | `data.name`, `data.industry`, `data.employeeCount`, `data.employeeCountRange.start`, `data.employeeCountRange.end`, `data.headquarter.city`, `data.headquarter.country`, `data.websiteUrl`, `data.linkedInUrl`, `meta.resolved.verified`, `meta.credits_charged` |
| Rate limiting | Request limit `2`, Duration (ms) `1000` |
| Remove empty fields from request | On |
| Conditional run | Only when the Domain column isn't empty |

In **Body**, type `/` and pick your domain column where `/Domain` stands. Keep the quotes around it: the
domain is a string. The column can hold a bare domain (`stripe.com`) or any URL on the site.

Click **Try on 5 rows**, open a filled cell, and add the fields you want as their own columns. Every field
of the [company profile](/docs/company) is always present, and `null` when it isn't known, so a column never
breaks on a missing key.

`meta.resolved.verified` is `true` when the company's own website is on that domain, and `false` when the
company was matched to the domain but lists another website, such as a parent company's. Filter on it when
you only want confirmed matches.

## Start from a LinkedIn company URL instead

Same settings, with:

| Setting | Value |
|---|---|
| Endpoint | `https://api.happyfetch.net/v1/company` |
| Body | `{"url": "/LinkedIn URL"}` |

The column can hold a LinkedIn company URL, its slug or its numeric id. A company lookup costs
2 credits, against 4 credits for a domain lookup, so start from the LinkedIn
URL when your table has one.

## What it costs

Each row is one API call, billed like any other. Add `meta.credits_charged` as a column to see what each
row cost.

| Lookups a month | Smallest pack (Starter) | Biggest pack (Business) |
|---|---|---|
| 1,000 lookups by website domain | $2.00 | $1.00 |
| 10,000 lookups by website domain | $20.00 | $10.00 |
| 100,000 lookups by website domain | $200.00 | $100.00 |

Every lookup fetched fresh, at 4 credits each. Lookups our cache answers cost half. A confirmed not-found costs the same, and nothing from our cache. Starter: $10 for 20,000 credits. Business: $500 for 2,000,000 credits. Credits never expire.

- **A domain with no company** comes back as HTTP 404 with `error.code` `not_found`, which Clay shows as an
  error in the cell. It's an answer: 4 credits by website domain, 1 credit by
  LinkedIn company URL, and free when it comes from our cache.
- **HTTP 429** means too many lookups at once. It's never charged: lower the request limit and rerun those
  rows.
- **Failures on our side** (HTTP 5xx) are refunded automatically in the same request. Rerun the rows later.
- **Reruns:** turn off auto-update if you don't want edits to the Domain column to run the lookup again.

Cached companies come back fastest. That's why the suggested rate is low: raise it once most of your list
comes from our cache.
