# Company Enrichment API Reference

> Platform documentation snapshot. Access, charging and provider requirements remain operation-specific; examples do not execute requests.

### What it does

Enrich a single company by domain or name with firmographics, industry classification, revenue and headcount ranges, HQ and local addresses, LinkedIn page and identifiers used across the rest of the platform.

### Use cases

- Auto-fill company fields on CRM account creation so reps never type firmographics by hand.
- Enrich signup email domains to route self-serve accounts to the right sales segment instantly.
- Score and tier inbound accounts (SMB, mid-market, enterprise) at the moment of capture.

### Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `company_name` | string | Company name to look up (use any one lookup field) |
| `website` | string | Company website domain (e.g. "stripe.com") |
| `linkedin_url` | string | LinkedIn company page URL (e.g. "https://www.linkedin.com/company/google") |
| `company_id` | integer | Exact company_id for fastest indexed lookup |

### Response Schema

_Complete documented fields for this section, with nested notation preserved. Endpoint-specific envelopes, availability and additional fields are described under each endpoint below._

| Field | Notes |
|-------|-------|
| company → company_id, linkedin_company_id, org_id, snap_id | |
| company → name, slug, slug_status, type, size | |
| company → description, company_headline, founded_year | |
| company → website, linkedin_url, ticker, stock_exchange_code | |
| company → employee_count, follower_count, is_showcase | |
| company → industries[] → name, id, primary | |
| company → specialties[] → name, id | |
| company → naics_codes | |
| company → street_address, locality, region, postal_code, country_iso, country_name | |
| company → inferred_location → formatted_address, address_line, locality, admin_district, admin_district2, neighborhood, postal_code, country_region, country_iso, latitude, longitude, name, locationstr | |
| company → locations[] → address, is_primary, inferred_location {...} | |
| company → posts[] → id, posted_date, posted_date_range {min, max}, content_html, image_url, video_url, external_url, embedded_post, likes_count, comments_count, linkedin_company_id, data_activity_urn, updated_at | |
| company → similar_pages[] | |
| company → affiliated_pages[] | |
| company → subsidiary_linkedin_company_ids | |
| company → employees[] | |
| company → crunchbase_funding | |
| company → created_at | |
| company → updated_at | |

**Illustrative Example Response (synthetic, not a complete endpoint schema):**

```json
{
  "data": {
    "company": {
      "updated_at": "2025-06-01T12:00:00Z"
    }
  }
}
```

### POST /b2b-enrich — Enrich by Company Name

Look up a company by name. Returns the best match with full company profile including description, employee count, industries, NAICS codes, locations, and more.

**Example Request Body:**

```json
{
  "company_name": "Salesforce"
}
```

**cURL Example:**

```bash
curl -X POST 'https://bvjmtgaxijpyasjtaqiv.supabase.co/functions/v1/api-gateway' \
  -H 'Content-Type: application/json' \
  -H 'x-amz-security-token: YOUR-API-KEY' \
  -d '{
  "path": "/b2b-enrich",
  "method": "POST",
  "body": {
    "company_name": "Salesforce"
  }
}'
```

### POST /b2b-enrich — Enrich by Website

Look up a company by its website domain. Returns the matching company profile.

**Example Request Body:**

```json
{
  "website": "stripe.com"
}
```

**cURL Example:**

```bash
curl -X POST 'https://bvjmtgaxijpyasjtaqiv.supabase.co/functions/v1/api-gateway' \
  -H 'Content-Type: application/json' \
  -H 'x-amz-security-token: YOUR-API-KEY' \
  -d '{
  "path": "/b2b-enrich",
  "method": "POST",
  "body": {
    "website": "stripe.com"
  }
}'
```

### POST /b2b-enrich — Enrich by LinkedIn URL

Look up a company by its LinkedIn company page URL. Uses the slug for fast indexed lookup.

**Example Request Body:**

```json
{
  "linkedin_url": "https://www.linkedin.com/company/google"
}
```

**cURL Example:**

```bash
curl -X POST 'https://bvjmtgaxijpyasjtaqiv.supabase.co/functions/v1/api-gateway' \
  -H 'Content-Type: application/json' \
  -H 'x-amz-security-token: YOUR-API-KEY' \
  -d '{
  "path": "/b2b-enrich",
  "method": "POST",
  "body": {
    "linkedin_url": "https://www.linkedin.com/company/google"
  }
}'
```

### POST /b2b-enrich — Enrich by Company ID

Look up a company by its exact company_id. Fastest lookup method — uses indexed primary key.

**Example Request Body:**

```json
{
  "company_id": 12345
}
```

**cURL Example:**

```bash
curl -X POST 'https://bvjmtgaxijpyasjtaqiv.supabase.co/functions/v1/api-gateway' \
  -H 'Content-Type: application/json' \
  -H 'x-amz-security-token: YOUR-API-KEY' \
  -d '{
  "path": "/b2b-enrich",
  "method": "POST",
  "body": {
    "company_id": 12345
  }
}'
```

