# Vietnam Business Directory Scraper (`crawlerbros/vietnam-business-directory-scraper`) Actor

Scrape Vietnam's largest B2B business directory (Trang Vàng Việt Nam / Yellow Pages Vietnam) - search 250,000+ companies by keyword, industry, or province, with contact details, tax ID, founding year, employee count, product catalog and images.

- **URL**: https://apify.com/crawlerbros/vietnam-business-directory-scraper.md
- **Developed by:** [Crawler Bros](https://apify.com/crawlerbros) (community)
- **Categories:** Lead generation, Automation, E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#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

## Vietnam Business Directory Scraper

Scrape Vietnam's largest B2B business directory, Trang Vàng Việt Nam (Yellow Pages Vietnam) — 250,000+ companies across 3,400+ industries and all 63 provinces/cities. Search by keyword, browse an industry category, browse every business in a province, or fetch specific business profiles by URL. Get contact details, tax ID, founding year, employee count, product catalog, and product/company photos. No login, no cookies, no proxy required.

### What this actor does

- **Four modes:** `search` (keyword + optional province), `byCategory` (browse an industry), `byProvince` (browse a whole province), `byListingUrls` (direct profile fetch)
- **All 63 Vietnamese provinces/cities** available as a dropdown filter
- **Optional full-profile enrichment** — tax ID, founding year, employee count, business type, full product catalog, image gallery, and contact person, with one extra request per result
- **Data-quality filters** — skip businesses flagged by the site itself as outdated, or keep only "verified" (self-confirmed) businesses
- **Empty fields are always omitted** — no null/blank/placeholder values in the output

### Output per business

- `businessName`, `englishName` *(full profile only)*
- `industry`, `categories[]` *(full profile only — every industry tag)*
- `address`, `province`
- `phone`, `hotline`, `zaloUrl`, `email`, `website`
- `logoUrl`, `imageUrls[]`, `imageGallery[]` *(full profile only — with captions)*
- `description`, `fullDescription` *(full profile only — untruncated)*
- `taxId`, `foundingYear`, `employeeRange`, `businessType` *(full profile only)*
- `contactPersonName`, `contactPersonRole` *(full profile only)*
- `products[]` *(full profile only — product/service catalog with links)*
- `englishProfileUrl` *(full profile only, when the business has an English-language profile)*
- `isSponsored`, `isVerified`, `isOutdated`, `lastUpdatedDate`
- `sourceUrl`, `listingId`
- `recordType: "business"`, `scrapedAt`

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | select | `search` | `search` / `byCategory` / `byProvince` / `byListingUrls` |
| `searchQuery` | string | – | Industry, product/service, or company name (required for `search`; optional for `byProvince`) |
| `province` | select | `(none)` | One of 63 Vietnamese provinces/cities (required for `byProvince`; optional refinement elsewhere) |
| `categoryUrl` | string | – | Full category page URL (mode=`byCategory`) — find one via [the site's A-Z industry index](https://trangvangvietnam.com/findex) |
| `listingUrls` | array | – | Full business profile URLs to fetch directly (mode=`byListingUrls`) |
| `fetchFullProfile` | boolean | `false` | Fetch each business's own profile page for the extra fields listed above |
| `verifiedOnly` | boolean | `false` | Only keep businesses carrying the site's "verified" badge |
| `excludeOutdated` | boolean | `false` | Skip listings the site flags as no-longer-accurate |
| `maxItems` | integer | `30` | Hard cap on emitted records (1–500) |

#### Example: search an industry in one city

```json
{
  "mode": "search",
  "searchQuery": "công ty may mặc",
  "province": "Hà Nội",
  "maxItems": 50
}
```

#### Example: browse an entire industry category with full profiles

```json
{
  "mode": "byCategory",
  "categoryUrl": "https://trangvangvietnam.com/categories/152060/co-khi--gia-cong-va-che-tao.html",
  "fetchFullProfile": true,
  "maxItems": 100
}
```

#### Example: every business registered in a province

```json
{
  "mode": "byProvince",
  "province": "Tp. Đà Nẵng",
  "maxItems": 200
}
```

#### Example: fetch specific business profiles

```json
{
  "mode": "byListingUrls",
  "listingUrls": [
    "https://trangvangvietnam.com/listings/1187701125/prosteel-techno-viet-nam-cong-ty-tnhh-prosteel-techno-viet-nam.html"
  ]
}
```

### Use cases

- **Supplier sourcing** — find manufacturers, distributors, or service providers by industry and province before reaching out
- **Market research** — measure supplier density and coverage for an industry across Vietnam
- **Sales & lead generation** — build a contact list of businesses (phone, email, website) filtered by category and location
- **Company enrichment** — pull tax ID, founding year, and employee-count bands for businesses you already have URLs for
- **Competitive analysis** — pull an entire industry category's product catalogs and photos

### FAQ

**What's Trang Vàng Việt Nam?** Vietnam's long-running B2B yellow-pages directory (operating since 2008), listing 250,000+ businesses across 3,400+ industry categories and every province/city.

**Do I need an API key, login, or proxy?** No — the actor reads the site's public pages directly with no authentication and no proxy.

**What's the difference between `search` and `byProvince`?** `search` requires a keyword and treats province as an optional refinement. `byProvince` browses every business registered in a province, with no keyword required.

**What does "verified" mean?** A green "Xác thực" badge the site shows when a business has confirmed its own tax ID and registration details directly with Trang Vàng — not a quality or trust rating.

**What does "outdated" mean, and why would I want to exclude it?** The site itself flags some older listings as "no longer accurate" (contact details may be stale). Set `excludeOutdated: true` to skip these.

**Why are some fields (tax ID, founding year, product catalog) only present sometimes?** Those come from each business's own profile page, which is only fetched when `fetchFullProfile` is `true` (or always, for `byListingUrls`). Turning it on adds one extra request per result.

**Why do some businesses have no `phone` or `email`?** Not every listing supplies contact details, and the actor never fabricates placeholder values — a missing field means the business genuinely didn't provide it (or the listing is flagged outdated with stale contact info).

**Can I find a `categoryUrl` for `byCategory` mode?** Yes — browse [trangvangvietnam.com/findex](https://trangvangvietnam.com/findex) (A–Z industry index) on the site, open any category, and copy its URL.

**How fresh is the data?** Businesses update their own listings continuously; the actor always reads the live page at run time.

**Why does a `sourceUrl` sometimes show a brief "Checking your browser" page when I click it?** trangvangvietnam.com sits behind Cloudflare, which occasionally shows a one-time automated browser check to visitors whose IP has a lower reputation score (e.g. some VPN/hosting ranges). This resolves automatically in a normal browser and does not affect the actor's own scraping, which runs from a clean IP pool and is unaffected.

# Actor input Schema

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

What to fetch.

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

Industry, product/service, or company name to search for. Required for mode=search. Optional for mode=byProvince (defaults to browsing all businesses in the selected province).

## `province` (type: `string`):

Filter results to one Vietnamese province/city. Required for mode=byProvince. Optional refinement for mode=search and mode=byCategory.

## `categoryUrl` (type: `string`):

Full trangvangvietnam.com category page URL. Find one via the site's A-Z industry index at trangvangvietnam.com/findex, e.g. https://trangvangvietnam.com/categories/152060/co-khi--gia-cong-va-che-tao.html

## `listingUrls` (type: `array`):

Full trangvangvietnam.com/listings/... business profile URLs to fetch directly with full profile detail.

## `fetchFullProfile` (type: `boolean`):

For search/byCategory/byProvince modes: fetch each business's own profile page for extra fields (tax ID, founding year, employee count, business type, full description, product catalog, image gallery, contact person). Adds one extra request per result. Always on for mode=byListingUrls.

## `verifiedOnly` (type: `boolean`):

Only keep businesses that carry the site's "Xác thực" (verified) badge, meaning the business confirmed its own registration details.

## `excludeOutdated` (type: `boolean`):

Skip listings the site itself flags as "Thông tin này đã không còn chính xác" (information no longer accurate).

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

Hard cap on emitted business records.

## Actor input object example

```json
{
  "mode": "search",
  "searchQuery": "công ty may mặc",
  "province": "Hà Nội",
  "categoryUrl": "https://trangvangvietnam.com/categories/152060/co-khi--gia-cong-va-che-tao.html",
  "listingUrls": [
    "https://trangvangvietnam.com/listings/1187701125/prosteel-techno-viet-nam-cong-ty-tnhh-prosteel-techno-viet-nam.html"
  ],
  "fetchFullProfile": false,
  "verifiedOnly": false,
  "excludeOutdated": false,
  "maxItems": 20
}
```

# Actor output Schema

## `businesses` (type: `string`):

Dataset containing all scraped business records.

# 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 = {
    "mode": "search",
    "searchQuery": "công ty may mặc",
    "province": "Hà Nội",
    "categoryUrl": "https://trangvangvietnam.com/categories/152060/co-khi--gia-cong-va-che-tao.html",
    "listingUrls": [
        "https://trangvangvietnam.com/listings/1187701125/prosteel-techno-viet-nam-cong-ty-tnhh-prosteel-techno-viet-nam.html"
    ],
    "fetchFullProfile": false,
    "verifiedOnly": false,
    "excludeOutdated": false,
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/vietnam-business-directory-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 = {
    "mode": "search",
    "searchQuery": "công ty may mặc",
    "province": "Hà Nội",
    "categoryUrl": "https://trangvangvietnam.com/categories/152060/co-khi--gia-cong-va-che-tao.html",
    "listingUrls": ["https://trangvangvietnam.com/listings/1187701125/prosteel-techno-viet-nam-cong-ty-tnhh-prosteel-techno-viet-nam.html"],
    "fetchFullProfile": False,
    "verifiedOnly": False,
    "excludeOutdated": False,
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("crawlerbros/vietnam-business-directory-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 '{
  "mode": "search",
  "searchQuery": "công ty may mặc",
  "province": "Hà Nội",
  "categoryUrl": "https://trangvangvietnam.com/categories/152060/co-khi--gia-cong-va-che-tao.html",
  "listingUrls": [
    "https://trangvangvietnam.com/listings/1187701125/prosteel-techno-viet-nam-cong-ty-tnhh-prosteel-techno-viet-nam.html"
  ],
  "fetchFullProfile": false,
  "verifiedOnly": false,
  "excludeOutdated": false,
  "maxItems": 20
}' |
apify call crawlerbros/vietnam-business-directory-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,crawlerbros/vietnam-business-directory-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/ltiI18vi37Fzl2rRw/builds/XYism4J2ftNUzkhCl/openapi.json
