API & agent access

Everything the search and profile pages do is available over a JSON API — and as tools for Claude and other AI agents via MCP. Search is free; extraction is metered by the same credit ledger the website uses.

1. Get a key

Requests authenticate with Authorization: Bearer dbdk_… API keys. Keys are issued per account on Business and Enterprise plans (they’re what determines whose credits get spent). Ask for yours on the account page or with your plan — self-serve key management is on the roadmap.

Your key carries scopes: data covers everything below. A key only ever exposes what its scopes allow.

2. REST API

MethodEndpointCostWhat it returns
GET/api/v1/companiesfreeSearch — every filter from the /companies UI (industry, province, revenue ranges, grade, contact facets), sort & paging. Rows include the credit score + grade.
GET/api/v1/companies/:jpNo1cr (PRO+ free)Full profile — directors, shareholders, name/capital history, per-FY financials + the credit-score breakdown, spend-capacity rank and industry benchmark.
POST/api/v1/companies/:jpNo/contacts3cr (PRO+ free)Reveal contact channels — website, email, phone, Facebook, Instagram, LINE. Permanent unlock per company.
GET/api/v1/accountfreeYour plan, credit balance, daily-cap usage and the full cost table.
GET/api/v1/creditsfreeYour credit ledger — every grant and spend, newest first.
GET/api/export1cr / rowCSV or .xlsx of any filtered search — the same export the UI button produces. ?format=csv|xlsx + the same filter params.

Search accepts the full filter grammar of the /companies page — copy your query string straight from the browser URL and it works:

# search: A/B-graded companies in Rayong with contacts, best scores first
curl "https://<host>/api/v1/companies?prov=RAYONG&grade=B&con=1&sort=score&pageSize=25" \
  -H "Authorization: Bearer dbdk_…"

# profile + financial calcs
curl "https://<host>/api/v1/companies/0107544000108" \
  -H "Authorization: Bearer dbdk_…"

# machine-readable spec of the whole surface
curl "https://<host>/api/v1/openapi.json" -H "Authorization: Bearer dbdk_…"

A company profile response includes three computed blocks: score (0–100, grade, per-component breakdown), spendCapacity (purchase-power rank) and fin (multi-year cohort comparison, company KPIs, industry benchmark).

3. MCP — connect your AI agent

/api/mcp is a Streamable-HTTP MCP server — Claude, Cursor, VS Code, Windsurf, Devin and the other big clients can all search the registry, pull profiles and reveal contacts as native tools. Pick yours for the exact config:

Claude Code — one command

claude mcp add --transport http thai-registry https://<host>/api/mcp \
  --header "Authorization: Bearer dbdk_…"

Claude Desktop — claude_desktop_config.json

{
  "mcpServers": {
    "thai-registry": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://<host>/api/mcp",
        "--header",
        "Authorization: Bearer dbdk_…"
      ]
    }
  }
}
ToolCostWhat it does
dbd_companiesfreeSearch with the full UI filter grammar — q, prov, type, tsic, ranges, grade, size, contact facets, sort, paging
dbd_company1crProfile + directors/shareholders/history/financials + score, spendCapacity and fin benchmark
dbd_company_contacts3crContact-channel reveal — permanent unlock
dbd_accountfreePlan, balance, daily-cap usage, cost table
dbd_credit_historyfreeCredit ledger

Example prompt once connected: “find petrochemical companies in Rayong with a website and email, then fetch the best-scored one” — the agent calls dbd_companies with the filters, then dbd_company on the top result.

4. Credits — same ledger as the website

One balance
API calls spend the same credits as clicks in the UI — a company unlocked on the site is free via the API and vice versa. Check your balance any time with GET /api/v1/account or the dbd_account tool.
Predictable errors
Out of credits or over a daily cap → 402 {error, code} with NO_CREDITS or DAILY_CAP — so scripts and agents can check balance first and retry after top-up or midnight.

Searching and reading your account are always free — metering only applies when data leaves the system: profile unlocks (1cr, permanent), contact reveals (3cr, permanent), export rows (1cr each). PRO+ plans include free profile and contact views; every plan’s daily export cap still applies.

Need a key or higher limits? Business plans include API access.

See plans →