A lightweight Ruby wrapper around Hunter.io (formerly Email Hunter) API, providing direct access to email search, verification, and company insights.
Add this line to your application's Gemfile:
gem 'emailhunter'
Then execute:
$ bundle install
Or install it yourself with:
$ gem install emailhunter
require 'emailhunter'
email_hunter = EmailHunter.new('Your API Key')
Your API key can be generated in your Hunter dashboard.
Retrieve all email addresses associated with a given domain.
result = email_hunter.search('stripe.com')
result.fetch(:meta)
result.fetch(:webmail)
result.fetch(:emails)
result.fetch(:pattern)
result.fetch(:domain)
Check the deliverability of an email address.
result = email_hunter.verify('bonjour@firmapi.com')
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)
Guess the most likely email of a person using their first name, last name, and domain.
result = email_hunter.finder('gmail.com', 'Davide', 'Santangelo')
result.fetch(:email)
result.fetch(:score)
result.fetch(:sources)
result.fetch(:domain)
result.fetch(:meta)
Retrieve the number of email addresses associated with a domain (FREE API call).
result = email_hunter.count('gmail.com')
result.fetch(:data)
result.fetch(:meta)
Retrieve company details using a domain name.
result = email_hunter.company('stripe.com')
result.fetch(:name)
result.fetch(:industry)
result.fetch(:employees)
result.fetch(:country)
result.fetch(:meta)
Retrieve key individuals associated with a company based on a domain name.
result = email_hunter.people('stripe.com')
result.fetch(:employees)
result.fetch(:position)
result.fetch(:email)
result.fetch(:meta)
Retrieve details about your Hunter account.
result = email_hunter.account
{
"data": {
"first_name": "Davide",
"last_name": "Santangelo",
"email": "davide.santangelo@gmail.com",
"plan_name": "Free",
"plan_level": 0,
"reset_date": "2025-06-29",
"team_id": 349,
"calls": {
"used": 4,
"available": 50
}
}
}
The EmailHunter gem is released under the MIT License.
- Fork it ( https://github.com/[your-github-username]/emailhunter/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add new feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request