1. Go to this page and download the library: Download bdm/datafinder library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
bdm / datafinder example snippets
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
// Domain to company profile
$result = DataFinder::business()->findByEmailDomain('[email protected]');
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'];
}
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
}
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');