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

# Clay HTTP API Integration

> Connect Anysite REST API to Clay via HTTP API enrichment — eliminate data credits on LinkedIn and web scraping

## Overview

Clay's HTTP API enrichment lets you call any external API directly from your table. By connecting Anysite endpoints, you replace Clay's native data credit–consuming enrichments with direct API calls — keeping the same workflow but removing the data credit cost.

**What moves off Clay's data credits:**

* LinkedIn profiles and company data
* Website scraping and content extraction
* Twitter/X user data and posts
* Company employee search
* Reddit, Instagram, YouTube data

**What stays in Clay (worth the credits):**

* Email verification waterfall
* Phone number enrichment

<Info>
  **Requirements:** Clay Growth plan or higher (HTTP API is not available on Starter/Launch). Anysite API key from [app.anysite.io](https://app.anysite.io).
</Info>

## Step 1: Get Your Anysite API Key

<Steps>
  <Step title="Sign up at Anysite">
    Go to [app.anysite.io](https://app.anysite.io) and create an account. Free tier includes 1,000 credits to test.
  </Step>

  <Step title="Copy your API key">
    In the dashboard, find your API key in the **API Key** section. You'll use this as the `access-token` header value in Clay.
  </Step>
</Steps>

## Step 2: Prepare Your Clay Table

Create or open a Clay table with your lead data. You need at least one column with identifiers — LinkedIn URLs, company domains, or Twitter handles.

<img src="https://mintcdn.com/horizondatawave/wohHVYg1G0bO09rZ/public/images/clay_api/clay-table-add-column.png?fit=max&auto=format&n=wohHVYg1G0bO09rZ&q=85&s=709c2a27eaca9d3fe01132599cfd1f65" alt="Clay table with Domain and LinkedIn URL columns" width="1992" height="1600" data-path="public/images/clay_api/clay-table-add-column.png" />

Click **+ Add column** to start adding an enrichment.

## Step 3: Add HTTP API Enrichment

Select **Add enrichment** from the column menu, then search for **HTTP API**.

<img src="https://mintcdn.com/horizondatawave/wohHVYg1G0bO09rZ/public/images/clay_api/clay-search-http-api.png?fit=max&auto=format&n=wohHVYg1G0bO09rZ&q=85&s=5a0b69e1852e10871acd1d4d8dfb02d4" alt="Search for HTTP API in Clay enrichment tools" width="968" height="1298" data-path="public/images/clay_api/clay-search-http-api.png" />

Select **HTTP API** (Enrichment · Clay).

## Step 4: Configure the API Call

Clay offers two ways to set up the HTTP API connection: **Generate** (AI-assisted) and **Configure** (manual).

### Option A: AI-Generated Setup (Recommended)

The **Generate** tab uses Clay's Sculptor AI to automatically configure the API call. Instead of writing the prompt yourself, copy a ready-made prompt from the Anysite API Reference.

**1. Open the endpoint page in [Anysite API Reference](https://docs.anysite.io/api-reference)**

Find the endpoint you need (e.g. `/linkedin/company`) and click the **AI Prompt** button next to the endpoint title.

<img src="https://mintcdn.com/horizondatawave/wohHVYg1G0bO09rZ/public/images/clay_api/anysite-api-reference.png?fit=max&auto=format&n=wohHVYg1G0bO09rZ&q=85&s=3f26b9881b8177b3d3c20355a4959f9b" alt="Anysite API Reference — AI Prompt button on endpoint page" width="2952" height="1614" data-path="public/images/clay_api/anysite-api-reference.png" />

This copies a detailed prompt with the endpoint URL, authentication method, all parameters, request/response examples, and implementation requirements.

**2. Paste the prompt into Clay's Generate field**

In the HTTP API dialog, switch to the **Generate** tab and paste the copied prompt into the description field. You don't need to fill in the Documentation URL — the prompt already contains everything Sculptor needs.

<img src="https://mintcdn.com/horizondatawave/wohHVYg1G0bO09rZ/public/images/clay_api/clay-http-generate-prompt.png?fit=max&auto=format&n=wohHVYg1G0bO09rZ&q=85&s=2b5a3d24b8883f105c687a742f50096e" alt="Clay HTTP API Generate tab — paste the AI prompt" width="964" height="1072" data-path="public/images/clay_api/clay-http-generate-prompt.png" />

<img src="https://mintcdn.com/horizondatawave/wohHVYg1G0bO09rZ/public/images/clay_api/clay-http-generate-button.png?fit=max&auto=format&n=wohHVYg1G0bO09rZ&q=85&s=f850363511773e73e0db463fb8f3ed78" alt="Clay Generate API Connection button" width="936" height="510" data-path="public/images/clay_api/clay-http-generate-button.png" />

Click **Generate API Connection**. Sculptor reads the prompt and configures the method, endpoint, headers, and body mapping automatically.

**3. Review the generated connection**

<img src="https://mintcdn.com/horizondatawave/wohHVYg1G0bO09rZ/public/images/clay_api/clay-http-generated-result.png?fit=max&auto=format&n=wohHVYg1G0bO09rZ&q=85&s=f0c5daa72851f39efced2d82d2acf185" alt="Generated API connection — Anysite Retrieve LinkedIn Company Profile" width="960" height="1178" data-path="public/images/clay_api/clay-http-generated-result.png" />

The generated connection shows:

* **access-token** field — paste your Anysite API key here
* **company** field — mapped to your table's LinkedIn URL column
* **timeout** — optional, leave empty for default (300s)

<Tip>
  The **AI Prompt** button is available on every endpoint page in the [API Reference](https://docs.anysite.io/api-reference). Use it for any Anysite endpoint — LinkedIn, Twitter, Instagram, Reddit, YouTube, web scraping, and more.
</Tip>

### Option B: Manual Configuration

Switch to the **Configure** tab to set up the API call manually.

<img src="https://mintcdn.com/horizondatawave/wohHVYg1G0bO09rZ/public/images/clay_api/clay-http-configure-manual.png?fit=max&auto=format&n=wohHVYg1G0bO09rZ&q=85&s=2e5e1f478405251fa66a2665fe1337af" alt="Clay HTTP API manual configuration" width="968" height="2674" data-path="public/images/clay_api/clay-http-configure-manual.png" />

Fill in:

* **Method**: `POST`
* **Endpoint**: `https://api.anysite.io/api/linkedin/company`
* **Account**: Add HTTP API (Headers) account with `access-token: YOUR_API_KEY`
* **Body**: `{"company": "{{linkedin_url_column}}"}`

Use the `/` key in any field to insert column references from your table.

## Step 5: Map Response Fields

After running the enrichment, Clay returns structured JSON. Use Clay's **JSON path selector** to extract specific fields into new columns:

* `$.name` — company name
* `$.description` — company description
* `$.industry` — industry
* `$.employee_count` — employee count
* `$.headquarters` — headquarters location
* `$.website` — company website

## Common API Configurations

### LinkedIn Company Profile

```
POST https://api.anysite.io/api/linkedin/company
Body: { "company": "{{linkedin_url}}" }
```

Returns: name, description, industry, employee count, headquarters, specialties, recent posts.

### LinkedIn Person Profile

```
POST https://api.anysite.io/api/linkedin/user
Body: { "user": "{{linkedin_profile_url}}" }
```

Returns: full profile with experience, education, skills, current role.

### Find Decision Makers

```
POST https://api.anysite.io/api/linkedin/search/users
Body: {
  "keywords": "CTO",
  "company_keywords": "{{company_name}}",
  "count": 5
}
```

Returns: list of matching profiles with LinkedIn URLs.

### Website Scraping

```
POST https://api.anysite.io/api/webparser/parse
Body: {
  "url": "{{website_url}}",
  "strip_all_tags": true,
  "only_main_content": true
}
```

Returns: clean text content. Feed into a Clay AI column to extract tech stack, signals, or any structured data.

### Twitter/X User Posts

```
POST https://api.anysite.io/api/twitter/user/posts
Body: {
  "user": "{{twitter_handle}}",
  "count": 20
}
```

Returns: recent posts with engagement metrics — useful for identifying active companies and buying signals.

### Company Employees

```
POST https://api.anysite.io/api/linkedin/company/employees
Body: {
  "companies": [{ "type": "company", "value": "{{company_urn}}" }],
  "count": 10
}
```

<Warning>
  Requires company URN from the `/api/linkedin/company` response. Run company enrichment first, extract the URN, then use it here.
</Warning>

## Example Workflow: B2B Lead Enrichment

A typical 5-column enrichment pipeline:

| Column          | Source      | What it does                 | Clay cost          |
| --------------- | ----------- | ---------------------------- | ------------------ |
| LinkedIn URL    | Input       | Your lead list               | Free               |
| Company Data    | Anysite API | `POST /api/linkedin/company` | 1 Action           |
| Person Profile  | Anysite API | `POST /api/linkedin/user`    | 1 Action           |
| Website Content | Anysite API | `POST /api/webparser/parse`  | 1 Action           |
| Email           | Clay native | Email waterfall enrichment   | 1 Action + credits |
| AI Summary      | Clay AI     | Personalized first line      | 1 Action           |

**Result:** Full lead enrichment where only email verification uses Clay data credits. LinkedIn and web scraping are handled by Anysite at API plan cost (\$49/mo for \~5,000 calls).

## Cost Comparison

For a 1,000-lead monthly workflow with LinkedIn + website + email enrichment:

| Approach                       | Monthly cost |
| ------------------------------ | ------------ |
| Clay native only (Growth plan) | \~\$2,200    |
| Clay + Anysite API             | \~\$375      |

The difference comes from eliminating \~15,000 data credits on LinkedIn profiles and website scraping.

## API Reference

For complete endpoint documentation with all parameters, types, and constraints:

<CardGroup cols={2}>
  <Card title="API Reference" icon="book-open" href="/api-reference">
    Interactive API documentation with all endpoints
  </Card>

  <Card title="Full AI Reference" icon="robot" href="https://docs.anysite.io/llms-full.txt">
    Machine-readable reference with all endpoints, parameters, and examples
  </Card>
</CardGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="HTTP API requires Growth plan or higher">
    Clay's HTTP API enrichment is only available on Growth plan and above. If you see "Feature not available! Please upgrade your plan", you need to upgrade your Clay subscription.

    **Alternative:** Use [Clay MCP integration](/mcp-server/unlimited-plan-clay) instead — MCP works on all Clay plans that support custom MCP servers.
  </Accordion>

  <Accordion title="401 Unauthorized errors">
    Anysite uses `access-token` header, **not** `Authorization: Bearer`.

    When setting up the HTTP API account in Clay:

    * Header name: `access-token`
    * Header value: your API key from [app.anysite.io](https://app.anysite.io)
  </Accordion>

  <Accordion title="Empty or missing data in response">
    * Verify the input URL/identifier is correctly formatted
    * Check that the LinkedIn profile or company page exists and is public
    * Some profiles may return limited data if they are private
    * Error code 404 means the entity was not found — verify the URL
    * Error code 412 means the entity is unavailable (deleted or restricted)

    See [Error Codes](/error-codes) for the full list.
  </Accordion>

  <Accordion title="Sculptor generates incorrect configuration">
    If the AI-generated setup doesn't work:

    1. Switch to the **Configure** tab and set up manually
    2. Use the exact endpoint URLs from this guide
    3. Make sure `access-token` is set as a header, not a query parameter
    4. Verify the JSON body field names match the API documentation
  </Accordion>

  <Accordion title="Rate limits or timeout errors">
    * Default timeout is 300 seconds. Add `"timeout": 600` to the body for slow requests
    * If you get 429 errors, reduce request frequency or check your plan limits
    * Check usage at [app.anysite.io](https://app.anysite.io) dashboard
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Clay MCP Integration" icon="robot" href="/mcp-server/unlimited-plan-clay">
    Alternative: connect via MCP for unlimited requests (\$30/mo)
  </Card>

  <Card title="All API Endpoints" icon="list" href="/api-reference">
    Browse all 50+ endpoints available via HTTP API
  </Card>

  <Card title="Authentication" icon="key" href="/authentication">
    API key management and authentication details
  </Card>

  <Card title="Get API Key" icon="rocket" href="https://app.anysite.io">
    Sign up and get your API key — 1,000 free credits included
  </Card>
</CardGroup>
