# Manta Company Directory Scraper (`codingfrontend/manta-company-scraper`) Actor

Scrapes company profiles from Manta.com including business name, category, location, phone, website, employee count, annual revenue, years in business, description, and products/services. Supports search and direct URL modes with pagination.

- **URL**: https://apify.com/codingfrontend/manta-company-scraper.md
- **Developed by:** [Coding Frontned](https://apify.com/codingfrontend) (community)
- **Categories:** Developer tools, Lead generation, Automation
- **Stats:** 1 total users, 0 monthly users, 93.1% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Manta Company Directory Scraper

Collects complete public company records from Manta.com. The local implementation supports Manta search/category pages and explicit company profile URLs, then normalizes contact, location, category, and source fields into the default dataset.

### What this Actor does

- Searches Manta with a business query and location, using a known category path when one is available.
- Opens validated Manta company profile URLs in company URL mode.
- Extracts company name, profile URL, phone, address, city, state, ZIP code, website, email, description, categories, services, verification flag, and review count when present.
- Applies a browser fingerprint and stops without writing sparse placeholder rows when the page is blocked or required company fields are missing.
- Verifies each search result against the requested city/state/ZIP text before emitting it, because Manta can ignore its own location query parameter.

Manta commonly rejects direct datacenter requests. The Actor supports Apify Proxy and custom proxy input, detects explicit blocks, and fails without emitting placeholder rows when no real company record can be extracted.

The implementation keeps the entrypoint small. Crawler construction, run orchestration, route handlers, browser extraction, normalization, filtering, diagnostics, input validation, and URL utilities live in separate modules under `src/`.

### Input

#### Search mode

```json
{
  "mode": "search",
  "searchQuery": "restaurant",
  "location": "New York",
  "maxItems": 25,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

searchQuery and location are required in search mode. Common category terms such as restaurant, plumber, dentist, lawyer, hotel, and real estate use the corresponding Manta category URL; other terms use Manta search.

#### Company URL mode

```json
{
  "mode": "companyUrl",
  "startUrls": [
    {
      "url": "https://www.manta.com/c/m2-example/example-company"
    }
  ],
  "maxItems": 10
}
```

Only HTTPS Manta company profile URLs with a /c/ path are accepted. maxItems defaults to 50 and can be set from 1 to 1,000.

### Output

Each dataset item is a complete normalized company record. Required output fields include position, companyId, name, url, phone, city, state, source URLs, extraction metadata, and scrapedAt. Optional fields are omitted when Manta does not expose them.

```json
{
  "position": 1,
  "companyId": "m2-example",
  "name": "Example Restaurant",
  "url": "https://www.manta.com/c/m2-example/example-restaurant",
  "phone": "(212) 555-0100",
  "city": "New York",
  "state": "NY",
  "categories": [
    "Restaurants"
  ],
  "sourceDomain": "manta.com",
  "extractionMethod": "manta-business-card-dom",
  "proxyConfigured": false,
  "fingerprintApplied": true,
  "scrapedAt": "2026-08-16T10:00:00.000Z"
}
```

The output schema and dataset view are available in the .actor directory. rawListing preserves the extracted listing object for troubleshooting.

### Storage

- Dataset: normalized company records.
- Key-value store: optional debug\_html and debug\_screenshot records when an Apify-hosted run receives an empty or blocked page.

### Local verification

```bash
npm install
npm test
npm run lint
apify validate-schema
apify run --purge --input '{"mode":"search","searchQuery":"restaurant","location":"New York","maxItems":5}'
```

### Cost and limits

The Actor has no external API fee, but Apify compute and proxy charges can still apply according to your account. Direct Manta access is not guaranteed, and the implementation intentionally avoids fabricating records when required fields cannot be extracted.

### FAQ

#### Does this Actor find verified email addresses?

No. It only returns an email when a public Manta profile exposes a mail link.

#### Can I provide an Apify proxy?

Yes. Set proxyConfiguration using the standard Apify proxy editor. Proxy use is optional but recommended when direct access receives HTTP 403 or a Cloudflare challenge.

#### Why did a run return no items?

Manta may have blocked the request, changed its markup, or returned cards that do not contain the required company identity, location, and phone fields. In an Apify-hosted run, inspect the optional diagnostic records when they were captured.

#### Does it scrape private data?

No. It is intended for publicly visible Manta pages and does not bypass authentication or access controls.

### Disclaimer

Use this Actor only where you have a lawful basis to collect and use the data. Respect Manta terms, robots directives, rate limits, privacy requirements, and applicable law.

# Actor input Schema

## `mode` (type: `string`):

Search mode builds a Manta category/search URL. Company URL mode opens the supplied profile URLs.

## `searchQuery` (type: `string`):

Business type, category, or keyword. Required in search mode.

## `location` (type: `string`):

City, state, or other location text used by Manta. Required in search mode.

## `startUrls` (type: `array`):

HTTPS Manta profile URLs such as https://www.manta.com/c/m2-example/example-company. Required in companyUrl mode.

## `maxItems` (type: `integer`):

Maximum number of complete company records to push to the dataset.

## `proxyConfiguration` (type: `object`):

Optional Apify Proxy or custom proxy configuration. Recommended when Manta rejects the direct connection.

## Actor input object example

```json
{
  "mode": "search",
  "searchQuery": "restaurant",
  "location": "New York",
  "maxItems": 50
}
```

# Actor output Schema

## `dataset` (type: `string`):

Normalized Manta company records.

## `summary` (type: `string`):

Bounded result counts, proxy status, and any terminal source failure.

## `debug_html` (type: `string`):

Captured blocked or empty-result page HTML, when available.

## `debug_screenshot` (type: `string`):

Captured blocked or empty-result page screenshot, when available.

# 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 = {
    "searchQuery": "restaurant",
    "location": "New York"
};

// Run the Actor and wait for it to finish
const run = await client.actor("codingfrontend/manta-company-scraper").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 = {
    "searchQuery": "restaurant",
    "location": "New York",
}

# Run the Actor and wait for it to finish
run = client.actor("codingfrontend/manta-company-scraper").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 '{
  "searchQuery": "restaurant",
  "location": "New York"
}' |
apify call codingfrontend/manta-company-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,codingfrontend/manta-company-scraper"
        }
    }
}

```

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/rV0gsztjlpq33oYH7/builds/0ZFeOOPovvz2X3zzD/openapi.json
