A tiny Ruby wrapper around Hunter (former EmailHunter) API (https://hunter.io/)
Switch branches/tags
Nothing to show
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode updated gem to V2 API Dec 2, 2016
bin First commit Apr 29, 2015
lib Merge branch 'master' of https://github.com/davidesantangelo/emailhunter Sep 10, 2018
spec updated gem to V2 API Dec 2, 2016
.gitignore First commit Apr 29, 2015
.rspec First commit Apr 29, 2015
.travis.yml First commit Apr 29, 2015
Gemfile First commit Apr 29, 2015
LICENSE Initial commit Apr 29, 2015
README.md Update README.md Sep 6, 2017
Rakefile First commit Apr 29, 2015
emailhunter.gemspec fixing and improvements Apr 29, 2015

README.md

Emailhunter

A tiny ruby wrapper around Hunter (former Email Hunter) API. Direct access to all the web's email addresses.

UPDATE (2016-12-02): gem updated with V2 API.

Installation

Add this line to your application's Gemfile:

gem 'emailhunter'

And then execute:

$ bundle

Or install it yourself as:

$ gem install emailhunter

Usage

require 'emailhunter'
email_hunter = EmailHunter.new('Your secret API key')

Your secret API key. You can generate it in your dashboard from https://hunter.io

Domain search API

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

result = email_hunter.search('stripe.com')

Accessing domain search response

result.fetch(:meta)
result.fetch(:webmail)
result.fetch(:emails)
result.fetch(:pattern)
result.fetch(:domain)

Email Verify API

Allows you to verify the deliverability of an email address.

email_hunter.verify('bonjour@firmapi.com')

Accessing email verify response

result.fetch(:result)
result.fetch(:score)
result.fetch(:regexp)
result.fetch(:gibberish)
result.fetch(:disposable)
result.fetch(:mx_records)
result.fetch(:smtp_server)
result.fetch(:smtp_check)
result.fetch(:accept_all)
result.fetch(:sources)
result.fetch(:meta)

Email Exist API (only for V1)

This API call is deprecated, please use the email verification call instead.

This API endpoint allows you to check if a given email address has been found on the web. If it has been found, it returns all the sources with the dates of the last crawls.

email_hunter.exist('bonjour@firmapi.com')

Accessing email verify response

result.status
result.email
result.exist
result.sources

Finder API (legacy generate)

Guesses the most likely email of a person from his first name, his last name and a domain name.

email_hunter.finder('gmail.com', 'Davide', 'Santangelo')

Accessing finder response

result.fetch(:email)
result.fetch(:score)
result.fetch(:sources)
result.fetch(:domain)
result.fetch(:meta)

Count API

Returns the number of email addresses found for a domain. This is a FREE API call.

email_hunter.count('gmail.com')

Accessing count response

result.fetch(:data)
result.fetch(:meta)

License

The emailhunter GEM is released under the MIT License.

Contributing

  1. Fork it ( https://github.com/[my-github-username]/emailhunter/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request