A simple javascript wrapper for Hunter.io API
This is a unofficial client for Hunter.io.
The module is distributed through npm (node package manager) and yast, it can be installed using:
npm install --save hunter.io
yarn add hunter.io
You can find an online documentation at the url: https://b4dnewz.github.io/node-emailhunter/
This package also comes with the cli-tool, you simply have to install it globally and you are ready to go.
npm install -g hunter.io
yarn global add hunter.io
For detailed usage information type email-hunter --help
, it works also with sub-commands es: email-hunter leads --help
.
In order to use the cli you must set an environment variable called HUNTERIO_KEY
with your private API key, otherwise it will fail for most of the endpoints.
Import the module and and create an instance of the hunter:
import EmailHunter from 'hunter.io';
const hunter = new EmailHunter('YOUR API KEY');
Note: You can get the Hunter.io API key in your dashboard: https://hunter.io/api_keys
-
domainSearch: You give one domain name and it returns all the email addresses using this domain name found on the internet.
-
emailFinder: This API endpoint generates the most likely email address from a domain name, a first name and a last name.
-
emailVerifier: This API endpoint allows you to verify the deliverability of an email address.
-
emailCount: This API endpoint allows you to know how many email addresses we have for one domain.
-
account: This API endpoint enables you to get information regarding your Hunter account at any time.
-
leads: The object which contains all the leads methods
- list: Returns all the leads already saved in your account.
- retrieve: Retrieves all the fields of a lead.
- create: Creates a new lead.
- update: Updates an existing lead.
- delete: Deletes an existing lead by ID.
-
leadsList: The object which contains all the leads methods
- list: Returns all the leads lists already saved in your account.
- retrieve: Retrieves all the fields of a leads list.
- create: Creates a new leads list.
- update: Updates an existing leads list.
- delete: Deletes an existing leads list.
Returns all the email addresses found using one given company name, with our sources.
hunter.domainSearch({
domain: 'example.com',
company: 'Example Company'
}, (err, result) => { });
It find the most likely email address from a domain name, a first name and a last.
hunter.emailFinder({
full_name: 'John Doe',
domain: 'example.com',
company: 'Example Company'
}, (err, result) => { });
Allows you to verify the deliverability of an email address.
hunter.emailVerifier('[email protected]', (err, result) => { });
hunter.emailVerifier({
email: '[email protected]'
}, (err, result) => { });
Allows you to know how many email addresses we have for one domain.
hunter.emailCount('example.com', (err, result) => { });
hunter.emailCount({
domain: 'example.com'
}, (err, result) => { });
Allows you to get information regarding your Email Hunter account at any time.
hunter.account((err, result) => { });
Returns all the leads already saved in your account. The leads are returned in sorted order, with the most recent leads appearing first. The optional parameters can be combined to filter the results.
hunter.leads.list({
limit: 20
}, (err, result) => { });
Creates a new lead. The parameters must be passed as a JSON hash.
hunter.leads.create({
first_name: 'Filippo',
last_name: 'Conti'
}, (err, result) => { });
The hunter.io is released under the MIT License.
- Fork it ( https://github.com/b4dnewz/node-emailhunter/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Write some tests and run (
npm run test
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request