jeffersongoncalves / laravel-snov
A Laravel client for the Snov.io API — domain search, email finder and verifier, prospects, lists, technology checker, and drip campaigns.
Package info
github.com/jeffersongoncalves/laravel-snov
pkg:composer/jeffersongoncalves/laravel-snov
Fund package maintenance!
Requires
- php: ^8.2
- illuminate/support: ^12.0|^13.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.21
- orchestra/testbench: ^10.0|^11.0
- pestphp/pest: ^3.0|^4.0
- pestphp/pest-plugin-laravel: ^3.0|^4.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Laravel Snov
A Laravel client for the Snov.io API. A fluent Snov facade groups the domain search, email finder, email verifier, prospect, list, technology checker, and drip campaign endpoints behind resource accessors, mints and caches the OAuth access token for you, and throws a SnovException on a non-2xx response instead of returning a silent error array.
Features
- Domain Search —
domains()->search(),count() - Email Finder & Verifier —
emails()->find(),verify() - Prospects —
prospects()->find(),addToList() - Lists —
lists()->all(),prospects() - Technology Checker —
technology()->check() - Drip Campaigns —
campaigns()->all(),emails(),addProspect() - Token handled for you — the client-credentials access token is minted on demand and cached until just before it expires
- Thin by design — every method returns the raw decoded JSON response as an array, no DTOs
- Fails loud — a non-2xx response throws
SnovExceptioncarrying the API's error message and HTTP status code
Installation
composer require jeffersongoncalves/laravel-snov
Optionally publish the config file:
php artisan vendor:publish --tag="snov-config"
Configuration
Add to your .env:
SNOV_CLIENT_ID=your-client-id SNOV_CLIENT_SECRET=your-client-secret
Generate the credentials at https://app.snov.io/api-setting.
Config Options
// config/snov.php return [ 'client_id' => env('SNOV_CLIENT_ID'), 'client_secret' => env('SNOV_CLIENT_SECRET'), 'base_url' => env('SNOV_BASE_URL', 'https://api.snov.io/v1'), 'cache_key' => env('SNOV_CACHE_KEY', 'snov.access_token'), ];
Usage
use JeffersonGoncalves\Snov\Facades\Snov; use JeffersonGoncalves\Snov\Exceptions\SnovException;
Domain Search
Snov::domains()->search('example.com', type: 'all', limit: 100); Snov::domains()->count('example.com');
Email Finder & Verifier
Snov::emails()->find('Ada', 'Lovelace', 'example.com'); Snov::emails()->verify('ada@example.com'); Snov::emails()->verify(['ada@example.com', 'grace@example.com']);
Prospects
Snov::prospects()->find('ada@example.com'); Snov::prospects()->addToList('ada@example.com', 'Ada', 'Lovelace', listId: 12345);
Lists
Snov::lists()->all(); Snov::lists()->prospects(12345, page: 1, perPage: 100);
Technology Checker
Snov::technology()->check('example.com');
Drip Campaigns
Snov::campaigns()->all(); Snov::campaigns()->emails(7); Snov::campaigns()->addProspect(7, 'ada@example.com', 'Ada', 'Lovelace');
Handling errors
try { $result = Snov::domains()->count('example.com'); } catch (SnovException $e) { // $e->getMessage() — the API's message/error_description, or the raw response body // $e->statusCode — the HTTP status code returned by Snov.io }
Testing
composer test
Static Analysis
composer analyse
Code Formatting
composer format
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
