A free, open source alternative to FullContact, Clearbit etc. that relies only on information that has been shared publicly by the user. No authentication is required.
Add to your project using your favourite package manager
yarn add enrich-email
or npm install enrich-email
const enrich = require('enrich-email');
enrich('taitbrown@gmail.com').then(console.log)
// {
// guess: {
// name: 'Tait Brown',
// displayName: 'taitems',
// company: 'A Cloud Guru',
// avatarUrl: 'https://avatars.githubusercontent.com/u/234593?v=4',
// location: 'Melbourne, Australia',
// twitterUsername: 'taitems',
// twitterUrl: 'https://twitter.com/taitems',
// githubUsername: 'taitems',
// githubUrl: 'https://github.com/taitems'
// },
// profiles: {
// github: {
// username: 'taitems',
// avatar_url: 'https://avatars.githubusercontent.com/u/234593?v=4',
// profile_url: 'https://github.com/taitems',
// website: 'http://taitbrown.com',
// --- TRIMMED ---
Please note: you need to directly import the esm version from the package.
import React, { useState } from 'react';
// Important to directly import the ESM file
import enrich from 'enrich-email/dist/web/esm';
function App() {
const [input, setInput] = useState('taitbrown@gmail.com');
const handleClick = () => {
enrich(input).then(console.log);
}
return (
<>
<div>
<input type="email" value={input} onChange={e => { setInput(e.target.value)}} />
<button onClick={handleClick}>Submit</button>
</div>
</>
)
}
export default App;
There is an IIFE exported under enrich-email/dist/web/iife
- Search for users by email address on GitHub
- Search for users by email address on Gravatar
- Attempt to infer the users name from the email string, based on common patterns such as
first.last@company.com
- Attempt to infer the company name from the email address domain, by skipping common webmail providers (gmail, yahoo etc.)
- Merge together all discovered and inferred information based on what was available
This library is subject to the rate limits of the downstream services it calls (GitHub and Gravatar to begin with). GitHub for example will lift the rate limit slightly higher if you provide an API key. This may be supported in a future version.
Not really a question, but okay! Keep in mind this only searching for publicly shared information by the user themselves. There are no secret, proprietary databases and backroom dealings. I do not host/own any of this information. It has not been scraped from address books, electoral rolls or CRMs.
As per the above, the accuracy is only as good as the publicly accessible information about a particular user. It makes a series of guesses and dynamically reprioritises results based on perceived accuracy (Pending release).
- Changed
guess.avatar_url
toguess.avatarUrl
to standardise casing
- 🇦🇺 Tait Brown - Package creator/maintainer
- 🇮🇹 Raffaele Calzà - Got tests running on CI
- 🇯🇵 Yuki Shindo - Added better test coverage
- 🇫🇷 Thibaud Ducasse - DX (developer experience)