openrich 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +23 -0
- package/LICENSE +21 -0
- package/README.md +410 -2
- package/assets/logo.svg +41 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +144 -0
- package/dist/env.d.ts +5 -0
- package/dist/env.js +24 -0
- package/dist/eval.d.ts +30 -0
- package/dist/eval.js +78 -0
- package/dist/mcp/client.d.ts +31 -0
- package/dist/mcp/client.js +94 -0
- package/dist/mcp/oauth.d.ts +13 -0
- package/dist/mcp/oauth.js +93 -0
- package/dist/mcp/server.d.ts +87 -0
- package/dist/mcp/server.js +125 -0
- package/dist/merge.d.ts +7 -0
- package/dist/merge.js +39 -0
- package/dist/providers/devplatforms.d.ts +34 -0
- package/dist/providers/devplatforms.js +612 -0
- package/dist/providers/finders.d.ts +38 -0
- package/dist/providers/finders.js +708 -0
- package/dist/providers/freetier.d.ts +9 -0
- package/dist/providers/freetier.js +254 -0
- package/dist/providers/github.d.ts +8 -0
- package/dist/providers/github.js +109 -0
- package/dist/providers/identity.d.ts +5 -0
- package/dist/providers/identity.js +62 -0
- package/dist/providers/index.d.ts +10 -0
- package/dist/providers/index.js +68 -0
- package/dist/providers/knowledge.d.ts +52 -0
- package/dist/providers/knowledge.js +302 -0
- package/dist/providers/pattern.d.ts +6 -0
- package/dist/providers/pattern.js +99 -0
- package/dist/providers/registries.d.ts +36 -0
- package/dist/providers/registries.js +396 -0
- package/dist/providers/research.d.ts +30 -0
- package/dist/providers/research.js +471 -0
- package/dist/providers/signals.d.ts +15 -0
- package/dist/providers/signals.js +116 -0
- package/dist/providers/smtp.d.ts +25 -0
- package/dist/providers/smtp.js +97 -0
- package/dist/providers/social.d.ts +37 -0
- package/dist/providers/social.js +657 -0
- package/dist/providers/verifiers.d.ts +47 -0
- package/dist/providers/verifiers.js +455 -0
- package/dist/providers/websearch.d.ts +32 -0
- package/dist/providers/websearch.js +346 -0
- package/dist/router.d.ts +31 -0
- package/dist/router.js +214 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.js +52 -0
- package/dist/store.d.ts +32 -0
- package/dist/store.js +95 -0
- package/dist/types.d.ts +82 -0
- package/dist/types.js +1 -0
- package/dist/util/http.d.ts +19 -0
- package/dist/util/http.js +34 -0
- package/dist/util/match.d.ts +23 -0
- package/dist/util/match.js +72 -0
- package/dist/util/names.d.ts +11 -0
- package/dist/util/names.js +56 -0
- package/dist/util/patterns.d.ts +14 -0
- package/dist/util/patterns.js +61 -0
- package/package.json +55 -4
package/.env.example
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# All optional. Free providers work with no keys at all.
|
|
2
|
+
|
|
3
|
+
# Your email or project URL, sent in the User-Agent. Wikimedia gives ~200 req/min with it (~10 without); SEC requires an email.
|
|
4
|
+
ENRICH_CONTACT=
|
|
5
|
+
|
|
6
|
+
# Raises GitHub search limit (10 -> 30/min). Any classic/fine-grained token with no scopes works.
|
|
7
|
+
GITHUB_TOKEN=
|
|
8
|
+
|
|
9
|
+
# Free-tier email finders: use YOUR OWN account on the free plan. One account each; never rotate keys.
|
|
10
|
+
HUNTER_API_KEY= # hunter.io, 50 credits/month
|
|
11
|
+
PDL_API_KEY= # peopledatalabs.com, 100 enrichments/month
|
|
12
|
+
ENROW_API_KEY= # enrow.io paid plans only. On the free plan (50 credits/month) run: openrich login enrow
|
|
13
|
+
ENROW_MCP_TOKEN= # written by `openrich login enrow` (Enrow's MCP server, OAuth, valid 365 days)
|
|
14
|
+
PROSPEO_API_KEY= # prospeo.io, 100 credits/month, 50 API calls/day, accepts Gmail sign-up
|
|
15
|
+
GETPROSPECT_API_KEY= # getprospect.com, 50 valid emails/month, API on free plan (work email to sign up)
|
|
16
|
+
GRAVATAR_API_KEY= # optional, higher Gravatar profile limits
|
|
17
|
+
|
|
18
|
+
# Email verification over SMTP. Only useful from a server with outbound port 25 and a clean IP
|
|
19
|
+
# (home/office IPs are usually on Spamhaus, and Google answers "OK" to everything from them).
|
|
20
|
+
SMTP_CHECK=off # on = built-in checker
|
|
21
|
+
SMTP_HELO= # e.g. mail.yourdomain.com (should match the server's reverse DNS)
|
|
22
|
+
SMTP_FROM= # e.g. verify@yourdomain.com
|
|
23
|
+
REACHER_URL= # or a self-hosted Reacher: http://localhost:8080
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 sk1122
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,411 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="assets/logo.svg" width="168" alt="openrich logo: a green valley inside a rounded tile">
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
<h1 align="center">openrich</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<b>Free-first people enrichment.</b> One waterfall over 80 sources.<br>
|
|
9
|
+
Give it a name and a company. Get back a work email, title, LinkedIn and profiles, each with a confidence score and the sources that agree.
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<img alt="sources" src="https://img.shields.io/badge/sources-80-2f7d4f">
|
|
14
|
+
<img alt="free" src="https://img.shields.io/badge/no--setup%20sources-38-3c9a5f">
|
|
15
|
+
<img alt="deps" src="https://img.shields.io/badge/runtime%20deps-0-5aa870">
|
|
16
|
+
<img alt="node" src="https://img.shields.io/badge/node-%E2%89%A522.13-6fb37f">
|
|
17
|
+
<a href="https://www.npmjs.com/package/openrich"><img alt="npm" src="https://img.shields.io/npm/v/openrich?color=2f7d4f"></a>
|
|
18
|
+
</p>
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Why
|
|
23
|
+
|
|
24
|
+
Enrichment tools charge per lookup for data that is often public. openrich asks the free, open sources first
|
|
25
|
+
(GitHub, ORCID, Wikidata, Bluesky, company registries and 36 more). It uses your own free-plan API keys only
|
|
26
|
+
for the fields that are still missing, and it tracks each plan's quota so you never hit a paywall.
|
|
27
|
+
|
|
28
|
+
- **Free first.** 41 free sources; 38 work with no setup at all.
|
|
29
|
+
- **Pay nothing.** 39 free-tier APIs are used one at a time, only when needed, within their free quota.
|
|
30
|
+
- **Confidence, not guesses.** Every field says how sure it is and which sources agree.
|
|
31
|
+
- **Local only.** Results are cached on your machine. Nothing is shared.
|
|
32
|
+
- **Zero dependencies.** One small package, nothing else installed.
|
|
33
|
+
|
|
34
|
+
## Quick start
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npx openrich person --name "Patrick Collison" --domain stripe.com --free-only
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Or install it: `npm i -g openrich`, then `openrich …`. Needs Node 22.13 or newer.
|
|
41
|
+
|
|
42
|
+
Keys are optional. Put your own free-plan keys in `~/.openrich/.env`, one `KEY=value` per line
|
|
43
|
+
(see [`.env.example`](.env.example)). The cache lives in the same folder.
|
|
44
|
+
|
|
45
|
+
Real output, free sources only, no keys, 5–6 s:
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
Patrick Collison @ stripe.com
|
|
49
|
+
email patrick@stripe.com 0.88 gravatar+libravatar
|
|
50
|
+
linkedin https://www.linkedin.com/in/patrickcollison 0.97 parallel-search+wikidata
|
|
51
|
+
company Stripe 0.95 wikidata+github
|
|
52
|
+
twitter https://x.com/patrickc 0.98 wikidata+keybase
|
|
53
|
+
website https://patrickcollison.com/ 0.98 wikidata+github+hackernews
|
|
54
|
+
location San Francisco 0.95 keybase+github
|
|
55
|
+
github https://github.com/pc 0.97 keybase+github
|
|
56
|
+
bio Patrick Collison is an Irish entrepreneur, … 0.85 wikipedia
|
|
57
|
+
… photo, profile, title, name
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
A trace line under the result lists every source that ran, with its time and result.
|
|
61
|
+
|
|
62
|
+
## How it works
|
|
63
|
+
|
|
64
|
+
A lookup runs in two stages. The free stage asks every open source in parallel. The free-tier stage is a
|
|
65
|
+
waterfall: it calls one keyed API at a time, and only while a wanted field is still weak.
|
|
66
|
+
|
|
67
|
+
<p align="center"><img src="assets/diagrams/flow.svg" alt="How a lookup flows: free sources in parallel, merge, then the free-tier waterfall"></p>
|
|
68
|
+
|
|
69
|
+
<details><summary>diagram source (mermaid)</summary>
|
|
70
|
+
|
|
71
|
+
```mermaid
|
|
72
|
+
flowchart LR
|
|
73
|
+
Q([name + domain<br/>or email<br/>or GitHub login]) --> F
|
|
74
|
+
|
|
75
|
+
subgraph F [Stage 1: free sources, in parallel]
|
|
76
|
+
direction TB
|
|
77
|
+
F1[GitHub · pattern · Gravatar · OpenPGP]
|
|
78
|
+
F2[Wikidata · Wikipedia · ORCID · OpenAlex …]
|
|
79
|
+
F3[GitLab · npm · Hacker News · Bluesky …]
|
|
80
|
+
F4[Companies House · SEC EDGAR · Brreg …]
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
F --> M{{"merge<br/>1 − Π(1 − c)"}}
|
|
84
|
+
M --> C{wanted field<br/>below 0.8?}
|
|
85
|
+
C -- no --> R([result + sources])
|
|
86
|
+
C -- yes --> W
|
|
87
|
+
|
|
88
|
+
subgraph W [Stage 2: free-tier waterfall, one at a time]
|
|
89
|
+
direction TB
|
|
90
|
+
W1[profile finders] --> W2[verifiers] --> W3[email finders] --> W4[AI research] --> W5[one-time grants]
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
W -- "new inputs<br/>(email, username)" --> F
|
|
94
|
+
W --> M
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
</details>
|
|
98
|
+
|
|
99
|
+
### Stage 1: free sources
|
|
100
|
+
|
|
101
|
+
Each source starts as soon as its inputs exist. It does not wait for a round to finish.
|
|
102
|
+
When one source finds something new (a confirmed email, a GitHub login, an X handle), the sources that
|
|
103
|
+
need it start right away.
|
|
104
|
+
|
|
105
|
+
<p align="center"><img src="assets/diagrams/free-stage.svg" alt="Free stage: sources start as soon as their inputs exist"></p>
|
|
106
|
+
|
|
107
|
+
<details><summary>diagram source (mermaid)</summary>
|
|
108
|
+
|
|
109
|
+
```mermaid
|
|
110
|
+
sequenceDiagram
|
|
111
|
+
autonumber
|
|
112
|
+
participant R as router
|
|
113
|
+
participant G as GitHub
|
|
114
|
+
participant P as pattern
|
|
115
|
+
participant V as Gravatar / OpenPGP
|
|
116
|
+
participant D as dev platforms
|
|
117
|
+
R->>G: search "Patrick Collison" + stripe.com
|
|
118
|
+
R->>P: guess first@stripe.com, flast@ …
|
|
119
|
+
G-->>R: login "pcollison", commit email
|
|
120
|
+
Note over R: new inputs: username, email
|
|
121
|
+
R->>V: profile for the email
|
|
122
|
+
R->>D: npm / GitLab / HN for "pcollison"
|
|
123
|
+
V-->>R: avatar, name confirmed
|
|
124
|
+
D-->>R: bio, links
|
|
125
|
+
Note over R: free budget 10 s, then merge
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
</details>
|
|
129
|
+
|
|
130
|
+
- Each request has a timeout (`ENRICH_TIMEOUT_MS`, default 6 s).
|
|
131
|
+
- The whole stage has a budget (`ENRICH_FREE_BUDGET_MS`, default 10 s).
|
|
132
|
+
- A source reruns on new inputs only if it opts in, and at most 3 times.
|
|
133
|
+
|
|
134
|
+
### Stage 2: free-tier waterfall
|
|
135
|
+
|
|
136
|
+
The router picks the next keyed provider only while `email`, `title`, `company` or `linkedin` is below
|
|
137
|
+
0.8 confidence. After each call it runs Stage 1 again with whatever is new.
|
|
138
|
+
|
|
139
|
+
<p align="center"><img src="assets/diagrams/waterfall.svg" alt="Free-tier waterfall order"></p>
|
|
140
|
+
|
|
141
|
+
<details><summary>diagram source (mermaid)</summary>
|
|
142
|
+
|
|
143
|
+
```mermaid
|
|
144
|
+
flowchart TD
|
|
145
|
+
A[need a field?] -->|yes| B[cheap profile finders<br/>exa-people · parallel-entity]
|
|
146
|
+
B --> C[recurring verifiers<br/>check the best email candidate]
|
|
147
|
+
C --> D[recurring email finders<br/>prospeo · enrow · getprospect · hunter · tomba …]
|
|
148
|
+
D --> E[AI research<br/>pdl · parallel-task · exa-websets]
|
|
149
|
+
E --> F[one-time grants<br/>emailable · bouncer · kickbox …]
|
|
150
|
+
A -->|no| Z[stop]
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
</details>
|
|
154
|
+
|
|
155
|
+
Rules the waterfall keeps:
|
|
156
|
+
|
|
157
|
+
- **Recurring free quota before one-time credits.** Monthly plans refill. One-time grants do not.
|
|
158
|
+
- **A verifier never checks the same candidate twice.**
|
|
159
|
+
- **A provider that answers 402 or 429 is skipped** for the rest of the period.
|
|
160
|
+
- **Calls that cost credits even on a miss** (`chargesOnMiss`) are counted every time.
|
|
161
|
+
|
|
162
|
+
### Merge
|
|
163
|
+
|
|
164
|
+
The same value from independent sources raises confidence:
|
|
165
|
+
|
|
166
|
+
```
|
|
167
|
+
confidence = 1 − (1 − c₁)(1 − c₂)…(1 − cₙ)
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Two sources at 0.6 give 0.84. A confirmed email also teaches the domain's pattern (for example
|
|
171
|
+
`{first}.{last}`), so the next person at that company gets a strong guess for free.
|
|
172
|
+
|
|
173
|
+
### Right person, not a namesake
|
|
174
|
+
|
|
175
|
+
Many people share a name, and copycat accounts copy a famous person's name, company, bio and website.
|
|
176
|
+
So every source scores a profile match by its evidence:
|
|
177
|
+
|
|
178
|
+
| Evidence | Confidence |
|
|
179
|
+
|---|---|
|
|
180
|
+
| **Linked**: the person's own site links to the account, or a confirmed account links to it | 0.9 |
|
|
181
|
+
| **Claimed**: name and company both match, but only as text on the profile | 0.7 at most |
|
|
182
|
+
| **Name only**, and it is the one profile with that name in the results | 0.5 |
|
|
183
|
+
| Name only, with namesakes | dropped |
|
|
184
|
+
|
|
185
|
+
A claimed match stays below the 0.8 "confident" line until a second, independent source agrees.
|
|
186
|
+
|
|
187
|
+
## Sources
|
|
188
|
+
|
|
189
|
+
**80 sources**: 41 with no key, 23 free-tier finders, 16 free-tier verifiers.
|
|
190
|
+
|
|
191
|
+
<details open>
|
|
192
|
+
<summary><b>Free, no key (41)</b></summary>
|
|
193
|
+
|
|
194
|
+
| Group | Sources |
|
|
195
|
+
|---|---|
|
|
196
|
+
| Core | github, email pattern, gravatar, openpgp |
|
|
197
|
+
| Knowledge | wikidata, wikipedia |
|
|
198
|
+
| Research | orcid, openalex, semantic-scholar, inspire-hep, nsf-awards, nih-reporter, europe-pmc, openreview |
|
|
199
|
+
| Dev platforms | gitlab, stackexchange, hackernews, devto, keybase, npm, crates, rubygems, metacpan, launchpad, huggingface, codeberg, dockerhub |
|
|
200
|
+
| Social and web | bluesky, mastodon, nostr-nip05, medium, team-page, humans-txt, wkd, libravatar |
|
|
201
|
+
| Registries | uk-companies-house¹, fr-recherche-entreprises, no-brreg, sec-edgar², uk-parliament |
|
|
202
|
+
| Web search | parallel-search (keyless MCP) |
|
|
203
|
+
|
|
204
|
+
<sub>¹ free key. ² needs `ENRICH_CONTACT` with an email, per SEC rules.</sub>
|
|
205
|
+
</details>
|
|
206
|
+
|
|
207
|
+
<details>
|
|
208
|
+
<summary><b>Free-tier email and profile finders (23)</b></summary>
|
|
209
|
+
|
|
210
|
+
| Provider | Free quota | Key |
|
|
211
|
+
|---|---|---|
|
|
212
|
+
| exa-people | 2000/month | `EXA_API_KEY` |
|
|
213
|
+
| parallel-entity | 1000/month | `PARALLEL_API_KEY` |
|
|
214
|
+
| prospeo | 100/month | `PROSPEO_API_KEY` |
|
|
215
|
+
| enrow | 50/month | `ENROW_API_KEY` or `openrich login enrow` |
|
|
216
|
+
| getprospect | 50/month | `GETPROSPECT_API_KEY` |
|
|
217
|
+
| hunter | 50/month | `HUNTER_API_KEY` |
|
|
218
|
+
| tomba | 25/month | `TOMBA_KEY` |
|
|
219
|
+
| snov | 50/month | `SNOV_CLIENT_ID` |
|
|
220
|
+
| skrapp | 50/month | `SKRAPP_API_KEY` |
|
|
221
|
+
| surfe | 20/month | `SURFE_API_KEY` |
|
|
222
|
+
| minelead | 25/month | `MINELEAD_API_KEY` |
|
|
223
|
+
| getemail | 10/month | `GETEMAIL_API_KEY` |
|
|
224
|
+
| cufinder | 16/month | `CUFINDER_API_KEY` |
|
|
225
|
+
| datagma | 100/month | `DATAGMA_API_KEY` |
|
|
226
|
+
| diffbot | 400/month | `DIFFBOT_TOKEN` |
|
|
227
|
+
| apollo | 75/month | `APOLLO_API_KEY` |
|
|
228
|
+
| pdl | 100/month | `PDL_API_KEY` |
|
|
229
|
+
| parallel-task | 500/month | `PARALLEL_API_KEY` |
|
|
230
|
+
| exa-websets | 150/month | `EXA_API_KEY` |
|
|
231
|
+
| google-kg | 100000/day | `GOOGLE_KG_API_KEY` |
|
|
232
|
+
| voilanorbert | 50 one-time | `VOILANORBERT_API_KEY` |
|
|
233
|
+
| dropcontact | 50 one-time | `DROPCONTACT_API_KEY` |
|
|
234
|
+
| icypeas | 50 one-time | `ICYPEAS_API_KEY` |
|
|
235
|
+
</details>
|
|
236
|
+
|
|
237
|
+
<details>
|
|
238
|
+
<summary><b>Free-tier email verifiers (16)</b></summary>
|
|
239
|
+
|
|
240
|
+
| Provider | Free quota | Key |
|
|
241
|
+
|---|---|---|
|
|
242
|
+
| mailboxvalidator | 300/month | `MAILBOXVALIDATOR_API_KEY` |
|
|
243
|
+
| verifalia | 25/day | `VERIFALIA_USER` |
|
|
244
|
+
| reoon | 20/day | `REOON_API_KEY` |
|
|
245
|
+
| zerobounce | 100/month | `ZEROBOUNCE_API_KEY` |
|
|
246
|
+
| quickemailverification | 100/month | `QEV_API_KEY` |
|
|
247
|
+
| abstract-email | 100/month | `ABSTRACT_EMAIL_API_KEY` |
|
|
248
|
+
| enrow-verify | 200/month | `ENROW_API_KEY` |
|
|
249
|
+
| hunter-verify | 100/month | `HUNTER_API_KEY` |
|
|
250
|
+
| getprospect-verify | 1250 one-time | `GETPROSPECT_API_KEY` |
|
|
251
|
+
| emailable | 250 one-time | `EMAILABLE_API_KEY` |
|
|
252
|
+
| millionverifier | 100 one-time | `MILLIONVERIFIER_API_KEY` |
|
|
253
|
+
| bouncer | 100 one-time | `BOUNCER_API_KEY` |
|
|
254
|
+
| clearout | 100 one-time | `CLEAROUT_API_TOKEN` |
|
|
255
|
+
| debounce | 100 one-time | `DEBOUNCE_API_KEY` |
|
|
256
|
+
| kickbox | 100 one-time | `KICKBOX_API_KEY` |
|
|
257
|
+
| neverbounce | 10 one-time | `NEVERBOUNCE_API_KEY` |
|
|
258
|
+
</details>
|
|
259
|
+
|
|
260
|
+
Run `openrich providers` to see which are on and how much quota is left.
|
|
261
|
+
|
|
262
|
+
**Left out on purpose:** breach and leak data, court and inmate records, salary lists, gaming sites, and
|
|
263
|
+
sources that block bots (DBLP) or forbid this use. The research behind every choice (426 sources reviewed)
|
|
264
|
+
is in [`research/people-sources.md`](research/people-sources.md).
|
|
265
|
+
|
|
266
|
+
## Usage
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
openrich person --name "Linus Torvalds" --domain linux-foundation.org
|
|
270
|
+
openrich person --email torvalds@linux-foundation.org
|
|
271
|
+
openrich person --github torvalds
|
|
272
|
+
openrich eval people.csv # score against people whose email you know
|
|
273
|
+
openrich providers # what is on, quota left
|
|
274
|
+
openrich serve --port 8787 # HTTP: POST /enrich {name, domain, ...}, POST /mcp
|
|
275
|
+
openrich mcp # MCP server on stdio, for AI agents
|
|
276
|
+
openrich login enrow # sign in to a provider's MCP server
|
|
277
|
+
openrich mcp-tools enrow # list that server's tools
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
### HTTP
|
|
282
|
+
|
|
283
|
+
```bash
|
|
284
|
+
curl -s localhost:8787/enrich -H 'content-type: application/json' \
|
|
285
|
+
-d '{"name":"Grace Hopper","company":"US Navy"}'
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
## Use it from AI agents (MCP)
|
|
289
|
+
|
|
290
|
+
openrich is an MCP server too, so Claude Code, Cursor, Claude Desktop or any agent can look people up.
|
|
291
|
+
|
|
292
|
+
```bash
|
|
293
|
+
claude mcp add openrich -- npx -y openrich mcp
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
Or for any client that takes a JSON config:
|
|
297
|
+
|
|
298
|
+
```json
|
|
299
|
+
{ "mcpServers": { "openrich": { "command": "npx", "args": ["-y", "openrich", "mcp"] } } }
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
| Tool | What it does |
|
|
303
|
+
|---|---|
|
|
304
|
+
| `enrich_person` | `{name, domain}` or `{email}` or `{github}` → each field with value, confidence and sources. `free_only: true` skips free-tier credits. |
|
|
305
|
+
| `list_sources` | Every source, whether it is on, and the free quota left. |
|
|
306
|
+
|
|
307
|
+
Remote agents can use the same tools over HTTP: `openrich serve`, then `POST http://127.0.0.1:8787/mcp`.
|
|
308
|
+
|
|
309
|
+
## Calling MCP servers as APIs
|
|
310
|
+
|
|
311
|
+
Some providers give their free plan only through an MCP server (Enrow is one). `src/mcp/` is a small MCP
|
|
312
|
+
client: Streamable HTTP, JSON-RPC, OAuth with dynamic client registration and PKCE. A provider calls
|
|
313
|
+
`tools/call` the same way it calls a REST endpoint.
|
|
314
|
+
|
|
315
|
+
<p align="center"><img src="assets/diagrams/mcp-login.svg" alt="MCP sign-in and call sequence"></p>
|
|
316
|
+
|
|
317
|
+
<details><summary>diagram source (mermaid)</summary>
|
|
318
|
+
|
|
319
|
+
```mermaid
|
|
320
|
+
sequenceDiagram
|
|
321
|
+
participant U as you
|
|
322
|
+
participant O as openrich
|
|
323
|
+
participant A as provider auth
|
|
324
|
+
participant M as provider MCP
|
|
325
|
+
U->>O: openrich login enrow
|
|
326
|
+
O->>A: register client, PKCE challenge
|
|
327
|
+
O-->>U: open sign-in URL
|
|
328
|
+
U->>A: sign in with your own account
|
|
329
|
+
A-->>O: code → 127.0.0.1 callback
|
|
330
|
+
O->>A: exchange code + verifier
|
|
331
|
+
A-->>O: access token (saved to .env)
|
|
332
|
+
O->>M: tools/call find_email {...}
|
|
333
|
+
M-->>O: result
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
</details>
|
|
337
|
+
|
|
338
|
+
Keyless servers work too: Parallel's web search MCP needs no token.
|
|
339
|
+
|
|
340
|
+
## Settings
|
|
341
|
+
|
|
342
|
+
| Variable | Default | What it does |
|
|
343
|
+
|---|---|---|
|
|
344
|
+
| `ENRICH_CONTACT` | none | Your contact (email or URL) in the User-Agent. Wikimedia allows ~20× more requests with it. SEC requires it. |
|
|
345
|
+
| `ENRICH_TIMEOUT_MS` | 6000 | Timeout per request. |
|
|
346
|
+
| `ENRICH_FREE_BUDGET_MS` | 10000 | Total time for the free stage. |
|
|
347
|
+
| `OPENRICH_HOME` | `~/.openrich` | Folder for keys (`.env`) and the cache. |
|
|
348
|
+
| `ENRICH_DB` | `~/.openrich/db.sqlite` | Where the cache, quotas and learned patterns live. |
|
|
349
|
+
| `PARALLEL_KEYLESS` | on | Set `off` to skip Parallel's keyless search. |
|
|
350
|
+
| `*_API_KEY` | none | Free-plan keys. See [`.env.example`](.env.example). |
|
|
351
|
+
|
|
352
|
+
## Cache
|
|
353
|
+
|
|
354
|
+
Everything is stored in one local SQLite file (`node:sqlite`):
|
|
355
|
+
|
|
356
|
+
| Table | Holds |
|
|
357
|
+
|---|---|
|
|
358
|
+
| `cache` | each provider's answers, plus whole lookups (row `lookup`) keyed on the original query and the enabled sources |
|
|
359
|
+
| `quota` | calls used per provider per period |
|
|
360
|
+
| `patterns` | learned email patterns per domain |
|
|
361
|
+
| `domain_info` | MX and mail host per domain |
|
|
362
|
+
|
|
363
|
+
A repeat lookup is answered from the `lookup` row without calling any source. Adding a key or changing the wanted fields runs a fresh lookup; `--fresh` forces one.
|
|
364
|
+
|
|
365
|
+
The cache is never shared. A shared cache would turn this into a data broker.
|
|
366
|
+
|
|
367
|
+
## Speed
|
|
368
|
+
|
|
369
|
+
The free stage is event-driven, not round-based. On a laptop:
|
|
370
|
+
|
|
371
|
+
| | before | now |
|
|
372
|
+
|---|---|---|
|
|
373
|
+
| full lookup, cold | ~36 s | 5–8 s |
|
|
374
|
+
| repeat lookup, cached | ~2.6 s | **1 ms** (0.09 s for the whole command) |
|
|
375
|
+
|
|
376
|
+
## Layout
|
|
377
|
+
|
|
378
|
+
```text
|
|
379
|
+
src/
|
|
380
|
+
cli.ts commands
|
|
381
|
+
router.ts two-stage router, merge, quotas
|
|
382
|
+
store.ts SQLite cache
|
|
383
|
+
env.ts loads .env first
|
|
384
|
+
mcp/ MCP server (for agents), MCP client + OAuth (for providers)
|
|
385
|
+
providers/ one file per source group
|
|
386
|
+
knowledge.ts research.ts devplatforms.ts social.ts registries.ts
|
|
387
|
+
finders.ts verifiers.ts freetier.ts websearch.ts index.ts
|
|
388
|
+
util/ http, names, matching
|
|
389
|
+
test/ node:test, no network (mocked fetch)
|
|
390
|
+
bench/ accuracy benchmark (Wikidata answer key)
|
|
391
|
+
research/ the source review
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
## Develop
|
|
395
|
+
|
|
396
|
+
```bash
|
|
397
|
+
npm test # 112 tests, no network
|
|
398
|
+
npm run typecheck # tsc --noEmit
|
|
399
|
+
node bench/build.ts # answer key: 60 people with GitHub/X/LinkedIn curated on Wikidata (hashed)
|
|
400
|
+
node bench/run.ts # grade the free sources against it (Wikidata itself is switched off)
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
The benchmark uses no LLM. A run where sources hit rate limits is reported as invalid instead of scored.
|
|
404
|
+
|
|
405
|
+
Adding a source: write a `Provider` (`id`, `kind`, `needs`, `run`) in the right file under
|
|
406
|
+
`src/providers/`, add a test with a mocked fetch, and add it to `DEFAULT_PROVIDERS` in
|
|
407
|
+
`src/providers/index.ts`.
|
|
408
|
+
|
|
409
|
+
## License
|
|
410
|
+
|
|
411
|
+
MIT. See [LICENSE](LICENSE).
|