# LinkedIn Profile Enrichment API Reference

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

### What it does

Resolve a single LinkedIn profile URL into a complete, contactable record: name, headline, title, seniority, department, company and domain, plus verified work email with an automatic email-finder fallback when no direct match exists.

### Use cases

- Power a browser extension or Chrome sidebar that reveals a prospect's email while a rep browses LinkedIn.
- Convert scraped LinkedIn Sales Navigator lists or event attendee lists into email-ready outbound records.
- Enrich LinkedIn connection requests and inbound DMs so replies can be routed to the right account owner.

### Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `linkedin_url` | string | Full LinkedIn profile URL (e.g. https://www.linkedin.com/in/koko-zarov-a54b3061). Required. |

### 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 |
|-------|-------|
| found (boolean) | |
| credits_used (integer) | |
| contact.first_name | |
| contact.last_name | |
| contact.full_name | |
| contact.linkedin_profile | |
| contact.linkedin_headline | |
| contact.profile_summary | |
| contact.profile_status | |
| contact.job_title | |
| contact.seniority | |
| contact.department | |
| contact.job_start_date | |
| contact.new_hire | |
| contact.total_positions | |
| contact.work_experience[] → job_title, company_name, company_domain, is_current, start_date, end_date, seniority, job_function, location | |
| contact.education[] → school, degree, start_date, end_date | |
| contact.skills[] | |
| contact.interests[] | |
| contact.linkedin_connection_count | |
| contact.linkedin_followers | |
| contact.linkedin_recommendations | |
| contact.work_email | |
| contact.personal_email | |
| contact.email_source | |
| contact.email_finder | |
| contact.direct_dials[] | |
| contact.social_profiles → twitter, github, facebook | |
| contact.company_name | |
| contact.company_domain | |
| contact.company_linkedin_profile | |
| contact.company_industry | |
| contact.company_employee_range | |
| contact.company_description | |
| contact.company_specialties[] | |
| contact.company_type | |
| contact.company_employee_count | |
| contact.company_follower_count | |
| contact.company_founded | |
| contact.company_naics | |
| contact.company_naics_description | |
| contact.company_hq_address | |
| contact.company_hq_city | |
| contact.company_hq_state | |
| contact.company_hq_postal | |
| contact.person_city | |
| contact.person_state | |
| contact.person_country | |
| contact.data_last_updated (ISO 8601 — when this profile record was last refreshed) | |
| contact.data_first_seen (ISO 8601 — when this profile first entered the dataset) | |

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

```json
{
  "data": {
    "found": "string",
    "credits_used": "string",
    "contact.first_name": "string",
    "contact.last_name": "string",
    "contact.full_name": "string",
    "contact.linkedin_profile": "string",
    "contact.linkedin_headline": "string",
    "contact.profile_summary": "string",
    "contact.profile_status": "string",
    "contact.job_title": "string",
    "contact.seniority": "string",
    "contact.department": "string",
    "contact.job_start_date": "2025-06-01T12:00:00Z",
    "contact.new_hire": "string",
    "contact.total_positions": "string",
    "contact.skills[]": "string",
    "contact.interests[]": "string",
    "contact.linkedin_connection_count": 0,
    "contact.linkedin_followers": "string",
    "contact.linkedin_recommendations": "string",
    "contact.work_email": "user@example.com",
    "contact.personal_email": "user@example.com",
    "contact.email_source": "user@example.com",
    "contact.email_finder": "user@example.com",
    "contact.direct_dials[]": "string",
    "contact.company_name": "string",
    "contact.company_domain": "string",
    "contact.company_linkedin_profile": "string",
    "contact.company_industry": "string",
    "contact.company_employee_range": "string",
    "contact.company_description": "string",
    "contact.company_specialties[]": [],
    "contact.company_type": "string",
    "contact.company_employee_count": 0,
    "contact.company_follower_count": 0,
    "contact.company_founded": "string",
    "contact.company_naics": [],
    "contact.company_naics_description": [],
    "contact.company_hq_address": "string",
    "contact.company_hq_city": "string",
    "contact.company_hq_state": "string",
    "contact.company_hq_postal": "string",
    "contact.person_city": "string",
    "contact.person_state": "string",
    "contact.person_country": 0,
    "contact.data_last_updated": "2025-06-01T12:00:00Z",
    "contact.data_first_seen": "string",
    "contact.work_experience": [
      {
        "job_title": "string",
        "company_name": "string",
        "company_domain": "string",
        "is_current": false,
        "start_date": "2025-06-01T12:00:00Z",
        "end_date": "2025-06-01T12:00:00Z",
        "seniority": "string",
        "job_function": "string",
        "location": "string"
      }
    ],
    "contact.education": [
      {
        "school": "string",
        "degree": "string",
        "start_date": "2025-06-01T12:00:00Z",
        "end_date": "2025-06-01T12:00:00Z"
      }
    ],
    "contact.social_profiles": {
      "twitter": "string",
      "github": "string",
      "facebook": "string"
    }
  }
}
```

### POST /v1/enrich/linkedin-profile — Enrich LinkedIn Profile

Full profile enrichment from a LinkedIn URL. Returns identity, headline and summary, current title with seniority and function, full work history, education, skills and interests, follower/connection counts, company profile (description, specialties, type, employee and follower counts), location, NAICS, and an auto-resolved work email (via Email Finder fallback) when discoverable.

Data freshness: every record includes `data_last_updated` and `data_first_seen` (ISO 8601) so you can tell exactly how current the profile is, plus `profile_status` (`active` or `deleted`) to detect removed profiles.

Pricing: 1 credit per successful match. No charge when `found: false`.

Insufficient credits: Returns HTTP 402 with `{ code: "NO_CREDITS" }`.

**Example Request Body:**

```json
{
  "linkedin_url": "https://www.linkedin.com/in/koko-zarov-a54b3061"
}
```

**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": "/v1/enrich/linkedin-profile",
  "method": "POST",
  "body": {
    "linkedin_url": "https://www.linkedin.com/in/koko-zarov-a54b3061"
  }
}'
```

