KosmoKrator

other

Clearbit Lua API for KosmoKrator Agents

Agent-facing Lua documentation and function reference for the Clearbit KosmoKrator integration.

6 functions 6 read 0 write API key auth

Lua Namespace

Agents call this integration through app.integrations.clearbit.*. Use lua_read_doc("integrations.clearbit") inside KosmoKrator to discover the same reference at runtime.

Agent-Facing Lua Docs

This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.

Clearbit — Lua API Reference

enrich_person

Look up a person by email address. Returns social profiles, employment, location, and demographic data when available.

Parameters

NameTypeRequiredDescription
emailstringyesThe email address of the person to look up (e.g., "[email protected]")

Examples

local result = app.integrations.clearbit.enrich_person({
  email = "[email protected]"
})

if result.found ~= false then
  print(result.person.fullName)
  print(result.person.employment.title)
  print(result.person.employment.name)
end

enrich_company

Look up a company by domain name. Returns company metrics, industry categorization, social profiles, and funding data.

Parameters

NameTypeRequiredDescription
domainstringyesThe company domain (e.g., "stripe.com")

Examples

local result = app.integrations.clearbit.enrich_company({
  domain = "stripe.com"
})

if result.found ~= false then
  print(result.name)
  print(result.category.industry)
  print(result.metrics.employees)
end

reveal

Identify the company and person behind an IP address. Useful for de-anonymizing website visitors.

Parameters

NameTypeRequiredDescription
ipstringyesIPv4 or IPv6 address (e.g., "104.193.168.24")

Examples

local result = app.integrations.clearbit.reveal({
  ip = "104.193.168.24"
})

if result.found ~= false then
  print(result.company.name)
  print(result.person.fullName)
end

prospect

Find people by job title and/or company name. Returns lists of matching people with names, titles, and email addresses.

Parameters

NameTypeRequiredDescription
titlestringnoJob title to search for (e.g., "CEO", "Software Engineer")
companystringnoCompany name to filter by (e.g., "Stripe")
pageintegernoPage number for pagination (default: 1)

At least one of title or company must be provided.

Examples

-- Find all CEOs at Stripe
local result = app.integrations.clearbit.prospect({
  title = "CEO",
  company = "Stripe"
})

for _, person in ipairs(result.results or {}) do
  print(person.fullName .. " — " .. person.title)
end
-- Find all Software Engineers (any company)
local result = app.integrations.clearbit.prospect({
  title = "Software Engineer",
  page = 1
})

list_autocomplete

Search for companies by name. Returns a list of matching companies with domains, logos, and descriptions. Ideal for type-ahead / autocomplete UI flows.

Parameters

NameTypeRequiredDescription
namestringyesCompany name or prefix to search for (e.g., "Stripe", "Goo")

Examples

local result = app.integrations.clearbit.list_autocomplete({
  name = "Stripe"
})

for _, company in ipairs(result) do
  print(company.name .. " — " .. company.domain)
end

get_current_user

Get the authenticated user’s Clearbit account information. Useful for verifying API credentials and checking plan details.

Parameters

None.

Examples

local result = app.integrations.clearbit.get_current_user({})

print("Account: " .. result.name)
print("Plan: " .. (result.plan or "unknown"))

Multi-Account Usage

If you have multiple Clearbit accounts configured, use account-specific namespaces:

-- Default account (always works)
app.integrations.clearbit.enrich_person({ email = "[email protected]" })

-- Explicit default (portable across setups)
app.integrations.clearbit.default.enrich_person({ email = "[email protected]" })

-- Named accounts
app.integrations.clearbit.sales.enrich_person({ email = "[email protected]" })
app.integrations.clearbit.marketing.enrich_company({ domain = "stripe.com" })

All functions are identical across accounts — only the credentials differ.

Raw agent markdown
# Clearbit — Lua API Reference

## enrich_person

Look up a person by email address. Returns social profiles, employment, location, and demographic data when available.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `email` | string | yes | The email address of the person to look up (e.g., `"[email protected]"`) |

### Examples

```lua
local result = app.integrations.clearbit.enrich_person({
  email = "[email protected]"
})

if result.found ~= false then
  print(result.person.fullName)
  print(result.person.employment.title)
  print(result.person.employment.name)
end
```

---

## enrich_company

Look up a company by domain name. Returns company metrics, industry categorization, social profiles, and funding data.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `domain` | string | yes | The company domain (e.g., `"stripe.com"`) |

### Examples

```lua
local result = app.integrations.clearbit.enrich_company({
  domain = "stripe.com"
})

if result.found ~= false then
  print(result.name)
  print(result.category.industry)
  print(result.metrics.employees)
end
```

