bdm/datafinder 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

bdm/datafinder

Composer 安装命令:

composer require bdm/datafinder

包简介

Official PHP/Laravel SDK for the BDM DataFinder API

README 文档

README

Official PHP SDK for the BDM DataFinder API.

Installation

composer require bdm/datafinder

Configuration

Publish the config file:

php artisan vendor:publish --tag=datafinder-config

Add your API key to .env:

BDM_DATAFINDER_API_KEY=bdm_pro_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
BDM_DATAFINDER_BASE_URL=https://api.bdmdatafinder.com/api/v1

Usage

Find a Business

use BDM\DataFinder\Facades\DataFinder;

$result = DataFinder::business()->find('ERA Real Estate', location: 'Cape Town');

echo $result->topName();       // ERA Real Estate
echo $result->topWebsite();    // https://www.era.co.za
echo $result->topConfidence(); // 0.48
echo $result->topBand();       // weak

Find Similar / Competitors

$result = DataFinder::business()->findSimilar('ERA Real Estate', location: 'Cape Town');

foreach ($result->results() as $competitor) {
    echo $competitor['name'] . '' . $competitor['address'];
}

Extract Products / Services

$result = DataFinder::business()->findProducts('KPMG South Africa', website: 'https://www.kpmg.com/za');

foreach ($result->offerings() as $offering) {
    echo $offering['name']; // Audit, Advisory, etc.
}

Validate a Business (KYC)

$result = DataFinder::validation()->business(
    name:    'ERA Real Estate',
    website: 'https://www.era.co.za',
    phone:   '+27813612603',
    address: '20 London Rd, Sea Point, Cape Town',
);

echo $result->score();    // 0.882
echo $result->verdict();  // pass
echo $result->isPassed(); // true

Bulk Enrichment

$job = DataFinder::bulk()->enrich([
    ['name' => 'ERA Real Estate',   'location' => 'Cape Town',     'reference' => 'lead_001'],
    ['name' => 'KPMG',              'location' => 'Johannesburg',  'reference' => 'lead_002'],
    ['name' => 'Woolworths',        'location' => 'Cape Town',     'reference' => 'lead_003'],
]);

echo $job->jobId(); // bulk_xxxxx

// Poll for results
$status = DataFinder::bulk()->status($job->jobId());
echo $status->progress() . '%'; // 100%

// Or wait for completion (small batches only)
$status = DataFinder::bulk()->enrichAndWait([
    ['name' => 'ERA Real Estate', 'location' => 'Cape Town'],
]);

foreach ($status->results() as $result) {
    echo $result['result']['name'];
}

Reverse Lookups

// Domain to company profile
$result = DataFinder::business()->findByEmailDomain('info@era.co.za');
echo $result->name();        // ERA Group South Africa
echo $result->description(); // ERA Real Estate has been...

// Find businesses at an address
$result = DataFinder::business()->findByAddress('19 Edison Way, Century City, Cape Town');
foreach ($result->businesses() as $business) {
    echo $business['name'];
}

// VAT number lookup
$result = DataFinder::business()->findByVatNumber('4360189102', 'ZA');
echo $result->isVerified(); // true
echo $result->format();     // ZA_VAT

// Person to businesses
$result = DataFinder::business()->findByPerson('Johann Rupert', location: 'South Africa');
foreach ($result->associations() as $assoc) {
    echo $assoc['business']['name'];
}

Error Handling

use BDM\DataFinder\Exceptions\AuthenticationException;
use BDM\DataFinder\Exceptions\RateLimitException;
use BDM\DataFinder\Exceptions\DataFinderException;

try {
    $result = DataFinder::business()->find('ERA Real Estate', location: 'Cape Town');
} catch (AuthenticationException $e) {
    // Invalid API key
} catch (RateLimitException $e) {
    // Rate limited — retry after $e->retryAfter seconds
    sleep($e->retryAfter);
} catch (DataFinderException $e) {
    // General API error
}

Without Laravel (Plain PHP)

use BDM\DataFinder\DataFinderClient;

$client = new DataFinderClient(
    apiKey:  'bdm_pro_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
    baseUrl: 'https://api.bdmdatafinder.com/api/v1',
);

$result = $client->business()->find('ERA Real Estate', location: 'Cape Town');

---

Once all files are created your structure should look like:

bdm-datafinder-sdk/ ├── composer.json ├── README.md ├── config/ │ └── datafinder.php └── src/ ├── DataFinderClient.php ├── DataFinderServiceProvider.php ├── Facades/ │ └── DataFinder.php ├── Resources/ │ ├── BusinessResource.php │ ├── BulkResource.php │ └── ValidationResource.php ├── Responses/ │ ├── BaseResponse.php │ ├── BusinessResponse.php │ ├── BulkJobResponse.php │ ├── BulkStatusResponse.php │ ├── TypeSearchResponse.php │ ├── ProductsResponse.php │ ├── EmployeesResponse.php │ ├── SimilarResponse.php │ ├── PhoneResponse.php │ ├── EmailDomainResponse.php │ ├── PersonResponse.php │ ├── AddressResponse.php │ ├── VatResponse.php │ └── ValidationResponse.php └── Exceptions/ ├── DataFinderException.php ├── AuthenticationException.php └── RateLimitException.php

bdm/datafinder 适用场景与选型建议

bdm/datafinder 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 03 月 26 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「api」 「South Africa」 「business intelligence」 「bdm」 「datafinder」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 bdm/datafinder 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 bdm/datafinder 我们能提供哪些服务?
定制开发 / 二次开发

基于 bdm/datafinder 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 31
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-26