# AI Table Enricher: Enrich Spreadsheets and Classify Leads (`datatools-ai/ai-table-enricher`) Actor

Enrich a spreadsheet with AI. Classify leads, extract fields, score ICP fit, summarize or translate rows in a CSV, Google Sheet or dataset. No OpenAI key needed. $0.003 per enriched row (100 rows = $0.30).

- **URL**: https://apify.com/datatools-ai/ai-table-enricher.md
- **Developed by:** [DataTools AI](https://apify.com/datatools-ai) (community)
- **Categories:** AI, Lead generation, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 row enricheds

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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## AI Table Enricher: Enrich Spreadsheets and Classify Leads

| You give | You get | Cost |
|---|---|---|
| Rows as JSON, a CSV / Google Sheets link or any Apify dataset + plain-English column instructions | The same rows with new AI columns (text, enum, number or boolean) – e.g. industry, lead score, sentiment, city, summary, translation | **$0.003 per enriched row** (100 rows = **$0.30** + $0.001 start). No OpenAI key needed. Failed rows are free. |

👉 Press **Start** to try the prefilled example (12 companies → industry, city, B2B flag, lead score and fit reason, **≈ $0.037**).

**Enrich a spreadsheet with AI in minutes.** Give the Actor your rows (JSON, a CSV / Google Sheets link, or the dataset of another Apify Actor), describe each new column in plain English, and get back every row enriched by an LLM (OpenAI GPT-4o mini). No OpenAI account or API key needed – you pay only per enriched row.

Use it to **classify leads with AI**, add firmographic fields, extract cities from addresses, score ICP fit, tag reviews, summarize text or translate columns in spreadsheets, CRM exports and scraped data you already have.

### Use cases

- **Classify leads with AI** — industry, B2B vs B2C, and a 1–10 ICP fit score on a company or lead list.
- **Enrich a spreadsheet with AI** — pull a city out of an address, add a one-line summary, or normalize messy labels.
- **Tag reviews or tickets** — sentiment, topic or language on a CSV of text you already have.
- **Translate or rewrite** — product titles, descriptions or short blurbs into another language.
- **Follow a scrape** — pass the dataset ID of another Apify run and add structured AI columns before you export.

### What can it do?

| Example column | Instruction you write | Type |
|---|---|---|
| `industry` | "Classify the company's industry" | enum (your categories) |
| `city` | "Extract the city from the address" | text |
| `sentiment` | "Sentiment of the review" | enum: positive / neutral / negative |
| `is_b2b` | "Does the company mainly sell to businesses?" | boolean |
| `lead_score` | "Score 1–10 how well this company fits a B2B SaaS ICP" | number |
| `summary` | "Write a 1-line summary" | text |
| `title_en` | "Translate the product title to English" | text |

- ✅ **Any instruction, any language** – classify, categorize, extract, normalize, score, summarize, translate.
- ✅ **Structured output** – enum, number, boolean or text columns, validated with JSON Schema (no messy free text).
- ✅ **Many input sources** – JSON array, CSV URL (Google Sheets "Publish to web" → CSV), or any Apify dataset ID.
- ✅ **Fast** – rows are batched and processed in parallel (output stays in the original row order).
- ✅ **Privacy controls** – send only selected fields to the AI with `inputFields`.
- ✅ **Export anywhere** – download as CSV, Excel, JSON, or push to Google Sheets, Make, Zapier, n8n via Apify integrations and API.

### How to use

1. Click **Try for free** – the input is prefilled with an example (12 companies, 5 new columns). Just press **Start**.
2. Replace the example with your own rows, CSV URL or dataset ID (use only one source).
3. Edit **New columns to add**: one object per column:

```json
[
  { "name": "industry", "instruction": "Classify the company's industry", "type": "enum",
    "options": ["Software", "Retail", "Healthcare", "Manufacturing", "Other"] },
  { "name": "city", "instruction": "Extract the city from the address", "type": "text" },
  { "name": "lead_score", "instruction": "Score 1–10 how well this company fits a B2B SaaS ICP", "type": "number" }
]
```

4. Run and download the enriched table from the **Output** tab.

### Input example

```json
{
  "csvUrl": "https://docs.google.com/spreadsheets/d/e/.../pub?output=csv",
  "columns": [
    { "name": "sentiment", "instruction": "Sentiment of the review text", "type": "enum", "options": ["positive", "neutral", "negative"] },
    { "name": "topic", "instruction": "Main topic of the review in 1-3 words", "type": "text" }
  ],
  "inputFields": ["review_text"],
  "extraContext": "If the review is empty, return null."
}
```

### Output example (real run)

Each input row is returned with the new AI columns merged in, in the same order as the input. This is a real result from the prefilled 12-company example (industry, city, B2B flag, lead score, fit reason). Four of the 12 rows:

```json
[
  {
    "company": "Stripe",
    "website": "stripe.com",
    "description": "Online payment processing platform for internet businesses.",
    "address": "354 Oyster Point Blvd, South San Francisco, CA 94080, USA",
    "industry": "Fintech",
    "city": "South San Francisco",
    "is_b2b": true,
    "lead_score": 9,
    "fit_reason": "Strong fit as a payment processing platform for businesses."
  },
  {
    "company": "Rappi",
    "website": "rappi.com",
    "description": "Latin American on-demand delivery app for food, groceries and pharmacy.",
    "address": "Calle 93 #19-58, Bogotá, Colombia",
    "industry": "Food & Beverage",
    "city": "Bogotá",
    "is_b2b": false,
    "lead_score": 2,
    "fit_reason": "Primarily a consumer-focused delivery service."
  },
  {
    "company": "Deloitte",
    "website": "deloitte.com",
    "description": "Professional services network providing audit, consulting, tax and advisory services.",
    "address": "1 New Street Square, London EC4A 3HQ, United Kingdom",
    "industry": "Professional Services",
    "city": "London",
    "is_b2b": true,
    "lead_score": 9,
    "fit_reason": "Offers consulting and advisory services to businesses."
  },
  {
    "company": "Duolingo",
    "website": "duolingo.com",
    "description": "Language-learning app with gamified lessons in 40+ languages.",
    "address": "5900 Penn Ave, Pittsburgh, PA 15206, USA",
    "industry": "Education",
    "city": "Pittsburgh",
    "is_b2b": false,
    "lead_score": 4,
    "fit_reason": "Primarily a consumer-focused language-learning app."
  }
]
```

Download the full table as JSON, CSV or Excel from the Output tab. A `RUN_SUMMARY` record in the key-value store shows rows processed, failures and token usage. Lead scores and industry labels are model assistance — spot-check important fields before you treat them as a system of record.

### Pricing

Pay per result. AI model costs are included – no OpenAI key needed. Failed rows are not charged. Set a maximum cost per run in the run options to stay in control.

| What you run | You pay |
|---|---|
| Actor start (once per run) | $0.001 |
| 1 enriched row | $0.003 |
| **100 rows** | **$0.30 + $0.001 start = $0.301** |
| 1,000 rows | $3.00 + $0.001 start = $3.001 |
| Prefill example (12 rows, 5 columns) | ≈ $0.037 |

### For AI agents (Apify MCP)

**Purpose:** Add structured AI columns (classify, extract, summarize, score, translate) to a table the user already has. Use it to enrich a spreadsheet with AI or classify leads with AI.

**Call when:** The user has rows/CSV/a dataset and wants new fields described in plain language.

**Do not use for:** Fetching or scraping new web pages (no URL crawler lives here).

**Inputs:** Provide exactly one of `rows` (JSON array), `csvUrl`, or `datasetId`. Always set `columns` as `[{name, instruction, type, options?}]` with type = text, enum, number or boolean. Optional: `inputFields`, `extraContext`, `maxRows`.

**Output fields:** Every original field (unless `keepOriginalFields` is false) plus one field per column you defined, in the original row order. Enum/number/boolean values are validated; unknown values are `null`.

**Cost:** $0.003 × enriched rows + $0.001 start.

### Tips

- Clear, specific instructions and enum options give the most consistent results.
- Use `inputFields` to send only the relevant columns – faster and more private.
- Use `maxRows` to test on a few rows before enriching a large file.
- Very long text fields are truncated to 3,000 characters per field before being sent to the AI.
- LLM answers can be wrong; spot-check important fields. Unknown values are returned as `null` instead of guessed.

### Data privacy

Row data (only the fields you select) is sent to the **OpenAI API** for processing. According to OpenAI's policy, data sent through the API is **not used to train their models by default** and is retained for up to 30 days for abuse monitoring. Do not send data you are not allowed to share with a third-party processor. This Actor does not store your data outside your own Apify storage.

### FAQ

**Can I use it with Google Sheets?** Yes – publish the sheet as CSV and paste the link in *CSV URL*, then export results back with the Apify Google Sheets integration.

**Can I enrich the results of another scraper?** Yes – paste the dataset ID of that run in *Apify dataset ID*.

**Which languages are supported?** Any language the model understands, for both input and instructions.

### More AI tools from DataTools AI

- [Review Insights AI](https://apify.com/datatools-ai/review-insights-ai) – AI analysis of reviews you already have: sentiment, complaints, praise and reply templates.
- [App Store Official Feeds](https://apify.com/datatools-ai/app-store-official-feeds) – iOS app details, recent reviews and top charts from Apple's official feeds, with no HTML scraping.
- [Career Site Jobs API + AI Hiring Signals](https://apify.com/datatools-ai/career-site-jobs-hiring-signals) – official ATS APIs (Greenhouse, Lever, Ashby and more) plus AI hiring-signals summaries.
- [AI Ad Strategy Report from Meta Ad Library Ads](https://apify.com/datatools-ai/ad-library-ai-strategy-report) – AI strategy report from Meta Ad Library ads you provide (hooks, offers, 5 ideas).
- [Company Profile from Domain](https://apify.com/datatools-ai/company-profile-from-domain) – structured firmographics from a company's own public website (industry, products, HQ, socials and tech stack).
- [AI Web Data Extractor](https://apify.com/datatools-ai/ai-web-data-extractor) – extract structured JSON from public web pages you provide, with fields described in plain language.

***

### 🇪🇸 En español: Enriquecedor de tablas con IA

**Enriquece una hoja de cálculo con IA y clasifica leads.** Agrega columnas generadas con IA a cualquier tabla: clasificar industria, extraer la ciudad, marcar B2B, puntuar el encaje con un ICP, resumir o traducir filas de un JSON, un CSV / Google Sheets o un dataset de Apify. Escribe la instrucción de cada columna en español o inglés y recibe tu tabla enriquecida, en el mismo orden. Sin cuenta de OpenAI: **$0.003 por fila enriquecida** (100 filas = **$0.30** + $0.001 de arranque). Los datos se procesan con la API de OpenAI, que por defecto no usa los datos de la API para entrenar sus modelos.

# Actor input Schema

## `rows` (type: `array`):

Your table as a JSON array of objects, one object per row. Example: \[{"company":"Stripe","website":"stripe.com","description":"Payments API"}]. Leave empty if you set csvUrl or datasetId instead. Do not send passwords or personal data you are not allowed to process.

## `csvUrl` (type: `string`):

Public URL of a CSV file with a header row. Google Sheets: File → Share → Publish to web → CSV link. Leave empty if you use rows or datasetId.

## `datasetId` (type: `string`):

Dataset ID (or resource picker) of another Actor run to enrich, e.g. a public-data scrape you already ran. Leave empty if you use rows or csvUrl.

## `columns` (type: `array`):

New AI columns to add. Each item: {"name":"industry","instruction":"Classify the company's industry","type":"enum","options":\["Software","Retail","Other"]}. type is one of text | enum | number | boolean. options is required only for enum. Use this to classify leads with AI, extract fields, score ICP fit, summarize or translate. If both rows and columns are empty, a built-in example runs.

## `inputFields` (type: `array`):

Optional allow-list of input field names the model may see, e.g. \["company","description"]. Empty = all fields. Use this to cut cost and avoid sending sensitive columns.

## `extraContext` (type: `string`):

Optional rules applied to every column, e.g. 'Answer in Spanish' or 'If unsure, return null'.

## `model` (type: `string`):

OpenAI model used for enrichment. gpt-4o-mini (default) is fast and accurate for classify/extract; gpt-4.1-mini is stronger for nuanced tasks. The price per row is the same.

## `batchSize` (type: `integer`):

How many rows are sent in one model call. Default is fine for most tables.

## `concurrency` (type: `integer`):

How many model requests run at the same time.

## `maxRows` (type: `integer`):

Optional cap on rows processed and charged. Tip: test instructions on the first 20 rows, then run the full table.

## `keepOriginalFields` (type: `boolean`):

If true (default), each output row is the original object plus the new AI columns. If false, only the new columns and a row index are returned.

## Actor input object example

```json
{
  "rows": [
    {
      "company": "Stripe",
      "website": "stripe.com",
      "description": "Online payment processing platform for internet businesses.",
      "address": "354 Oyster Point Blvd, South San Francisco, CA 94080, USA"
    },
    {
      "company": "Bimbo",
      "website": "grupobimbo.com",
      "description": "Multinational bakery products manufacturer with brands like Bimbo, Marinela and Sara Lee.",
      "address": "Prolongación Paseo de la Reforma 1000, Santa Fe, 01210 Ciudad de México, CDMX"
    },
    {
      "company": "Shopify",
      "website": "shopify.com",
      "description": "Commerce platform that lets anyone start, manage and grow an online store.",
      "address": "151 O'Connor St, Ottawa, ON K2P 2L8, Canada"
    },
    {
      "company": "Mayo Clinic",
      "website": "mayoclinic.org",
      "description": "Nonprofit academic medical center focused on patient care, research and education.",
      "address": "200 First St SW, Rochester, MN 55905, USA"
    },
    {
      "company": "Siemens",
      "website": "siemens.com",
      "description": "Technology company focused on industry, infrastructure, mobility and healthcare.",
      "address": "Werner-von-Siemens-Straße 1, 80333 München, Germany"
    },
    {
      "company": "Cemex",
      "website": "cemex.com",
      "description": "Global building materials company producing cement, ready-mix concrete and aggregates.",
      "address": "Av. Ricardo Margáin Zozaya 325, San Pedro Garza García, N.L., Mexico"
    },
    {
      "company": "Duolingo",
      "website": "duolingo.com",
      "description": "Language-learning app with gamified lessons in 40+ languages.",
      "address": "5900 Penn Ave, Pittsburgh, PA 15206, USA"
    },
    {
      "company": "Zara (Inditex)",
      "website": "inditex.com",
      "description": "Fashion retailer operating Zara, Pull&Bear, Massimo Dutti and other apparel brands.",
      "address": "Avenida de la Diputación, 15143 Arteixo, A Coruña, Spain"
    },
    {
      "company": "Airbnb",
      "website": "airbnb.com",
      "description": "Online marketplace for short-term homestays and experiences.",
      "address": "888 Brannan St, San Francisco, CA 94103, USA"
    },
    {
      "company": "Tesla",
      "website": "tesla.com",
      "description": "Designs and manufactures electric vehicles, battery storage and solar products.",
      "address": "1 Tesla Road, Austin, TX 78725, USA"
    },
    {
      "company": "Rappi",
      "website": "rappi.com",
      "description": "Latin American on-demand delivery app for food, groceries and pharmacy.",
      "address": "Calle 93 #19-58, Bogotá, Colombia"
    },
    {
      "company": "Deloitte",
      "website": "deloitte.com",
      "description": "Professional services network providing audit, consulting, tax and advisory services.",
      "address": "1 New Street Square, London EC4A 3HQ, United Kingdom"
    }
  ],
  "columns": [
    {
      "name": "industry",
      "instruction": "Classify the company's industry.",
      "type": "enum",
      "options": [
        "Software & Internet",
        "Fintech",
        "Retail & E-commerce",
        "Food & Beverage",
        "Healthcare",
        "Manufacturing & Industrial",
        "Construction & Materials",
        "Automotive",
        "Travel & Hospitality",
        "Education",
        "Professional Services",
        "Other"
      ]
    },
    {
      "name": "city",
      "instruction": "Extract the city from the address. Return only the city name.",
      "type": "text"
    },
    {
      "name": "is_b2b",
      "instruction": "True if the company mainly sells to other businesses (B2B). False if it mainly sells to consumers (B2C). Decide from the description; do not return null unless the description is missing.",
      "type": "boolean"
    },
    {
      "name": "lead_score",
      "instruction": "Score from 1 to 10 how well this company fits as a potential customer for a B2B SaaS product (data, operations or automation software). 10 is an excellent fit (mid-market or enterprise software buyer). 1 is a poor fit (pure consumer brand with no likely software-buying team).",
      "type": "number"
    },
    {
      "name": "fit_reason",
      "instruction": "One sentence in English (max 20 words) explaining the lead_score.",
      "type": "text"
    }
  ],
  "model": "gpt-4o-mini",
  "batchSize": 10,
  "concurrency": 5,
  "keepOriginalFields": true
}
```

# Actor output Schema

## `enrichedRows` (type: `string`):

Every input row with the AI-generated columns added. Download as CSV, Excel or JSON.

## `runSummary` (type: `string`):

JSON with rows processed, enriched, failed, model and token usage.

# 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 = {
    "rows": [
        {
            "company": "Stripe",
            "website": "stripe.com",
            "description": "Online payment processing platform for internet businesses.",
            "address": "354 Oyster Point Blvd, South San Francisco, CA 94080, USA"
        },
        {
            "company": "Bimbo",
            "website": "grupobimbo.com",
            "description": "Multinational bakery products manufacturer with brands like Bimbo, Marinela and Sara Lee.",
            "address": "Prolongación Paseo de la Reforma 1000, Santa Fe, 01210 Ciudad de México, CDMX"
        },
        {
            "company": "Shopify",
            "website": "shopify.com",
            "description": "Commerce platform that lets anyone start, manage and grow an online store.",
            "address": "151 O'Connor St, Ottawa, ON K2P 2L8, Canada"
        },
        {
            "company": "Mayo Clinic",
            "website": "mayoclinic.org",
            "description": "Nonprofit academic medical center focused on patient care, research and education.",
            "address": "200 First St SW, Rochester, MN 55905, USA"
        },
        {
            "company": "Siemens",
            "website": "siemens.com",
            "description": "Technology company focused on industry, infrastructure, mobility and healthcare.",
            "address": "Werner-von-Siemens-Straße 1, 80333 München, Germany"
        },
        {
            "company": "Cemex",
            "website": "cemex.com",
            "description": "Global building materials company producing cement, ready-mix concrete and aggregates.",
            "address": "Av. Ricardo Margáin Zozaya 325, San Pedro Garza García, N.L., Mexico"
        },
        {
            "company": "Duolingo",
            "website": "duolingo.com",
            "description": "Language-learning app with gamified lessons in 40+ languages.",
            "address": "5900 Penn Ave, Pittsburgh, PA 15206, USA"
        },
        {
            "company": "Zara (Inditex)",
            "website": "inditex.com",
            "description": "Fashion retailer operating Zara, Pull&Bear, Massimo Dutti and other apparel brands.",
            "address": "Avenida de la Diputación, 15143 Arteixo, A Coruña, Spain"
        },
        {
            "company": "Airbnb",
            "website": "airbnb.com",
            "description": "Online marketplace for short-term homestays and experiences.",
            "address": "888 Brannan St, San Francisco, CA 94103, USA"
        },
        {
            "company": "Tesla",
            "website": "tesla.com",
            "description": "Designs and manufactures electric vehicles, battery storage and solar products.",
            "address": "1 Tesla Road, Austin, TX 78725, USA"
        },
        {
            "company": "Rappi",
            "website": "rappi.com",
            "description": "Latin American on-demand delivery app for food, groceries and pharmacy.",
            "address": "Calle 93 #19-58, Bogotá, Colombia"
        },
        {
            "company": "Deloitte",
            "website": "deloitte.com",
            "description": "Professional services network providing audit, consulting, tax and advisory services.",
            "address": "1 New Street Square, London EC4A 3HQ, United Kingdom"
        }
    ],
    "columns": [
        {
            "name": "industry",
            "instruction": "Classify the company's industry.",
            "type": "enum",
            "options": [
                "Software & Internet",
                "Fintech",
                "Retail & E-commerce",
                "Food & Beverage",
                "Healthcare",
                "Manufacturing & Industrial",
                "Construction & Materials",
                "Automotive",
                "Travel & Hospitality",
                "Education",
                "Professional Services",
                "Other"
            ]
        },
        {
            "name": "city",
            "instruction": "Extract the city from the address. Return only the city name.",
            "type": "text"
        },
        {
            "name": "is_b2b",
            "instruction": "True if the company mainly sells to other businesses (B2B). False if it mainly sells to consumers (B2C). Decide from the description; do not return null unless the description is missing.",
            "type": "boolean"
        },
        {
            "name": "lead_score",
            "instruction": "Score from 1 to 10 how well this company fits as a potential customer for a B2B SaaS product (data, operations or automation software). 10 is an excellent fit (mid-market or enterprise software buyer). 1 is a poor fit (pure consumer brand with no likely software-buying team).",
            "type": "number"
        },
        {
            "name": "fit_reason",
            "instruction": "One sentence in English (max 20 words) explaining the lead_score.",
            "type": "text"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("datatools-ai/ai-table-enricher").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 = {
    "rows": [
        {
            "company": "Stripe",
            "website": "stripe.com",
            "description": "Online payment processing platform for internet businesses.",
            "address": "354 Oyster Point Blvd, South San Francisco, CA 94080, USA",
        },
        {
            "company": "Bimbo",
            "website": "grupobimbo.com",
            "description": "Multinational bakery products manufacturer with brands like Bimbo, Marinela and Sara Lee.",
            "address": "Prolongación Paseo de la Reforma 1000, Santa Fe, 01210 Ciudad de México, CDMX",
        },
        {
            "company": "Shopify",
            "website": "shopify.com",
            "description": "Commerce platform that lets anyone start, manage and grow an online store.",
            "address": "151 O'Connor St, Ottawa, ON K2P 2L8, Canada",
        },
        {
            "company": "Mayo Clinic",
            "website": "mayoclinic.org",
            "description": "Nonprofit academic medical center focused on patient care, research and education.",
            "address": "200 First St SW, Rochester, MN 55905, USA",
        },
        {
            "company": "Siemens",
            "website": "siemens.com",
            "description": "Technology company focused on industry, infrastructure, mobility and healthcare.",
            "address": "Werner-von-Siemens-Straße 1, 80333 München, Germany",
        },
        {
            "company": "Cemex",
            "website": "cemex.com",
            "description": "Global building materials company producing cement, ready-mix concrete and aggregates.",
            "address": "Av. Ricardo Margáin Zozaya 325, San Pedro Garza García, N.L., Mexico",
        },
        {
            "company": "Duolingo",
            "website": "duolingo.com",
            "description": "Language-learning app with gamified lessons in 40+ languages.",
            "address": "5900 Penn Ave, Pittsburgh, PA 15206, USA",
        },
        {
            "company": "Zara (Inditex)",
            "website": "inditex.com",
            "description": "Fashion retailer operating Zara, Pull&Bear, Massimo Dutti and other apparel brands.",
            "address": "Avenida de la Diputación, 15143 Arteixo, A Coruña, Spain",
        },
        {
            "company": "Airbnb",
            "website": "airbnb.com",
            "description": "Online marketplace for short-term homestays and experiences.",
            "address": "888 Brannan St, San Francisco, CA 94103, USA",
        },
        {
            "company": "Tesla",
            "website": "tesla.com",
            "description": "Designs and manufactures electric vehicles, battery storage and solar products.",
            "address": "1 Tesla Road, Austin, TX 78725, USA",
        },
        {
            "company": "Rappi",
            "website": "rappi.com",
            "description": "Latin American on-demand delivery app for food, groceries and pharmacy.",
            "address": "Calle 93 #19-58, Bogotá, Colombia",
        },
        {
            "company": "Deloitte",
            "website": "deloitte.com",
            "description": "Professional services network providing audit, consulting, tax and advisory services.",
            "address": "1 New Street Square, London EC4A 3HQ, United Kingdom",
        },
    ],
    "columns": [
        {
            "name": "industry",
            "instruction": "Classify the company's industry.",
            "type": "enum",
            "options": [
                "Software & Internet",
                "Fintech",
                "Retail & E-commerce",
                "Food & Beverage",
                "Healthcare",
                "Manufacturing & Industrial",
                "Construction & Materials",
                "Automotive",
                "Travel & Hospitality",
                "Education",
                "Professional Services",
                "Other",
            ],
        },
        {
            "name": "city",
            "instruction": "Extract the city from the address. Return only the city name.",
            "type": "text",
        },
        {
            "name": "is_b2b",
            "instruction": "True if the company mainly sells to other businesses (B2B). False if it mainly sells to consumers (B2C). Decide from the description; do not return null unless the description is missing.",
            "type": "boolean",
        },
        {
            "name": "lead_score",
            "instruction": "Score from 1 to 10 how well this company fits as a potential customer for a B2B SaaS product (data, operations or automation software). 10 is an excellent fit (mid-market or enterprise software buyer). 1 is a poor fit (pure consumer brand with no likely software-buying team).",
            "type": "number",
        },
        {
            "name": "fit_reason",
            "instruction": "One sentence in English (max 20 words) explaining the lead_score.",
            "type": "text",
        },
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("datatools-ai/ai-table-enricher").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "rows": [
    {
      "company": "Stripe",
      "website": "stripe.com",
      "description": "Online payment processing platform for internet businesses.",
      "address": "354 Oyster Point Blvd, South San Francisco, CA 94080, USA"
    },
    {
      "company": "Bimbo",
      "website": "grupobimbo.com",
      "description": "Multinational bakery products manufacturer with brands like Bimbo, Marinela and Sara Lee.",
      "address": "Prolongación Paseo de la Reforma 1000, Santa Fe, 01210 Ciudad de México, CDMX"
    },
    {
      "company": "Shopify",
      "website": "shopify.com",
      "description": "Commerce platform that lets anyone start, manage and grow an online store.",
      "address": "151 O'\''Connor St, Ottawa, ON K2P 2L8, Canada"
    },
    {
      "company": "Mayo Clinic",
      "website": "mayoclinic.org",
      "description": "Nonprofit academic medical center focused on patient care, research and education.",
      "address": "200 First St SW, Rochester, MN 55905, USA"
    },
    {
      "company": "Siemens",
      "website": "siemens.com",
      "description": "Technology company focused on industry, infrastructure, mobility and healthcare.",
      "address": "Werner-von-Siemens-Straße 1, 80333 München, Germany"
    },
    {
      "company": "Cemex",
      "website": "cemex.com",
      "description": "Global building materials company producing cement, ready-mix concrete and aggregates.",
      "address": "Av. Ricardo Margáin Zozaya 325, San Pedro Garza García, N.L., Mexico"
    },
    {
      "company": "Duolingo",
      "website": "duolingo.com",
      "description": "Language-learning app with gamified lessons in 40+ languages.",
      "address": "5900 Penn Ave, Pittsburgh, PA 15206, USA"
    },
    {
      "company": "Zara (Inditex)",
      "website": "inditex.com",
      "description": "Fashion retailer operating Zara, Pull&Bear, Massimo Dutti and other apparel brands.",
      "address": "Avenida de la Diputación, 15143 Arteixo, A Coruña, Spain"
    },
    {
      "company": "Airbnb",
      "website": "airbnb.com",
      "description": "Online marketplace for short-term homestays and experiences.",
      "address": "888 Brannan St, San Francisco, CA 94103, USA"
    },
    {
      "company": "Tesla",
      "website": "tesla.com",
      "description": "Designs and manufactures electric vehicles, battery storage and solar products.",
      "address": "1 Tesla Road, Austin, TX 78725, USA"
    },
    {
      "company": "Rappi",
      "website": "rappi.com",
      "description": "Latin American on-demand delivery app for food, groceries and pharmacy.",
      "address": "Calle 93 #19-58, Bogotá, Colombia"
    },
    {
      "company": "Deloitte",
      "website": "deloitte.com",
      "description": "Professional services network providing audit, consulting, tax and advisory services.",
      "address": "1 New Street Square, London EC4A 3HQ, United Kingdom"
    }
  ],
  "columns": [
    {
      "name": "industry",
      "instruction": "Classify the company'\''s industry.",
      "type": "enum",
      "options": [
        "Software & Internet",
        "Fintech",
        "Retail & E-commerce",
        "Food & Beverage",
        "Healthcare",
        "Manufacturing & Industrial",
        "Construction & Materials",
        "Automotive",
        "Travel & Hospitality",
        "Education",
        "Professional Services",
        "Other"
      ]
    },
    {
      "name": "city",
      "instruction": "Extract the city from the address. Return only the city name.",
      "type": "text"
    },
    {
      "name": "is_b2b",
      "instruction": "True if the company mainly sells to other businesses (B2B). False if it mainly sells to consumers (B2C). Decide from the description; do not return null unless the description is missing.",
      "type": "boolean"
    },
    {
      "name": "lead_score",
      "instruction": "Score from 1 to 10 how well this company fits as a potential customer for a B2B SaaS product (data, operations or automation software). 10 is an excellent fit (mid-market or enterprise software buyer). 1 is a poor fit (pure consumer brand with no likely software-buying team).",
      "type": "number"
    },
    {
      "name": "fit_reason",
      "instruction": "One sentence in English (max 20 words) explaining the lead_score.",
      "type": "text"
    }
  ]
}' |
apify call datatools-ai/ai-table-enricher --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,datatools-ai/ai-table-enricher"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/uLKb5Nj9EQqoiogL4/builds/Oi10X7Nzc7tb7ZDpr/openapi.json
