Skip to content

cooper667/node-emailhunter

 
 

Repository files navigation

hunter.io

NPM version Build Status Dependency Status Coverage percentage Known Vulnerabilities

A simple javascript wrapper for Hunter.io API

NPM

This is a unofficial client for Hunter.io.

Installation

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

Documentation

You can find an online documentation at the url: https://b4dnewz.github.io/node-emailhunter/

Looking for the cli?

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.

How to use it

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

Methods

  • 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.

Domain Search

Returns all the email addresses found using one given company name, with our sources.

hunter.domainSearch({
  domain: 'example.com',
  company: 'Example Company'
}, (err, result) => { });

Email Finder

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) => { });

Email Verifier

Allows you to verify the deliverability of an email address.

hunter.emailVerifier('[email protected]', (err, result) => { });

hunter.emailVerifier({
  email: '[email protected]'
}, (err, result) => { });

Email Count

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) => { });

Account information

Allows you to get information regarding your Email Hunter account at any time.

hunter.account((err, result) => { });

List Leads

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) => { });

Create a new Lead

Creates a new lead. The parameters must be passed as a JSON hash.

hunter.leads.create({
  first_name: 'Filippo',
  last_name: 'Conti'
}, (err, result) => { });

License

The hunter.io is released under the MIT License.

Contributing

  1. Fork it ( https://github.com/b4dnewz/node-emailhunter/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Write some tests and run (npm run test)
  5. Push to the branch (git push origin my-new-feature)
  6. Create a new Pull Request

About

📧 A javascript wrapper for Hunter.io API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%