finprodata-sdk 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/LICENSE +21 -0
- package/README.md +19 -0
- package/dist/index.d.ts +338 -0
- package/dist/index.js +216 -0
- package/package.json +16 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Brandon Hopen
|
|
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
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# finprodata-sdk
|
|
2
|
+
|
|
3
|
+
TypeScript SDK for the [finprodata](https://api.finprodata.com) API — verified, never-stale data on finance professionals (PE/VC firms, fund managers, LPs, and the people who work there).
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install finprodata-sdk
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { Finprodata } from "finprodata-sdk";
|
|
11
|
+
|
|
12
|
+
const client = new Finprodata({ apiKey: process.env.FINPRODATA_API_KEY! });
|
|
13
|
+
|
|
14
|
+
// Search is free; revealing a verified email costs 1 credit.
|
|
15
|
+
const firms = await client.searchFirms({ state: "TX", focusInvestorType: "private_equity" });
|
|
16
|
+
const leads = await client.leads({ firmCreditStrategy: "direct_lending", role: "operations" });
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Get a key at https://api.finprodata.com. Full API docs: https://api.finprodata.com/docs
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
export interface Provenanced<T> {
|
|
2
|
+
value: T;
|
|
3
|
+
source: string;
|
|
4
|
+
source_ref?: string | null;
|
|
5
|
+
last_verified_at: string;
|
|
6
|
+
confidence: number;
|
|
7
|
+
}
|
|
8
|
+
export interface FocusTag {
|
|
9
|
+
dimension: "sector" | "stage" | "check_size" | "geography" | "investor_type";
|
|
10
|
+
value: string;
|
|
11
|
+
source: string;
|
|
12
|
+
last_verified_at: string;
|
|
13
|
+
confidence: number;
|
|
14
|
+
}
|
|
15
|
+
export interface Firm {
|
|
16
|
+
id: string;
|
|
17
|
+
crd_number: number | null;
|
|
18
|
+
name: string;
|
|
19
|
+
org_type: string;
|
|
20
|
+
city: string | null;
|
|
21
|
+
state: string | null;
|
|
22
|
+
aum: number | null;
|
|
23
|
+
website: string | null;
|
|
24
|
+
focus_tags: FocusTag[];
|
|
25
|
+
}
|
|
26
|
+
export interface PersonEmployment {
|
|
27
|
+
firm_id: string;
|
|
28
|
+
firm_name: string;
|
|
29
|
+
title: Provenanced<string | null>;
|
|
30
|
+
}
|
|
31
|
+
export interface ContactPresence {
|
|
32
|
+
channel: string;
|
|
33
|
+
available: boolean;
|
|
34
|
+
status: string;
|
|
35
|
+
last_verified_at: string;
|
|
36
|
+
}
|
|
37
|
+
export interface Person {
|
|
38
|
+
id: string;
|
|
39
|
+
crd_number: number | null;
|
|
40
|
+
full_name: string;
|
|
41
|
+
linkedin_url: string | null;
|
|
42
|
+
employments: PersonEmployment[];
|
|
43
|
+
contacts: ContactPresence[];
|
|
44
|
+
}
|
|
45
|
+
export interface Page<T> {
|
|
46
|
+
data: T[];
|
|
47
|
+
/** True result-set size — trust this, never count visible rows. */
|
|
48
|
+
total_matches: number;
|
|
49
|
+
next_cursor: string | null;
|
|
50
|
+
}
|
|
51
|
+
export interface IdentifyQuery {
|
|
52
|
+
name: string;
|
|
53
|
+
firm?: string;
|
|
54
|
+
state?: string;
|
|
55
|
+
title?: string;
|
|
56
|
+
}
|
|
57
|
+
export interface IdentifyCandidate {
|
|
58
|
+
person_id: string;
|
|
59
|
+
full_name: string;
|
|
60
|
+
crd_number: number | null;
|
|
61
|
+
firm_name: string | null;
|
|
62
|
+
firm_state: string | null;
|
|
63
|
+
title: string | null;
|
|
64
|
+
confidence: number;
|
|
65
|
+
data_age_days: number | null;
|
|
66
|
+
}
|
|
67
|
+
export interface IdentifyResult {
|
|
68
|
+
query: IdentifyQuery;
|
|
69
|
+
/** false = no acceptable match exists; STOP, do not invent one. */
|
|
70
|
+
match_found: boolean;
|
|
71
|
+
/** true = the server judged the top candidate unambiguous. */
|
|
72
|
+
auto_match: boolean;
|
|
73
|
+
total_matches: number;
|
|
74
|
+
best: IdentifyCandidate | null;
|
|
75
|
+
candidates: IdentifyCandidate[];
|
|
76
|
+
}
|
|
77
|
+
export interface RevealResponse {
|
|
78
|
+
person_id: string;
|
|
79
|
+
cached: boolean;
|
|
80
|
+
/** true only for registry-confirmed employment + deliverable email. */
|
|
81
|
+
verified: boolean;
|
|
82
|
+
/** Provenance of the employment behind this contact. */
|
|
83
|
+
verification_tier: "registry_verified" | "web_confirmed" | "unconfirmed";
|
|
84
|
+
reason: string | null;
|
|
85
|
+
email: {
|
|
86
|
+
value: string;
|
|
87
|
+
status: string;
|
|
88
|
+
source: string;
|
|
89
|
+
last_verified_at: string;
|
|
90
|
+
confidence: number;
|
|
91
|
+
} | null;
|
|
92
|
+
units_spent: number;
|
|
93
|
+
}
|
|
94
|
+
export interface ContributeResponse {
|
|
95
|
+
accepted: boolean;
|
|
96
|
+
contribution_id?: string;
|
|
97
|
+
status?: string;
|
|
98
|
+
reason?: string;
|
|
99
|
+
note?: string;
|
|
100
|
+
}
|
|
101
|
+
export interface UsageSummary {
|
|
102
|
+
period: string;
|
|
103
|
+
by_cost_class: Record<string, number>;
|
|
104
|
+
total_units: number;
|
|
105
|
+
monthly_unit_cap: number | null;
|
|
106
|
+
units_remaining: number | null;
|
|
107
|
+
client_version?: string | null;
|
|
108
|
+
}
|
|
109
|
+
export declare class FinprodataError extends Error {
|
|
110
|
+
readonly status: number;
|
|
111
|
+
readonly title: string;
|
|
112
|
+
readonly detail: Record<string, unknown>;
|
|
113
|
+
constructor(status: number, title: string, detail: Record<string, unknown>);
|
|
114
|
+
get retryAfterSeconds(): number | null;
|
|
115
|
+
}
|
|
116
|
+
export interface FinprodataOptions {
|
|
117
|
+
apiKey: string;
|
|
118
|
+
baseUrl?: string;
|
|
119
|
+
fetchFn?: typeof fetch;
|
|
120
|
+
/**
|
|
121
|
+
* Reporting client id + version, sent as the X-Finprodata-Client header on
|
|
122
|
+
* every request (e.g. "finprodata-mcp/0.2.1"). Lets the server see which
|
|
123
|
+
* client version each key is on. Optional.
|
|
124
|
+
*/
|
|
125
|
+
clientVersion?: string;
|
|
126
|
+
}
|
|
127
|
+
export declare class Finprodata {
|
|
128
|
+
private apiKey;
|
|
129
|
+
private baseUrl;
|
|
130
|
+
private fetchFn;
|
|
131
|
+
private clientVersion?;
|
|
132
|
+
constructor(opts: FinprodataOptions);
|
|
133
|
+
private request;
|
|
134
|
+
searchFirms(params?: {
|
|
135
|
+
q?: string;
|
|
136
|
+
state?: string;
|
|
137
|
+
orgType?: string;
|
|
138
|
+
focusInvestorType?: string;
|
|
139
|
+
focusSector?: string;
|
|
140
|
+
focusStage?: string;
|
|
141
|
+
focusGeography?: string;
|
|
142
|
+
aumMin?: number;
|
|
143
|
+
aumMax?: number;
|
|
144
|
+
/** Form D raise size — the long-tail sizing signal */
|
|
145
|
+
offeringMin?: number;
|
|
146
|
+
offeringMax?: number;
|
|
147
|
+
limit?: number;
|
|
148
|
+
cursor?: string;
|
|
149
|
+
}): Promise<Page<Firm>>;
|
|
150
|
+
getFirm(idOrCrd: string): Promise<Firm>;
|
|
151
|
+
searchPeople(params?: {
|
|
152
|
+
q?: string;
|
|
153
|
+
firmId?: string;
|
|
154
|
+
title?: string;
|
|
155
|
+
/** people AT firms in this state */
|
|
156
|
+
firmState?: string;
|
|
157
|
+
/** people AT firms with this investing focus, e.g. venture_capital */
|
|
158
|
+
firmInvestorType?: string;
|
|
159
|
+
limit?: number;
|
|
160
|
+
cursor?: string;
|
|
161
|
+
}): Promise<Page<Person>>;
|
|
162
|
+
getPerson(id: string): Promise<Person>;
|
|
163
|
+
/** Costs credits when not served from cache. Check usage() first. */
|
|
164
|
+
revealContact(personId: string, opts?: {
|
|
165
|
+
maxAgeDays?: number;
|
|
166
|
+
}): Promise<RevealResponse>;
|
|
167
|
+
/**
|
|
168
|
+
* Contribute a contact detail you verified that finprodata doesn't have. FREE.
|
|
169
|
+
* It enters quarantine and is verified before being served; you earn credit
|
|
170
|
+
* when it is promoted. Only submit details with a clean evidence source.
|
|
171
|
+
*/
|
|
172
|
+
contribute(input: {
|
|
173
|
+
entityType: "person" | "firm";
|
|
174
|
+
entityId: string;
|
|
175
|
+
field: "email" | "phone" | "linkedin_url" | "title" | "website";
|
|
176
|
+
value: string;
|
|
177
|
+
evidenceUrl?: string;
|
|
178
|
+
}): Promise<ContributeResponse>;
|
|
179
|
+
/** Smartlead-ready CSV of already-revealed contacts. Never enriches. */
|
|
180
|
+
exportSmartleadCsv(personIds: string[]): Promise<string>;
|
|
181
|
+
/**
|
|
182
|
+
* Batch person resolution (up to 50 queries in ONE call). The server
|
|
183
|
+
* decides match quality: match_found false means stop; auto_match true
|
|
184
|
+
* means the top candidate is safe to use without human review.
|
|
185
|
+
*/
|
|
186
|
+
identifyPeople(queries: IdentifyQuery[]): Promise<{
|
|
187
|
+
results: IdentifyResult[];
|
|
188
|
+
}>;
|
|
189
|
+
/** findLPs-style allocator search: pensions, endowments, family offices, funds. FREE. */
|
|
190
|
+
searchAllocators(params?: {
|
|
191
|
+
q?: string;
|
|
192
|
+
type?: string;
|
|
193
|
+
state?: string;
|
|
194
|
+
clientBase?: string;
|
|
195
|
+
aumMin?: number;
|
|
196
|
+
aumMax?: number;
|
|
197
|
+
limit?: number;
|
|
198
|
+
cursor?: string;
|
|
199
|
+
}): Promise<{
|
|
200
|
+
data: unknown[];
|
|
201
|
+
total_matches: number;
|
|
202
|
+
next_cursor: string | null;
|
|
203
|
+
}>;
|
|
204
|
+
/** Connection graph from a firm or person: {nodes, edges}. FREE. */
|
|
205
|
+
network(kind: "firm" | "person", id: string, limit?: number): Promise<{
|
|
206
|
+
seed: string;
|
|
207
|
+
nodes: Array<{
|
|
208
|
+
id: string;
|
|
209
|
+
type: string;
|
|
210
|
+
label: string;
|
|
211
|
+
}>;
|
|
212
|
+
edges: Array<{
|
|
213
|
+
source: string;
|
|
214
|
+
target: string;
|
|
215
|
+
type: string;
|
|
216
|
+
label?: string;
|
|
217
|
+
}>;
|
|
218
|
+
}>;
|
|
219
|
+
usage(): Promise<UsageSummary>;
|
|
220
|
+
/**
|
|
221
|
+
* Composed lead briefs for an ICP: ranked firms each with a rationale, best
|
|
222
|
+
* contact (verified email + confidence only when already revealed), warm
|
|
223
|
+
* paths from your imported connections, and categorized intent signals.
|
|
224
|
+
* FREE; reveal stays the only paid step. Pass format:"csv" (optionally
|
|
225
|
+
* tab:"signals") to get the deliverable spreadsheet tabs as CSV text.
|
|
226
|
+
*/
|
|
227
|
+
leads(params?: {
|
|
228
|
+
role?: string;
|
|
229
|
+
firmInvestorType?: string;
|
|
230
|
+
firmStage?: string;
|
|
231
|
+
firmCreditStrategy?: string;
|
|
232
|
+
firmSignal?: string;
|
|
233
|
+
state?: string;
|
|
234
|
+
aumMin?: number;
|
|
235
|
+
aumMax?: number;
|
|
236
|
+
sinceDays?: number;
|
|
237
|
+
limit?: number;
|
|
238
|
+
format?: "json" | "csv";
|
|
239
|
+
tab?: "contacts" | "signals";
|
|
240
|
+
/** Exclude firms served to this key in the last 30 days — weekly pulls yield NEW leads. */
|
|
241
|
+
fresh?: boolean;
|
|
242
|
+
/** Firm ids to exclude (already in your CRM / do-not-contact). */
|
|
243
|
+
excludeFirmIds?: string[];
|
|
244
|
+
}): Promise<{
|
|
245
|
+
data: LeadBrief[];
|
|
246
|
+
} | string>;
|
|
247
|
+
/**
|
|
248
|
+
* Import your LinkedIn connections (parsed rows from the LinkedIn
|
|
249
|
+
* "Connections" export) as the warm-path substrate for leads(). Scoped to
|
|
250
|
+
* your API key. mode "merge" (default) is idempotent; "replace" clears the
|
|
251
|
+
* previous import. FREE.
|
|
252
|
+
*/
|
|
253
|
+
importConnections(connections: Array<{
|
|
254
|
+
name: string;
|
|
255
|
+
company?: string;
|
|
256
|
+
title?: string;
|
|
257
|
+
}>, opts?: {
|
|
258
|
+
mode?: "merge" | "replace";
|
|
259
|
+
}): Promise<{
|
|
260
|
+
imported: number;
|
|
261
|
+
total: number;
|
|
262
|
+
mode: string;
|
|
263
|
+
}>;
|
|
264
|
+
/** Count + last import time of your stored connections. FREE. */
|
|
265
|
+
connections(): Promise<{
|
|
266
|
+
total: number;
|
|
267
|
+
last_imported_at: string | null;
|
|
268
|
+
}>;
|
|
269
|
+
/**
|
|
270
|
+
* On-demand enrichment: research the given firms live (grounded web search)
|
|
271
|
+
* and write dated, cited intent signals so a thin query becomes a full
|
|
272
|
+
* answer. Bounded (up to 5 firms/call), skips firms researched in the last
|
|
273
|
+
* 30 days, time-guarded. Pass firm ids (from a prior search) or a firm-name
|
|
274
|
+
* query. The freshly written signals then show up in search_people
|
|
275
|
+
* (firm_signal=), /v1/signals, and get_lead_briefs.
|
|
276
|
+
*/
|
|
277
|
+
enrich(params: {
|
|
278
|
+
firmIds?: string[];
|
|
279
|
+
q?: string;
|
|
280
|
+
limit?: number;
|
|
281
|
+
}): Promise<{
|
|
282
|
+
enriched: Array<{
|
|
283
|
+
firm_id: string;
|
|
284
|
+
firm_name: string;
|
|
285
|
+
signals: number;
|
|
286
|
+
ai_signals: number;
|
|
287
|
+
}>;
|
|
288
|
+
total_signals: number;
|
|
289
|
+
skipped_fresh: number;
|
|
290
|
+
not_researched: number;
|
|
291
|
+
}>;
|
|
292
|
+
}
|
|
293
|
+
/** One composed lead brief from GET /v1/leads. */
|
|
294
|
+
export interface LeadBrief {
|
|
295
|
+
firm_id: string;
|
|
296
|
+
firm_name: string;
|
|
297
|
+
state: string | null;
|
|
298
|
+
website: string | null;
|
|
299
|
+
aum: number | null;
|
|
300
|
+
aum_display: string | null;
|
|
301
|
+
score: number;
|
|
302
|
+
rationale: string;
|
|
303
|
+
contact: {
|
|
304
|
+
person_id: string;
|
|
305
|
+
name: string;
|
|
306
|
+
title: string | null;
|
|
307
|
+
linkedin_url: string | null;
|
|
308
|
+
email: string | null;
|
|
309
|
+
email_status: string | null;
|
|
310
|
+
email_confidence: number | null;
|
|
311
|
+
} | null;
|
|
312
|
+
warm_paths: Array<{
|
|
313
|
+
name: string;
|
|
314
|
+
company: string;
|
|
315
|
+
title: string | null;
|
|
316
|
+
}>;
|
|
317
|
+
outreach_hook: string | null;
|
|
318
|
+
signals: Array<{
|
|
319
|
+
signal: string;
|
|
320
|
+
observed_at: string | null;
|
|
321
|
+
evidence: string | null;
|
|
322
|
+
source: string;
|
|
323
|
+
weight: number;
|
|
324
|
+
section: string;
|
|
325
|
+
buying_trigger: string;
|
|
326
|
+
initiative: string;
|
|
327
|
+
}>;
|
|
328
|
+
intel: Array<{
|
|
329
|
+
section: string;
|
|
330
|
+
title: string;
|
|
331
|
+
items: Array<{
|
|
332
|
+
marker: string;
|
|
333
|
+
evidence: string | null;
|
|
334
|
+
signal: string;
|
|
335
|
+
observed_at: string | null;
|
|
336
|
+
}>;
|
|
337
|
+
}>;
|
|
338
|
+
}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
// packages/sdk/src/index.ts
|
|
2
|
+
var FinprodataError = class extends Error {
|
|
3
|
+
constructor(status, title, detail) {
|
|
4
|
+
super(`${status}: ${title}`);
|
|
5
|
+
this.status = status;
|
|
6
|
+
this.title = title;
|
|
7
|
+
this.detail = detail;
|
|
8
|
+
this.name = "FinprodataError";
|
|
9
|
+
}
|
|
10
|
+
status;
|
|
11
|
+
title;
|
|
12
|
+
detail;
|
|
13
|
+
get retryAfterSeconds() {
|
|
14
|
+
const v = this.detail["retry_after"];
|
|
15
|
+
return typeof v === "number" ? v : null;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
var Finprodata = class {
|
|
19
|
+
apiKey;
|
|
20
|
+
baseUrl;
|
|
21
|
+
fetchFn;
|
|
22
|
+
clientVersion;
|
|
23
|
+
constructor(opts) {
|
|
24
|
+
this.apiKey = opts.apiKey;
|
|
25
|
+
this.baseUrl = (opts.baseUrl ?? "https://api.finprodata.com").replace(/\/$/, "");
|
|
26
|
+
this.fetchFn = opts.fetchFn ?? fetch;
|
|
27
|
+
this.clientVersion = opts.clientVersion;
|
|
28
|
+
}
|
|
29
|
+
async request(method, path, opts = {}) {
|
|
30
|
+
const url = new URL(`${this.baseUrl}/v1${path}`);
|
|
31
|
+
for (const [k, v] of Object.entries(opts.query ?? {})) {
|
|
32
|
+
if (v !== void 0) url.searchParams.set(k, String(v));
|
|
33
|
+
}
|
|
34
|
+
const res = await this.fetchFn(url.toString(), {
|
|
35
|
+
method,
|
|
36
|
+
headers: {
|
|
37
|
+
Authorization: `Bearer ${this.apiKey}`,
|
|
38
|
+
...opts.body !== void 0 ? { "Content-Type": "application/json" } : {},
|
|
39
|
+
...this.clientVersion ? { "X-Finprodata-Client": this.clientVersion } : {}
|
|
40
|
+
},
|
|
41
|
+
body: opts.body !== void 0 ? JSON.stringify(opts.body) : void 0
|
|
42
|
+
});
|
|
43
|
+
if (!res.ok) {
|
|
44
|
+
let detail = {};
|
|
45
|
+
try {
|
|
46
|
+
detail = await res.json();
|
|
47
|
+
} catch {
|
|
48
|
+
}
|
|
49
|
+
throw new FinprodataError(
|
|
50
|
+
res.status,
|
|
51
|
+
typeof detail["title"] === "string" ? detail["title"] : res.statusText,
|
|
52
|
+
detail
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
if (opts.raw) return await res.text();
|
|
56
|
+
return await res.json();
|
|
57
|
+
}
|
|
58
|
+
searchFirms(params = {}) {
|
|
59
|
+
return this.request("GET", "/firms", {
|
|
60
|
+
query: {
|
|
61
|
+
q: params.q,
|
|
62
|
+
state: params.state,
|
|
63
|
+
org_type: params.orgType,
|
|
64
|
+
"focus.investor_type": params.focusInvestorType,
|
|
65
|
+
"focus.sector": params.focusSector,
|
|
66
|
+
"focus.stage": params.focusStage,
|
|
67
|
+
"focus.geography": params.focusGeography,
|
|
68
|
+
aum_min: params.aumMin,
|
|
69
|
+
aum_max: params.aumMax,
|
|
70
|
+
offering_min: params.offeringMin,
|
|
71
|
+
offering_max: params.offeringMax,
|
|
72
|
+
limit: params.limit,
|
|
73
|
+
cursor: params.cursor
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
getFirm(idOrCrd) {
|
|
78
|
+
return this.request("GET", `/firms/${encodeURIComponent(idOrCrd)}`);
|
|
79
|
+
}
|
|
80
|
+
searchPeople(params = {}) {
|
|
81
|
+
return this.request("GET", "/people", {
|
|
82
|
+
query: {
|
|
83
|
+
q: params.q,
|
|
84
|
+
firm_id: params.firmId,
|
|
85
|
+
title: params.title,
|
|
86
|
+
firm_state: params.firmState,
|
|
87
|
+
"firm_focus.investor_type": params.firmInvestorType,
|
|
88
|
+
limit: params.limit,
|
|
89
|
+
cursor: params.cursor
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
getPerson(id) {
|
|
94
|
+
return this.request("GET", `/people/${encodeURIComponent(id)}`);
|
|
95
|
+
}
|
|
96
|
+
/** Costs credits when not served from cache. Check usage() first. */
|
|
97
|
+
revealContact(personId, opts = {}) {
|
|
98
|
+
return this.request("POST", `/people/${personId}/reveal`, {
|
|
99
|
+
body: { channels: ["email"], max_age_days: opts.maxAgeDays }
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Contribute a contact detail you verified that finprodata doesn't have. FREE.
|
|
104
|
+
* It enters quarantine and is verified before being served; you earn credit
|
|
105
|
+
* when it is promoted. Only submit details with a clean evidence source.
|
|
106
|
+
*/
|
|
107
|
+
contribute(input) {
|
|
108
|
+
return this.request("POST", "/contributions", {
|
|
109
|
+
body: {
|
|
110
|
+
entity_type: input.entityType,
|
|
111
|
+
entity_id: input.entityId,
|
|
112
|
+
field: input.field,
|
|
113
|
+
value: input.value,
|
|
114
|
+
evidence_url: input.evidenceUrl
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
/** Smartlead-ready CSV of already-revealed contacts. Never enriches. */
|
|
119
|
+
exportSmartleadCsv(personIds) {
|
|
120
|
+
return this.request("POST", "/exports/csv", {
|
|
121
|
+
body: { person_ids: personIds, format: "smartlead" },
|
|
122
|
+
raw: true
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Batch person resolution (up to 50 queries in ONE call). The server
|
|
127
|
+
* decides match quality: match_found false means stop; auto_match true
|
|
128
|
+
* means the top candidate is safe to use without human review.
|
|
129
|
+
*/
|
|
130
|
+
identifyPeople(queries) {
|
|
131
|
+
return this.request("POST", "/people/identify", { body: { queries } });
|
|
132
|
+
}
|
|
133
|
+
/** findLPs-style allocator search: pensions, endowments, family offices, funds. FREE. */
|
|
134
|
+
searchAllocators(params = {}) {
|
|
135
|
+
return this.request("GET", "/allocators", {
|
|
136
|
+
query: {
|
|
137
|
+
q: params.q,
|
|
138
|
+
type: params.type,
|
|
139
|
+
state: params.state,
|
|
140
|
+
client_base: params.clientBase,
|
|
141
|
+
aum_min: params.aumMin,
|
|
142
|
+
aum_max: params.aumMax,
|
|
143
|
+
limit: params.limit,
|
|
144
|
+
cursor: params.cursor
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
/** Connection graph from a firm or person: {nodes, edges}. FREE. */
|
|
149
|
+
network(kind, id, limit) {
|
|
150
|
+
return this.request("GET", `/network/${kind}/${id}`, { query: { limit } });
|
|
151
|
+
}
|
|
152
|
+
usage() {
|
|
153
|
+
return this.request("GET", "/usage");
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Composed lead briefs for an ICP: ranked firms each with a rationale, best
|
|
157
|
+
* contact (verified email + confidence only when already revealed), warm
|
|
158
|
+
* paths from your imported connections, and categorized intent signals.
|
|
159
|
+
* FREE; reveal stays the only paid step. Pass format:"csv" (optionally
|
|
160
|
+
* tab:"signals") to get the deliverable spreadsheet tabs as CSV text.
|
|
161
|
+
*/
|
|
162
|
+
leads(params = {}) {
|
|
163
|
+
const query = {
|
|
164
|
+
role: params.role,
|
|
165
|
+
"firm_focus.investor_type": params.firmInvestorType,
|
|
166
|
+
"firm_focus.stage": params.firmStage,
|
|
167
|
+
"firm_focus.credit_strategy": params.firmCreditStrategy,
|
|
168
|
+
firm_signal: params.firmSignal,
|
|
169
|
+
state: params.state,
|
|
170
|
+
aum_min: params.aumMin,
|
|
171
|
+
aum_max: params.aumMax,
|
|
172
|
+
since_days: params.sinceDays,
|
|
173
|
+
limit: params.limit,
|
|
174
|
+
format: params.format,
|
|
175
|
+
tab: params.tab,
|
|
176
|
+
fresh: params.fresh ? "true" : void 0,
|
|
177
|
+
exclude_firm_ids: params.excludeFirmIds?.length ? params.excludeFirmIds.join(",") : void 0
|
|
178
|
+
};
|
|
179
|
+
if (params.format === "csv") {
|
|
180
|
+
return this.request("GET", "/leads", { query, raw: true });
|
|
181
|
+
}
|
|
182
|
+
return this.request("GET", "/leads", { query });
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Import your LinkedIn connections (parsed rows from the LinkedIn
|
|
186
|
+
* "Connections" export) as the warm-path substrate for leads(). Scoped to
|
|
187
|
+
* your API key. mode "merge" (default) is idempotent; "replace" clears the
|
|
188
|
+
* previous import. FREE.
|
|
189
|
+
*/
|
|
190
|
+
importConnections(connections, opts = {}) {
|
|
191
|
+
return this.request("POST", "/connections/import", {
|
|
192
|
+
body: { mode: opts.mode, connections }
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
/** Count + last import time of your stored connections. FREE. */
|
|
196
|
+
connections() {
|
|
197
|
+
return this.request("GET", "/connections");
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* On-demand enrichment: research the given firms live (grounded web search)
|
|
201
|
+
* and write dated, cited intent signals so a thin query becomes a full
|
|
202
|
+
* answer. Bounded (up to 5 firms/call), skips firms researched in the last
|
|
203
|
+
* 30 days, time-guarded. Pass firm ids (from a prior search) or a firm-name
|
|
204
|
+
* query. The freshly written signals then show up in search_people
|
|
205
|
+
* (firm_signal=), /v1/signals, and get_lead_briefs.
|
|
206
|
+
*/
|
|
207
|
+
enrich(params) {
|
|
208
|
+
return this.request("POST", "/enrich", {
|
|
209
|
+
body: { firm_ids: params.firmIds, q: params.q, limit: params.limit }
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
export {
|
|
214
|
+
Finprodata,
|
|
215
|
+
FinprodataError
|
|
216
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "finprodata-sdk",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "TypeScript SDK for the finprodata API — verified, never-stale data on finance professionals (PE/VC firms, fund managers, LPs, and the people who work there).",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Brandon Hopen",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": { ".": { "types": "./dist/index.d.ts", "default": "./dist/index.js" } },
|
|
11
|
+
"files": ["dist"],
|
|
12
|
+
"engines": { "node": ">=18" },
|
|
13
|
+
"homepage": "https://api.finprodata.com/docs",
|
|
14
|
+
"repository": { "type": "git", "url": "git+https://github.com/Sliver5/finprodata-js.git" },
|
|
15
|
+
"keywords": ["finprodata","finance","private-equity","venture-capital","investors","contacts","api","sdk"]
|
|
16
|
+
}
|