# Thailand Company Data — Directors, Financials & Firmographics (`foxlabs/thailand-company-data`) Actor

Look up any Thai company by 13-digit juristic ID: firmographics, 5-year financial statements (assets, revenue, net profit, equity), directors & shareholders — official DBD data as clean JSON for KYC, due diligence & B2B intelligence.

- **URL**: https://apify.com/foxlabs/thailand-company-data.md
- **Developed by:** [Berkan Kaplan](https://apify.com/foxlabs) (community)
- **Categories:** Lead generation
- **Features:** Limited permissions
- **Stats:** 51 total users, 13 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $25.00 / 1,000 company records

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

## Thailand Company Data — Juristic ID, Financials & Directors (DBD) 🇹🇭

**foXLabs Asia-Pacific company-registry series:** [Singapore](https://apify.com/foxlabs/singapore-company-data) · [Vietnam](https://apify.com/foxlabs/vietnam-company-data) · [Taiwan](https://apify.com/foxlabs/taiwan-company-data) · [South Korea](https://apify.com/foxlabs/korean-company-data) · [Australia](https://apify.com/foxlabs/australia-company-data) · [Israel](https://apify.com/foxlabs/israel-company-data)

🎉 Turn Thailand's official DBD company records into clean, structured rows — look companies up by 13-digit juristic ID or search them by name, and get the legal name in Thai and English, entity type, status, TSIC industry, capital, up to five years of financial statements and the board of directors, one row per company.
Built for KYB / KYC, due diligence, credit screening and B2B research on Thai companies.

### 🔍 What is Thailand Company Data — and when should you use it?

Give this Actor Thai **juristic IDs** (the 13-digit registration number, e.g. `0107544000108` for PTT) or **company-name keywords**, and it returns one record per company from the **Department of Business Development (DBD)**, Ministry of Commerce: identity fields from DBD's keyless OpenAPI (`openapi.dbd.go.th`), and financial statements with DBD's ratios, directors, signing authority, name and capital history and — on request — investment by nationality from each company's page on DBD's classic DataWarehouse host (`datawarehouse2.dbd.go.th`). Every run reads DBD live.

**Use it when you need:** a company profile for KYB or vendor onboarding (Thai and English legal name, entity type, status, registration date, registered address, registered and paid-up capital); several years of assets, liabilities, revenue, net profit and ratios for a credit or due-diligence screen; the current board of directors and who may sign for the company.

**Use something else when:** you need phone numbers, emails or websites — DBD's company page has a website row, but it was empty for all 16 companies in our 2026-09-26 test, PTT included — or named shareholders or English director names: DBD's public pages carry neither (the named shareholder list is a paid DBD e-Service document).

### 🤖 Use with AI agents

**Already on the Apify MCP server?** Ask for this Actor by name: `foxlabs/thailand-company-data`.

**Your agent can pay for its own runs.** This Actor is pay-per-event with agentic payments, so an agent can discover it, run it and settle the bill over **x402 (USDC on Base)** or **Skyfire** — no Apify account or API token of its own. Billing is the same either way: per delivered company record — rows that only report a failed lookup are free from 25 September 2026.

Otherwise paste this into Claude, ChatGPT, Cursor or any MCP-enabled assistant:

```
I want Thai company records from the Apify Actor `foxlabs/thailand-company-data`.
Input: `juristicIds` is a list of 13-digit Thai juristic IDs (exact match); `searchKeywords` is a list of company-name keywords searched on DBD (loose match). `includeFinancials`, `includeDirectors` and `includeShareholders` switch the data tiers, `financialYears` (1–5) sets how many years of statements, `maxResults` caps the companies.
Start with: {"juristicIds":["0107544000108","0107542000011","0107536000102"]}
Ask me what to look up, run the Actor, then summarise the rows as a table.
```

The machine-readable API, MCP config and OpenAPI definition live at `apify.com/foxlabs/thailand-company-data.md`.

### 📋 Overview

Everything you need to turn DBD company records into structured data — in one Actor, with no login, cookies or API key.

**Why teams pick this Actor:**

- ✅ **Official source** — DBD, the Ministry of Commerce department that registers Thai companies and partnerships.
- 📊 **Up to five years of financial statements** — balance sheet, income statement and DBD's 15 financial ratios per fiscal year.
- 🧑‍💼 **Board of directors** — as DBD lists them, plus the registered signing authority.
- 🛡️ **DBD's own figures** — each company's statements as its DBD page shows them. A statement that loads blank is retried, and never delivered as a charged record.
- 💰 **Pay per record** — $0.025 per delivered company record, no subscription.
- 🤖 **Agent-ready** — MCP + x402 agentic payments.

### ✨ Features

- 🔍 **Two ways in** — `juristicIds` (exact, 13 digits) or `searchKeywords` (DBD's company search, Thai or English).
- 🧾 **Identity** — Thai and English legal name, entity type, status, registration date, TSIC code with Thai and English description, registered and paid-up capital, office type, registered address; from the company's DBD page also business size and group, the TSIC of the latest filing and the fiscal years filed.
- 📊 **Financial statements** — the most recent `financialYears` filed fiscal years (1–5): trade receivables, inventories, current and non-current assets, property, plant and equipment, total assets, current and non-current liabilities, equity; revenue, total income, cost of sales, gross profit, selling and admin expenses, interest expense, profit before tax, income tax, net profit; and DBD's 15 ratios (ROA, ROE, margins, liquidity, turnover, leverage).
- 🧑‍💼 **Directors** — in DBD's order, Thai names, and the signing-authority rule (who may sign for the company).
- 👥 **Investment by nationality (optional)** — `includeShareholders`: shares, value, % of capital and number of holders per nationality.
- 🕰️ **History** — dated registered-name changes and registered-capital changes.
- 🧯 **Outage-aware** — when a DBD service is down, rows say so (`identity_available`, `deep_tier_available`, `error`) instead of looking complete.

### 🎬 Quick Start

```bash
curl -X POST "https://api.apify.com/v2/acts/foxlabs~thailand-company-data/runs?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"juristicIds":["0107544000108","0107542000011","0107536000102"]}'
```

### 🚀 Getting Started (3 steps)

1. **Choose your targets** — 13-digit juristic IDs for exact matches, or name keywords to search DBD.
2. **Pick the data tiers** — financials (3 years) and directors are on by default; investment by nationality is off.
3. **Run and export** — download the dataset as JSON, CSV, Excel, HTML or XML.

### 📥 Input

```json
{"juristicIds":["0107544000108","0107542000011","0107536000102"]}
```

| Field | Type | Description |
|---|---|---|
| `juristicIds` | array | 13-digit Thai juristic IDs, one per line — exact match. Duplicates are removed; an entry that is not 13 digits gets its own `error` row. |
| `searchKeywords` | array | Company-name keywords in Thai or English. Each keyword is sent to the DBD DataWarehouse company search and the companies found are looked up in full. Loose match — see the FAQ. |
| `includeFinancials` | boolean | Financial statements and DBD's 15 ratios from the company's DBD DataWarehouse page (default on). |
| `financialYears` | integer | How many of the latest filed fiscal years to return, 1–5 (default 3). DBD shows the last five filed; they arrive in the same requests, so more years cost nothing extra. |
| `includeDirectors` | boolean | Board of directors and the signing authority (default on). |
| `includeShareholders` | boolean | Investment by nationality (default off): shares, value, % of capital and holders per nationality. Named shareholders are not included — see the FAQ. |
| `maxResults` | integer | Cap on companies looked up (default 100, max 100,000). With keywords, the room left after your IDs is split evenly across the keywords. |
| `maxConcurrency` | integer | Companies processed in parallel (default 2, max 4), each on its own Thai IP. |
| `proxyConfiguration` | object | Apify Proxy settings (default: on). Without a group, the Actor uses Thai residential IPs — the only ones DBD lets through; a group or proxy URLs you set are used as they are. |

**More recipes**

- Full depth for one company: `{"juristicIds":["0107536000102"],"financialYears":5,"includeShareholders":true}` — five years of statements and ratios, directors, signing authority, history and investment by nationality.
- Keyword search: `{"searchKeywords":["ธนาคาร"],"maxResults":12}` — in our 2026-09-26 test `ธนาคาร` (bank) returned 12 small companies and partnerships, none of them a bank: DBD's search also matches business-type codes and descriptions. Use juristic IDs for exact companies.
- Identity only (fastest): `{"juristicIds":["0107544000108"],"includeFinancials":false,"includeDirectors":false}` — name, status, TSIC, capital and address from the OpenAPI; the DataWarehouse is not visited.

### 📤 Output

One row per company. Rows with `matched: true` are delivered company records. A juristic ID that fails still writes a row with `matched: false` and an `error` saying why — not a 13-digit ID, no DBD data for the ID, or a DBD outage — so a failed ID never disappears silently. From 25 September 2026 these rows are not charged. A keyword that matches nothing adds no row; the run log says so.

| Field | Description |
|---|---|
| `juristic_id` | 13-digit juristic ID |
| `name_th` / `name_en` | Legal name in Thai and English |
| `entity_type` / `status` | Entity type and status as DBD writes them, in Thai — e.g. `บริษัทมหาชนจำกัด` (public limited company), `ยังดำเนินกิจการอยู่` (still operating) |
| `register_date` | Registration date (ISO) |
| `tsic_code` / `tsic_th` / `tsic_en` | TSIC code of the registered business objective, with Thai and English description |
| `registered_capital` / `registered_capital_fmt` / `paidup_capital` | Registered capital (฿, number and compact text) and paid-up capital (฿) |
| `address` / `branch` | Registered address (Thai) and office type (e.g. `สำนักงานใหญ่`, head office) |
| `website` | The website on the company's DBD page. DBD has the row, but it was empty (`-`) for all 16 companies in our 2026-09-26 test, PTT included — expect `null` |
| `business_size` / `business_group` | DBD's business-size class (e.g. `S`) and business group (Thai, e.g. `บริการ`, services) |
| `tsic_latest_code` / `tsic_latest_th` | TSIC of the business in the latest filing — it can differ from the registered objective (PTT: registered `71209`, latest filing `19201`, petroleum refining) |
| `fiscal_years_filed` | Fiscal years (AD) for which DBD holds a filed statement |
| `signing_authority` | Who may sign for the company, as DBD records it (Thai); with `includeDirectors` |
| `name_history` / `registered_capital_history` | Dated registered-name changes and registered-capital changes |
| `financials[]` / `financials_text` | One entry per filed fiscal year, newest first: `fiscal_year`, `fiscal_year_be`, `business_size` (latest year); income statement — `revenue`, `total_income`, `cost_of_sales`, `gross_profit`, `selling_admin_expenses`, `expenses`, `interest_expense`, `profit_before_tax`, `income_tax`, `net_profit`; balance sheet — `trade_receivables`, `inventories`, `current_assets`, `property_plant_equipment`, `non_current_assets`, `total_assets`, `current_liabilities`, `non_current_liabilities`, `total_liabilities`, `equity`, `total_liabilities_and_equity` (฿); compact texts for revenue, net profit, assets and equity; `ratios` (DBD's 15); `other_items` for lines outside DBD's standard layout — and a one-line summary of the latest year |
| `directors[]` / `directors_count` / `directors_text` | Directors in DBD's order — `seq`, `name_th` |
| `shareholders_by_nationality` | Only with `includeShareholders`: `nationality_th`, `shares`, `value_baht`, `share_pct`, `holders` per nationality; `null` otherwise |
| `matched` / `error` / `search_keyword` | `true` for a company record; `false` plus `error` for a failed lookup (`search_keyword` names the keyword on the row of a keyword that could not be searched) |
| `identity_available` / `identity_source` / `identity_partial` / `identity_note` | Only when the OpenAPI was down: where the identity came from and which fields could not be filled |
| `deep_tier_available` / `deep_tier_error` / `deep_tier_note` | `deep_tier_available: false` and `deep_tier_error` when the company's DataWarehouse page could not be read; `deep_tier_note` when DBD has no page for the ID |
| `charged` | `false` on a row that is not charged because the financials, directors or shareholders you asked for could not be read |
| `source` / `source_url` / `scraped_at` | Source name, the DBD OpenAPI record for the ID, timestamp |

Sample — Siam Commercial Bank, captured 2026-09-26 (lists trimmed to one entry):

```json
{
  "juristic_id": "0107536000102",
  "name_th": "บริษัท ธนาคารไทยพาณิชย์ จำกัด (มหาชน)",
  "name_en": "THE SIAM COMMERCIAL BANK PUBLIC COMPANY LIMITED",
  "entity_type": "บริษัทมหาชนจำกัด",
  "status": "ยังดำเนินกิจการอยู่",
  "register_date": "1993-02-19",
  "tsic_code": "64191",
  "tsic_en": "Commercial banks",
  "tsic_th": "ธนาคารพาณิชย์",
  "registered_capital": 70000000000,
  "registered_capital_fmt": "฿70.00B",
  "paidup_capital": 33991921980,
  "address": "9 ถนนรัชดาภิเษก, จตุจักร, เขตจตุจักร, กรุงเทพมหานคร",
  "branch": "สำนักงานใหญ่",
  "website": null,
  "business_size": null,
  "business_group": "บริการ",
  "tsic_latest_code": "64191",
  "tsic_latest_th": "ธนาคารพาณิชย์",
  "fiscal_years_filed": [2025, 2024, 2023, 2022, 2021],
  "signing_authority": "นายสารัชต์ รัตนาภรณ์ กรรมการบริหาร มีอำนาจลงลายมือชื่อผูกพันบริษัทได้ ข้อจำกัดอำนาจกรรมการ ไม่มี",
  "name_history": [
    { "date": "1993-02-19", "name_th": "ธนาคารไทยพาณิชย์ จำกัด (มหาชน)" }
  ],
  "registered_capital_history": [
    { "date": "1993-02-19", "registered_capital": 3800000000 }
  ],
  "financials": [
    {
      "fiscal_year_be": "2568",
      "fiscal_year": 2025,
      "business_size": null,
      "revenue": 149886133000,
      "revenue_fmt": "฿149.89B",
      "total_income": 169569791000,
      "cost_of_sales": 33677232000,
      "gross_profit": null,
      "selling_admin_expenses": 79094071000,
      "expenses": 112771303000,
      "interest_expense": null,
      "profit_before_tax": 56798488000,
      "income_tax": 10800342000,
      "net_profit": 45998146000,
      "net_profit_fmt": "฿46.00B",
      "trade_receivables": 2751639469000,
      "inventories": 31439694000,
      "current_assets": 3405763735000,
      "property_plant_equipment": 38277246000,
      "non_current_assets": 96764541000,
      "total_assets": 3502528276000,
      "total_assets_fmt": "฿3.50T",
      "current_liabilities": 2877184711000,
      "non_current_liabilities": 181342851000,
      "total_liabilities": 3058527562000,
      "equity": 444000714000,
      "equity_fmt": "฿444.00B",
      "total_liabilities_and_equity": 3502528276000,
      "ratios": {
        "roa_pct": 1.35,
        "roe_pct": 10.46,
        "gross_margin_pct": 0,
        "operating_margin_pct": 33.5,
        "net_margin_pct": 27.13,
        "current_ratio": 1.18,
        "receivables_turnover": 0.06,
        "inventory_turnover": 1.13,
        "payables_turnover": 0.01,
        "asset_turnover": 0.05,
        "operating_expense_ratio_pct": 66.5,
        "assets_to_equity": 7.89,
        "debt_to_assets": 0.87,
        "debt_to_equity": 6.89,
        "debt_to_operating_capital": 0.87
      }
    }
  ],
  "financials_text": "Revenue ฿149.89B · Net profit ฿46.00B · Assets ฿3.50T · FY2025",
  "directors": [
    { "seq": 1, "name_th": "นายอภิศักดิ์ ตันติวรวงศ์" }
  ],
  "directors_count": 15,
  "directors_text": "นายอภิศักดิ์ ตันติวรวงศ์; นายประสัณห์ เชื้อพานิช; นายอาทิตย์ นันทวิทยา; นายกานต์ ตระกูลฮุน; พลอากาศเอกสถิตย์พงษ์ สุขวิมล; พันตำรวจเอกธรรมนิธิ วนิชย์ถนอม; นายพสุ เดชะรินทร์; นายเชาวลิต เอกบุตร; นายจักรกฤศฏิ์ พาราพันธกุล; นางปริศนา ประหารข้าศึก",
  "shareholders_by_nationality": [
    { "nationality_th": "ไทย", "shares": 3396491066, "value_baht": 69944375243, "share_pct": 99.92, "holders": 5064 }
  ],
  "matched": true,
  "source": "DBD — Department of Business Development, Ministry of Commerce (Thailand)",
  "source_url": "https://openapi.dbd.go.th/api/v1/juristic_person/0107536000102",
  "scraped_at": "2026-09-26T13:22:13.813Z"
}
```

### 💼 Use cases

**1. KYB and vendor onboarding** — verify a Thai company before you sign.
*Input:* its juristic ID. *Output:* legal names, entity type, status, registration date, address, capital. *Use:* confirm the entity exists and is still operating.

**2. Credit and financial screening** — see where a counterparty is heading.
*Input:* a list of juristic IDs with `financialYears` up to 5. *Output:* assets, liabilities, equity, revenue, net profit and DBD's ratios per year. *Use:* flag shrinking or loss-making companies.

**3. Board and governance checks** — who runs the company.
*Input:* juristic IDs. *Output:* the directors and the signing authority. *Use:* identify decision-makers and who can sign for the company; with `includeShareholders`, see the foreign share of ownership.

**4. Bilingual record matching** — Thai script to English.
*Input:* juristic IDs. *Output:* the Thai and the English legal name side by side. *Use:* match Thai-language records to English-language systems.

### 🔗 Integration

**JavaScript / Node.js**

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const run = await client.actor('foxlabs/thailand-company-data').call({"juristicIds":["0107544000108"]});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0]);
```

**Python**

```python
from apify_client import ApifyClient
client = ApifyClient('YOUR_TOKEN')
run = client.actor('foxlabs/thailand-company-data').call(run_input={"juristicIds": ["0107544000108"]})
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)
```

Written for `apify-client` 3 for Python, where `call()` returns a run object; with version 1 or 2 it returns a dict — write `run['defaultDatasetId']` there.

**Automation (n8n / Zapier / Make):** schedule or webhook → HTTP request to the Actor API with your `juristicIds` → handle the JSON dataset → push to a sheet, CRM or dashboard.

### 📊 Pricing

Pay-per-event: **$0.025 per delivered company record** (≈ $25 per 1,000 companies), plus Apify's run-start event of $0.00005 per GB of memory. Financial years, directors and investment by nationality do not change the price per company. A row whose DataWarehouse page could not be read (`deep_tier_available: false` — DBD down, 504s on every retry, or a statement that stayed blank) is **free** when the run asked for financials, directors or shareholders (the row says `charged: false`); a run that asked only for identity gets it as a full record. **Rows that only report a failed lookup (`error`) are free** (since 25 September 2026). [Current pricing](https://apify.com/foxlabs/thailand-company-data).

### ❓ FAQ

**Where does the data come from?** From DBD, Ministry of Commerce. Identity fields come from DBD's keyless OpenAPI (`openapi.dbd.go.th`). Financial statements, ratios, directors, signing authority, history, investment by nationality and the name search come from each company's page on DBD's classic DataWarehouse host (`datawarehouse2.dbd.go.th`), read as plain HTML — no browser, login or API key. DBD's redesigned DataWarehouse (`datawarehouse.dbd.go.th`) was failing for everyone, DBD's own website included, when we measured on 26 September 2026.

**Juristic ID or keyword?** An ID is exact. A keyword goes to DBD's DataWarehouse search, which matches the name, the juristic ID, the TSIC code and the business-type name or description, and lists companies that are still operating first. In our 2026-09-26 test `ธนาคาร` (bank) returned 12 small companies and partnerships, none of them a bank. Use the ID when the exact company matters.

**Why do the figures differ from earlier runs?** Since version 0.1.4 (26 September 2026) the figures come from the company's own DBD page. The encrypted API used before returned different numbers for the same year: Siam Commercial Bank's FY2025 total assets were ฿22.75T there and are ฿3.50T on its DBD page. Re-run companies whose figures you kept.

**Why does a bank show trade receivables and inventories?** DBD shows every company in one standard statement layout — the same 11 balance-sheet and 10 income-statement lines for the retailer CP ALL and for Siam Commercial Bank in our test — so a bank's figures sit under DBD's standard line names. The ratios are DBD's own too: for Siam Commercial Bank DBD shows no gross profit and a gross margin of 0.00.

**Why do some companies have fewer years than `financialYears`?** `financialYears` counts filed years. A company that has filed fewer returns what it has — in our test a company registered in 2022 returned FY2022 only — and a company that has filed none returns `financials: null` and `fiscal_years_filed: null`.

**Why are there no English director names or director nationalities?** DBD's company page lists directors in Thai only. The company's English legal name still comes from the OpenAPI (`name_en`).

**What does `includeShareholders` return?** Investment by nationality from the company's latest shareholder filing: shares, value, % of capital and number of holders per nationality, as DBD tabulates them. DBD's named shareholder list is a paid DBD e-Service document; this Actor does not return it.

**What happens when DBD is down?** The row says so. With the OpenAPI down, the identity comes from the company's DataWarehouse page (`identity_partial: true`; `identity_note` names the fields that page lacks: `name_en`, `tsic_en`, `branch`), or the row becomes `matched: false` with an `error`. When the company's DataWarehouse page cannot be read — DBD down, 504s on every retry, or a statement that stays blank — the row keeps its identity fields and gets `deep_tier_available: false`, not charged if you asked for financials, directors or shareholders; a keyword that could not be searched returns one `error` row.

**What if I start it with no input?** It runs the three demo companies (PTT, CP ALL, Siam Commercial Bank) and says so in the log.

**Can I export to CSV / Excel / JSON?** Yes — directly from the Apify dataset.

### 🐛 Troubleshooting

- **`Not a 13-digit Thai juristic ID — skipped.`** — the entry has other characters or the wrong length. If no entry is valid and there are no keywords, the run stops with a message listing them.
- **`No DBD data found for juristic id …`** — neither DBD service returned anything for that ID; check the number.
- **A keyword returns other companies, or nothing** — keywords match loosely; use juristic IDs for exact companies.
- **The run is slow** — each company needs several pages from DBD's DataWarehouse, which is slow and answers 504 in bursts; the Actor pauses and retries on new IPs. Switch off the tiers you don't need, or raise `maxConcurrency` (up to 4).
- **`identity_available: false` or `deep_tier_available: false`** — a DBD service was down, or kept answering 504, during the run; those rows are not charged for the missing tier. Re-run them later.

### ⚖️ Is it legal to scrape this data?

The Actor reads company records that DBD makes publicly available, without a login. Director names are personal data under Thailand's Personal Data Protection Act B.E. 2562 (2019) — process them only for a lawful purpose such as KYC or due diligence, and check that your use fits DBD's terms. This Actor is not affiliated with DBD or the Ministry of Commerce.

### 🤝 Support & contact

- 🌐 **Website:** [data.foxlabs.com.tr](https://data.foxlabs.com.tr)
- 📧 **Email:** info@foxlabs.com.tr
- 🐛 **Issues:** open a ticket in the Actor’s **Issues** tab
- 🧰 **More clean B2B data actors:** [Fox Labs on Apify](https://apify.com/foxlabs)

### Changelog

#### 0.1.39 — 2026-11-02 — Faster identity when DBD's OpenAPI endpoint is unresponsive

- When DBD's identity endpoint is unreachable, the run now fails over to the DBD DataWarehouse page in seconds instead of waiting on it per company, and stops retrying the dead endpoint for the rest of the run. The same identity data is still returned (the DataWarehouse page carries it); runs just finish faster. The OpenAPI path switches back on automatically the moment the endpoint answers. The prefilled example is also lighter (one company) so the daily Store health check stays quick. No output field or pricing change.

#### 0.1.38 — 2026-10-08 — README: the Python example works with the current Apify client

- The README's Python example read the results with `run['defaultDatasetId']`. With the current Apify client for Python (version 3) `call()` returns a run object, not a dict, and that line raised `TypeError: 'Run' object is not subscriptable` — after the run itself had finished. The example now reads `run.default_dataset_id`; with client version 1 or 2, keep `run['defaultDatasetId']`. Checked with apify-client 3.2.1, 2.5.1 and 1.12.2.
- No code, output field or pricing change.

#### 0.1.5 — 2026-10-07 — a run that Apify starts again does not deliver a company twice

- **A run that the platform starts again no longer repeats what it has delivered.** Apify can move a run to another server while it is going; the Actor then starts again from the top with the same dataset. Until now it fetched every company again: in a test that asked for 12 companies and was started again after 4 rows, the dataset ended with 16 rows — the first 4 written and charged twice. The Actor now first reads which companies its own dataset already holds; they are not fetched, written or charged again and they count towards `maxResults`.
- No output field changed, no pricing change.

#### 0.1.4 — 2026-09-26 — financials, directors and history are back, figures corrected

- **Fix:** DBD's redesigned DataWarehouse fails for everyone, so financials and directors were missing. The Actor now reads each company's page on DBD's classic DataWarehouse host (`datawarehouse2.dbd.go.th`).
- **Figures corrected:** the source used before returned numbers that do not match the company's DBD page (Siam Commercial Bank FY2025 total assets ฿22.75T vs ฿3.50T on DBD). Re-run companies whose figures you kept.
- **Added:** website, business size and group, latest TSIC, fiscal years filed, signing authority, name and capital history, DBD's 15 ratios and more statement lines per year.
- **Removed — not on DBD's public pages:** the named `shareholders` list (a paid DBD e-Service document; `shareholders_by_nationality` stays), directors' English names and nationality, `financials[].cash`, `financials_note`, `status_code`, `entity_type_code`.
- A statement that loads blank, or a company page DBD still does not serve after four tries, gives `deep_tier_available: false` and is not charged. Years without figures are dropped.

#### 0.1.3 — 2026-09-26 — partial rows are free while DBD's DataWarehouse is down

- DBD's DataWarehouse (financials, directors, shareholders) is down on DBD's side: its own website gets the same error. Until it is back, a row that misses the financials, directors or shareholders your run asked for is **not charged** and says `charged: false`. Identity-only runs are unchanged.

#### 0.1.2 — 2026-09-26 — company data flows again (Thai residential proxy)

- **Fix:** DBD had been refusing the default Apify proxy (HTTP 403 on its API since at least 10 September), and on 26 September the DataWarehouse fallback failed as well, so runs returned only `matched: false` rows with no company data (not charged). With Apify Proxy on and no group chosen, the Actor now uses Thai residential IPs, which DBD lets through, on one session for the whole run. A proxy group or proxy URLs you set yourself are used unchanged.

#### 0.1.1 — 2026-09-10 — failed lookups become free (per-record billing) + README corrected

- **You will pay only for delivered company records.** The Actor now charges a new `company-record` event for each delivered company (`matched: true`). Rows that only report a failed lookup — not a 13-digit ID, no DBD data for the ID, a keyword that could not be searched, a DBD outage that left no identity — are pushed without a charge.
- **Timing:** Apify applies pricing changes after a 14-day notice. From **25 September 2026** the pricing switches from the per-dataset-item event to `company-record` at the same price ($0.025). Until then billing is exactly as before; the code detects the switch by itself.
- No output field changed.
- **README corrected.** The previous README showed inputs this Actor does not read (`queries`, `maxResultsPerQuery`, `includeRaw`) with placeholder values, and claimed things it does not do: whole-registry calls, formation monitoring, relevance-ranked search, contact fields, camelCase rows with a `query` field, English status values, and free failed lookups before this billing change. This README is written from the code and from test runs on 2026-09-10.

#### 0.1 — 2026-09-07

- README rebuilt and AI-agent payments (x402) enabled. That README described inputs this Actor does not have and said seven columns had been removed; they had not — the Actor still returns them (see 0.1.1).

#### 0.0

- Initial release: data from the Thai Department of Business Development (DBD) registry by name or registry ID.

# Changelog

This Actor's version history is a separate document: https://apify.com/foxlabs/thailand-company-data/changelog.md

# Actor input Schema

## `juristicIds` (type: `array`):

Thai juristic registration numbers — one per line, e.g. 0107544000108 (PTT). The 13-digit ID is the reliable key for an exact match.

## `searchKeywords` (type: `array`):

Company name keywords (Thai or English), e.g. "PTT" or "ปตท". Each keyword is searched on DBD and matching companies are scraped — use this when you don't have juristic IDs. Combine with maxResults to cap how many.

## `includeFinancials` (type: `boolean`):

The company's own statements for up to 5 fiscal years, as its DBD DataWarehouse+ page shows them: income statement, balance sheet and DBD's 15 financial ratios (ROA, ROE, margins, current ratio, turnover, debt ratios).

## `financialYears` (type: `integer`):

How many of the latest filed fiscal years to return (1–5). DBD shows the last five filed; they all arrive in the same requests, so more years cost nothing extra.

## `includeDirectors` (type: `boolean`):

Board directors as DBD lists them (names in Thai; DBD publishes no English names) and the registered signing authority: who may sign for the company.

## `includeShareholders` (type: `boolean`):

Thai vs. foreign ownership from the latest shareholder filing: shares, value, % of capital and number of holders per nationality. DBD's named shareholder list is a paid DBD e-Service document and is not included.

## `maxResults` (type: `integer`):

Hard cap on the number of companies processed in one run.

## `maxConcurrency` (type: `integer`):

Companies processed in parallel, each on its own Thai IP.

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

Apify Proxy. Leave it on without a group: the Actor then uses Thai residential IPs, the only ones DBD lets through (its API refuses the default Apify proxy, and the DataWarehouse refuses residential IPs from other countries; measured 2026-09-26). A group or proxy URLs you set are used as they are.

## Actor input object example

```json
{
  "juristicIds": [
    "0107544000108"
  ],
  "searchKeywords": [],
  "includeFinancials": true,
  "financialYears": 3,
  "includeDirectors": true,
  "includeShareholders": false,
  "maxResults": 100,
  "maxConcurrency": 2,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

# 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 = {
    "juristicIds": [
        "0107544000108"
    ],
    "searchKeywords": [],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("foxlabs/thailand-company-data").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 = {
    "juristicIds": ["0107544000108"],
    "searchKeywords": [],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("foxlabs/thailand-company-data").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 '{
  "juristicIds": [
    "0107544000108"
  ],
  "searchKeywords": [],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call foxlabs/thailand-company-data --silent --output-dataset

```

## MCP server setup

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

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/WyAJSJpZlBgHJUYaM/builds/6bch6UchfVxb7JfSP/openapi.json
