Clearbit API Client. Currently supporting the Enrichment API, but the entire API is on the roadmap for implementation. The current implementation uses v2 endpoints.
Via Composer
$ composer require wlbrough/clearbit-api
This implementation supports using one or multiple api keys. If a single key is used, clients are generated using static functions, otherwise instance methods generate clients.
All of the following examples assume the following step:
use wlbrough\clearbit\Clearbit;
Clearbit::setKey('token');
By default, Clearbit transmits data to a webhook if data is not immediately available. You can configure an endpoint url to receive webhooks, or you can use the steaming API to wait for results.
$enrichment = Clearbit::createEnrichmentApi();
// Webhook endpoint
$enrichment->setWebhookEndpoint('https://test.com/api/webhook');
// Streaming
$enrichment->enableStreaming();
$enrichment = Clearbit::createEnrichmentApi();
$enrichment->combined('test@test.com');
$enrichment = Clearbit::createEnrichmentApi();
$enrichment->person('test@test.com');
To subscribe to updates:
$enrichment = Clearbit::createEnrichmentApi();
$enrichment->person('test@test.com', true);
$enrichment = Clearbit::createEnrichmentApi();
$enrichment->company('test.com');
$nameToDomain = Clearbit::createNameToDomain();
$nameToDomain->get('Segment');
- Enrichment
- Discovery
- Prospector
- Risk
- Reveal
- Name To Domain
- Logo
Please see CHANGELOG for more information on what has changed recently.
$ composer test
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
If you discover any security related issues, please email wlbrough@gmail.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.