{
  "openapi": "3.0.1",
  "info": {
    "title": "Vietnam Business Directory Scraper",
    "description": "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.",
    "version": "1.0",
    "x-build-id": "XYism4J2ftNUzkhCl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~vietnam-business-directory-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-vietnam-business-directory-scraper",
        "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/crawlerbros~vietnam-business-directory-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-vietnam-business-directory-scraper",
        "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/crawlerbros~vietnam-business-directory-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-vietnam-business-directory-scraper",
        "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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "byCategory",
              "byProvince",
              "byListingUrls"
            ],
            "type": "string",
            "description": "What to fetch.",
            "default": "search"
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "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).",
            "default": "công ty may mặc"
          },
          "province": {
            "title": "Province / city",
            "enum": [
              "",
              "An Giang",
              "Bà Rịa-Vũng Tàu",
              "Bạc Liêu",
              "Bắc Cạn",
              "Bắc Giang",
              "Bắc Ninh",
              "Bến Tre",
              "Bình Định",
              "Bình Dương",
              "Bình Phước",
              "Bình Thuận",
              "Cà Mau",
              "Cao Bằng",
              "Đắk Lắk",
              "Đắk Nông",
              "Điện Biên",
              "Đồng Nai",
              "Đồng Tháp",
              "Gia Lai",
              "Hà Giang",
              "Hà Nam",
              "Hà Nội",
              "Hà Tĩnh",
              "Hải Dương",
              "Hậu Giang",
              "Hòa Bình",
              "Hưng Yên",
              "Khánh Hòa",
              "Kiên Giang",
              "Kon Tum",
              "Lai Châu",
              "Lâm Đồng",
              "Lạng Sơn",
              "Lào Cai",
              "Long An",
              "Nam Định",
              "Nghệ An",
              "Ninh Bình",
              "Ninh Thuận",
              "Phú Thọ",
              "Phú Yên",
              "Quảng Bình",
              "Quảng Nam",
              "Quảng Ngãi",
              "Quảng Ninh",
              "Quảng Trị",
              "Sóc Trăng",
              "Sơn La",
              "Tây Ninh",
              "Thái Bình",
              "Thái Nguyên",
              "Thanh Hóa",
              "Thừa Thiên Huế",
              "Tiền Giang",
              "Tp. Đà Nẵng",
              "TP. Cần Thơ",
              "TP. Hải Phòng",
              "TP. Hồ Chí Minh (TPHCM)",
              "Trà Vinh",
              "Tuyên Quang",
              "Vĩnh Long",
              "Vĩnh Phúc",
              "Yên Bái"
            ],
            "type": "string",
            "description": "Filter results to one Vietnamese province/city. Required for mode=byProvince. Optional refinement for mode=search and mode=byCategory.",
            "default": "Hà Nội"
          },
          "categoryUrl": {
            "title": "Category URL (mode=byCategory)",
            "type": "string",
            "description": "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",
            "default": "https://trangvangvietnam.com/categories/152060/co-khi--gia-cong-va-che-tao.html"
          },
          "listingUrls": {
            "title": "Listing URLs (mode=byListingUrls)",
            "type": "array",
            "description": "Full trangvangvietnam.com/listings/... business profile URLs to fetch directly with full profile detail.",
            "default": [
              "https://trangvangvietnam.com/listings/1187701125/prosteel-techno-viet-nam-cong-ty-tnhh-prosteel-techno-viet-nam.html"
            ],
            "items": {
              "type": "string"
            }
          },
          "fetchFullProfile": {
            "title": "Fetch full business profile",
            "type": "boolean",
            "description": "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.",
            "default": false
          },
          "verifiedOnly": {
            "title": "Verified businesses only",
            "type": "boolean",
            "description": "Only keep businesses that carry the site's \"Xác thực\" (verified) badge, meaning the business confirmed its own registration details.",
            "default": false
          },
          "excludeOutdated": {
            "title": "Exclude flagged-outdated listings",
            "type": "boolean",
            "description": "Skip listings the site itself flags as \"Thông tin này đã không còn chính xác\" (information no longer accurate).",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Hard cap on emitted business records.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}