---

## reveal

Identify the company and person behind an IP address. Useful for de-anonymizing website visitors.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `ip` | string | yes | IPv4 or IPv6 address (e.g., `"104.193.168.24"`) |

### Examples

```lua
local result = app.integrations.clearbit.reveal({
  ip = "104.193.168.24"
})

if result.found ~= false then
  print(result.company.name)
  print(result.person.fullName)
end
```

---

## prospect

Find people by job title and/or company name. Returns lists of matching people with names, titles, and email addresses.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `title` | string | no | Job title to search for (e.g., `"CEO"`, `"Software Engineer"`) |
| `company` | string | no | Company name to filter by (e.g., `"Stripe"`) |
| `page` | integer | no | Page number for pagination (default: 1) |

At least one of `title` or `company` must be provided.

### Examples

```lua
-- Find all CEOs at Stripe
local result = app.integrations.clearbit.prospect({
  title = "CEO",
  company = "Stripe"
})

for _, person in ipairs(result.results or {}) do
  print(person.fullName .. " — " .. person.title)
end
```

```lua
-- Find all Software Engineers (any company)
local result = app.integrations.clearbit.prospect({
  title = "Software Engineer",
  page = 1
})
```

---

## list_autocomplete

Search for companies by name. Returns a list of matching companies with domains, logos, and descriptions. Ideal for type-ahead / autocomplete UI flows.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `name` | string | yes | Company name or prefix to search for (e.g., `"Stripe"`, `"Goo"`) |

### Examples

```lua
local result = app.integrations.clearbit.list_autocomplete({
  name = "Stripe"
})

for _, company in ipairs(result) do
  print(company.name .. " — " .. company.domain)
end
```

---

## get_current_user

Get the authenticated user's Clearbit account information. Useful for verifying API credentials and checking plan details.

### Parameters

None.

### Examples

```lua
local result = app.integrations.clearbit.get_current_user({})

print("Account: " .. result.name)
print("Plan: " .. (result.plan or "unknown"))
```

---

## Multi-Account Usage

If you have multiple Clearbit accounts configured, use account-specific namespaces:

```lua
-- Default account (always works)
app.integrations.clearbit.enrich_person({ email = "[email protected]" })

-- Explicit default (portable across setups)
app.integrations.clearbit.default.enrich_person({ email = "[email protected]" })

-- Named accounts
app.integrations.clearbit.sales.enrich_person({ email = "[email protected]" })
app.integrations.clearbit.marketing.enrich_company({ domain = "stripe.com" })
```

All functions are identical across accounts — only the credentials differ.

Metadata-Derived Lua Example

local result = app.integrations.clearbit.clearbit_enrich_person({
  email = "example_email"
})
print(result)

Functions

clearbit_enrich_person

Look up a person by email address using Clearbit. Returns social profiles, employment, location, and demographic data when available.

Operation
Read read
Full name
clearbit.clearbit_enrich_person
ParameterTypeRequiredDescription
email string yes The email address of the person to look up (e.g., "[email protected]").

clearbit_enrich_company

Look up a company by domain name using Clearbit. Returns company metrics, industry categorization, social profiles, and funding data when available.

Operation
Read read
Full name
clearbit.clearbit_enrich_company
ParameterTypeRequiredDescription
domain string yes The company domain to look up (e.g., "stripe.com").

clearbit_reveal

Identify the company and person behind an IP address using Clearbit Reveal. Returns company information and, when available, the associated person.

Operation
Read read
Full name
clearbit.clearbit_reveal
ParameterTypeRequiredDescription
ip string yes The IP address to look up (IPv4 or IPv6, e.g., "104.193.168.24").

clearbit_prospect

Find people by job title and/or company name using Clearbit Prospecting. Returns names, titles, and email addresses when available.

Operation
Read read
Full name
clearbit.clearbit_prospect
ParameterTypeRequiredDescription
title string no Job title to search for (e.g., "CEO", "Software Engineer", "VP of Sales").
company string no Company name to filter by (e.g., "Stripe", "Google").
page integer no Page number for pagination (default: 1).

clearbit_list_autocomplete

Search for companies by name using Clearbit Autocomplete. Returns a list of matching companies with domains, logos, and descriptions. Useful for type-ahead search.

Operation
Read read
Full name
clearbit.clearbit_list_autocomplete
ParameterTypeRequiredDescription
name string yes Company name or prefix to search for (e.g., "Stripe", "Goo").

clearbit_get_current_user

Get the authenticated user's Clearbit account information. Useful for verifying API credentials and checking plan details.

Operation
Read read
Full name
clearbit.clearbit_get_current_user
ParameterTypeRequiredDescription
No parameters.