# Thecompaniesapi — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Enrich your company database with 80+ data points per company, search by industry or company details, and discover email patterns to drive your business intelligence. Find verified company information, get pricing data, and ask contextual questions about any organization to fuel your sales, marketing, or research efforts.

**Category:** Business Directories | **Website:** [thecompaniesapi.com/](https://thecompaniesapi.com/) | **Docs:** [parse.bot/marketplace/54ff4b40-0216-4325-aa3b-382af15f1bc0/thecompaniesapi-com-api](https://parse.bot/marketplace/54ff4b40-0216-4325-aa3b-382af15f1bc0/thecompaniesapi-com-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/thecompaniesapi/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Count companies

Count total companies in the database, optionally filtered by a query. Free endpoint. Returns the total count without an API key.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `api_key` | string | No | API key for authentication. |
| `query` | string | No | Filter query as a JSON array string. Pass '[]' or omit for unfiltered count. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/thecompaniesapi/count-companies \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"api_key":"<string>","query":"<string>"}'
```

### Enrich company from domain

Enrich a company profile using its domain name. Returns 300+ data points including company details, socials, finances, locations, and descriptions. Works without an API key for select free-tier domains (e.g. microsoft.com); other domains require a valid API key passed via the api_key parameter.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `api_key` | string | No | API key for authentication. Required for domains not in the free tier. |
| `domain` | string | Yes | Company domain (e.g. microsoft.com). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/thecompaniesapi/enrich-company-from-domain \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"api_key":"<string>","domain":"<string>"}'
```

### Fetch company context

Fetch AI-generated company context and insights including ideated content, sources, and full company data. Ideated content covers about, customers, features, pricing, technologies, and more. Works without an API key for select free-tier domains (e.g. microsoft.com); other domains require a valid API key.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `api_key` | string | No | API key for authentication. Required for domains not in the free tier. |
| `domain` | string | Yes | Company domain (e.g. microsoft.com). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/thecompaniesapi/fetch-company-context \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"api_key":"<string>","domain":"<string>"}'
```

### Find company email patterns

Find email patterns for a company showing the most common email format structures (e.g. firstname.lastname@company.com). Patterns use bracket notation: [F]=first name, [L]=last name, [F1]=first initial, [L1]=last initial. Works without an API key for select free-tier domains (e.g. microsoft.com); other domains require a valid API key.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `api_key` | string | No | API key for authentication. Required for domains not in the free tier. |
| `domain` | string | Yes | Company domain (e.g. microsoft.com). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/thecompaniesapi/find-company-email-patterns \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"api_key":"<string>","domain":"<string>"}'
```

### Get pricing

Retrieve pricing plans for The Companies API. Returns monthly and annual rates, credits, and features for Startup, Scaleup, and Enterprise tiers. No parameters required — returns static plan information.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/thecompaniesapi/get-pricing \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Search companies

Search for companies using keywords. Returns paginated results with simplified company data including name, domain, industry, and logo. Free endpoint that does not require an API key. Supports keyword search against company names/domains and structured filter queries.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `api_key` | string | No | API key for authentication. |
| `page` | integer | No | Page number for pagination. |
| `query` | string | No | Filter query as a JSON array string (e.g. '[{"attribute":"industry","operator":"=","value":"software-development"}]'). |
| `search` | string | No | Search keyword to match against company names and domains. |
| `size` | integer | No | Number of results per page. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/thecompaniesapi/search-companies \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"api_key":"<string>","page":"<integer>","query":"<string>","search":"<string>","size":"<integer>"}'
```

### Search industries

Search for industries in the database. Returns industry labels and their company counts, useful for discovering industry keys to use as filters in search_companies. Each result includes a slug value suitable for use in structured filter queries.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination. |
| `search` | string | No | Search keyword to filter industries. |
| `size` | integer | No | Requested results per page. The API may return a different perPage value. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/thecompaniesapi/search-industries \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","search":"<string>","size":"<integer>"}'
```

## Next steps

- [All wrapped API providers](https://beta.paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://beta.paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://beta.paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://beta.paywithlocus.com/agent/index.md): every Locus agent page.