An unofficial NodeJs client 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 hunter.io
This project provides an additional documentation automatically generated with typedoc and based on the original documentation, you can find it at https://b4dnewz.github.io/node-emailhunter/
You can install the dedicated cli version of this module, you simply have to install it globally and you are ready to go.
npm install -g hunter.io-cli
The package will register email-hunter
command, which is built using commanderjs and provides automatic generated usage documentation for options and sub-commands.
$ email-hunter --help
$ email-hunter <command> --help
In order to use the cli you must use a valid Hunter.io API key.
You can set it in two ways, one is with command options, another is using environment variables, in particular a variable called HUNTERIO_KEY
with your private API key, otherwise if not specified, most of the endpoints will fail since requires authentication.
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
The project is TypeScript based and it comes with declaration files, every method signature is well described and can also be found in the online documentation.
-
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.
All the methods supports both callback style functions or promises, so for example to get your profile informations you can do:
// with callback
hunter.account((err, result) => { });
// with promises
const data = await hunter.account()
hunter.account().then(data => {
})
- 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
The hunter.io is released under the MIT License.