# Company Profile Enrichment MCP — Domain to Data (`hamzatrq/company-profile-mcp`) Actor

Give an AI agent a domain and get a clean structured company profile back — description, contact emails, social links, and technology signals. Built MCP-first for agents, with a hard cost cap.

- **URL**: https://apify.com/hamzatrq/company-profile-mcp.md
- **Developed by:** [Hamza Tariq](https://apify.com/hamzatrq) (community)
- **Categories:** AI, MCP servers, Lead generation
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Company Profile Enrichment MCP — domain to structured company data

> Quick Start: click **Start** with the default input — it enriches a demo domain and writes
> one dense structured company profile with zero changes. Then drop your own domains into the
> `domains` field and run again.

Give it a company **domain**, get back a dense, clean **structured company profile**: the company
name (and legal name), a **normalized industry** and a one-line **AI summary** of what they do,
**concrete product names**, the company's own **canonical social links**, a **logo**, a rich
**technology stack**, a structured **location** (country / region / city / address), founding
year, company type, and a generic contact email/phone where the site exposes them. Built MCP-first
for AI agents — an agent can call "enrich `[domain]`" and get JSON back in one step — but it works
just as well as a plain company-enrichment **API**, **scraper**, **extractor**, or **data feed**
you call from a script, a sheet, or a CRM.

It reads the homepage **plus the `/contact` and `/about` pages** and **prefers schema.org JSON-LD
structured data** (the `Organization` block most modern sites publish) over loose meta tags — so
socials, address, phone, founding year, and ticker come from the most reliable source on the page.

Natural ways people search for this: company enrichment API, domain-to-company-data, MCP
server for AI agents, RAG enrichment, sales enrichment, website data extractor.

### What you get per company

**Deterministic, website-sourced** (present on most marketing homepages):

- `name`, `legalName`, `description` — from JSON-LD first, then `<title>` / `meta` / `og:*` tags
- `socials` — the company's own Twitter/X, LinkedIn, Facebook, Instagram, YouTube, GitHub
  **profile/channel** links. Recovered from JSON-LD `sameAs` **and** page links, canonical pages
  only: LinkedIn keeps `/company/`, `/school/`, `/showcase/` and **rejects personal `/in/`
  profiles**; tracking redirect wrappers (e.g. Facebook `l.php?u=`) are decoded to the real
  profile; video/post/feature deep links are dropped. When in doubt the field stays `null`.
- `techStack` — a Wappalyzer-style detected stack (~45 fingerprints across analytics, CMS,
  frameworks, ecommerce, CDN/hosting, marketing/CRM, payments, fonts)
- `logoUrl` — the brand logo (JSON-LD `logo` or favicon / apple-touch-icon), distinct from `imageUrl`
- `imageUrl` — the company's `og:image` (marketing/hero image)
- `location` — `{ country, region, city, address }` parsed from JSON-LD `PostalAddress` or an
  `<address>` block (each part `null` when absent)
- `phone`, `email` — a corporate/generic phone and **one** generic, trustworthy mailbox
  (`info@`, `contact@`, …) on the company's own domain; placeholder/demo addresses are dropped
- `foundedYear`, `companyType`, `ticker` — when the page states them

**AI-enriched** (optional — see the API key note below; `null` when the AI pass didn't run):

- `industry` / `subIndustry` — a normalized, common-industry label
- `summary` — a neutral 1–2 sentence "what they do"
- `products` — concrete product/service names (≤10)
- `tags` — short topical keywords (≤8)

**Always present:**

- `confidence` — a transparent 0–1 score for how complete the (website-winnable) profile is
- `aiEnriched` — `true` only when the AI pass ran and returned fields
- `status` / `error` — `"ok"` for an enriched domain, or `"failed"` with a short reason
  (`"HTTP 404"`, `"timeout"`, …) when a domain couldn't be reached. **One row is emitted per
  input domain**, so a batch never silently under-delivers.

### What this actor does NOT do (honest expectations)

It enriches strictly from a company's own website, so it deliberately does **not** return
proprietary fields a website can't source: **verified employee count, revenue, funding rounds, or
per-person/personal emails**. Those need paid B2B databases — guessing them would be hallucination.
This actor nails the website-winnable fields densely instead.

### The optional AI key

The AI fields (`industry`, `subIndustry`, `products`, `tags`, `summary`) are produced by a small,
cheap LLM via any **OpenAI-compatible** Chat Completions API. Set an **`AI_API_KEY`** secret to
turn them on — by default it calls **OpenRouter** (`https://openrouter.ai/api/v1`) with model
`google/gemini-2.5-flash-lite`. Point it anywhere by also setting **`AI_BASE_URL`** and
**`AI_MODEL`** (e.g. OpenAI `https://api.openai.com/v1` + `gpt-4.1-nano`, or DeepSeek
`https://api.deepseek.com` + `deepseek-chat`). **Without a key the actor still runs and returns
the full deterministic record** — the AI fields simply stay `null` and `aiEnriched` is `false`.
The AI pass also degrades gracefully on any error or timeout, never failing a run.

### Input

Runs zero-config. Optional fields:

- `domains` — one or more company domains to enrich (bare host or full URL). Empty = a demo run.
- `maxItems` — cap on companies per run.
- `maxCostPerRunUsd` — hard cost cap, default $5; the run stops before exceeding it.

### Output

One canonical `CompanyProfile` record per domain (keyed by domain, so re-running updates the same
company). On repeat runs only profiles that **changed** are re-emitted — a company-profile monitor.
See `.actor/dataset_schema.json`.

### Use as an MCP tool

Apify's MCP server exposes this actor to agents (Claude, Cursor) automatically. The agent intent
it matches: "enrich this company / give me structured data for `[domain]`".

### Pricing

Pay-per-event: a small start fee plus a per-enrichment charge, with a hard per-run cost cap on
by default so you are never surprised by the bill. Actively maintained — fixes within 24h.

# Actor input Schema

## `domains` (type: `array`):

One or more company domains to enrich (bare host or full URL). The homepage HTML is fetched and a structured profile is extracted. Leave empty for a zero-config demo run on a known company domain.
## `maxItems` (type: `integer`):

Upper bound on the number of company profiles returned per run. Lower it to keep runs cheap; remove it to enrich every domain you pass.
## `maxCostPerRunUsd` (type: `integer`):

Hard ceiling on spend per run — the run stops before exceeding it, so you are never surprised by the bill.
## `aiModel` (type: `string`):

Which cheap LLM powers the AI fields (industry, products, summary). Leave blank to use the actor default. Requires the operator's AI_API_KEY to be configured.
## `fullSync` (type: `boolean`):

By default this runs as an incremental monitor: a repeat run emits only NEW or CHANGED records (and bills only for those). Turn this on to re-emit the entire current dataset every run — the one-off scraper / full-export use case.

## Actor input object example

```json
{
  "domains": [
    "basecamp.com",
    "https://www.gatsbyjs.com"
  ],
  "maxItems": 100,
  "maxCostPerRunUsd": 5,
  "fullSync": false
}
````

# Actor output Schema

## `results` (type: `string`):

Give an AI agent a domain and get a dense structured company profile back — normalized industry, AI summary, products, canonical socials, logo, tech stack, and location. Built MCP-first for agents, with a hard cost cap.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "domains": [],
    "maxItems": 100,
    "maxCostPerRunUsd": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("hamzatrq/company-profile-mcp").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "domains": [],
    "maxItems": 100,
    "maxCostPerRunUsd": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("hamzatrq/company-profile-mcp").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "domains": [],
  "maxItems": 100,
  "maxCostPerRunUsd": 5
}' |
apify call hamzatrq/company-profile-mcp --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=hamzatrq/company-profile-mcp",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Company Profile Enrichment MCP — Domain to Data",
        "description": "Give an AI agent a domain and get a clean structured company profile back — description, contact emails, social links, and technology signals. Built MCP-first for agents, with a hard cost cap.",
        "version": "0.0",
        "x-build-id": "Arcfpz0PkfABoif6V"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/hamzatrq~company-profile-mcp/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-hamzatrq-company-profile-mcp",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/hamzatrq~company-profile-mcp/runs": {
            "post": {
                "operationId": "runs-sync-hamzatrq-company-profile-mcp",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/hamzatrq~company-profile-mcp/run-sync": {
            "post": {
                "operationId": "run-sync-hamzatrq-company-profile-mcp",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "domains": {
                        "title": "Company domains",
                        "type": "array",
                        "description": "One or more company domains to enrich (bare host or full URL). The homepage HTML is fetched and a structured profile is extracted. Leave empty for a zero-config demo run on a known company domain.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxItems": {
                        "title": "Max companies per run",
                        "type": "integer",
                        "description": "Upper bound on the number of company profiles returned per run. Lower it to keep runs cheap; remove it to enrich every domain you pass.",
                        "default": 100
                    },
                    "maxCostPerRunUsd": {
                        "title": "Max cost per run (USD)",
                        "type": "integer",
                        "description": "Hard ceiling on spend per run — the run stops before exceeding it, so you are never surprised by the bill.",
                        "default": 5
                    },
                    "aiModel": {
                        "title": "AI model (optional)",
                        "enum": [
                            "google/gemini-2.5-flash-lite",
                            "google/gemini-2.5-flash",
                            "openai/gpt-4.1-nano",
                            "openai/gpt-4.1-mini",
                            "deepseek/deepseek-chat"
                        ],
                        "type": "string",
                        "description": "Which cheap LLM powers the AI fields (industry, products, summary). Leave blank to use the actor default. Requires the operator's AI_API_KEY to be configured."
                    },
                    "fullSync": {
                        "title": "Full sync (re-scrape everything)",
                        "type": "boolean",
                        "description": "By default this runs as an incremental monitor: a repeat run emits only NEW or CHANGED records (and bills only for those). Turn this on to re-emit the entire current dataset every run — the one-off scraper / full-export use case.",
                        "default": false
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
