linkdapi 1.0.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 +716 -0
- package/dist/client.d.ts +708 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +1008 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/package.json +49 -0
package/README.md
ADDED
|
@@ -0,0 +1,716 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
# LinkdAPI Node.js - The best API for professional Data
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/linkdapi)
|
|
6
|
+
[](https://www.npmjs.com/package/linkdapi)
|
|
7
|
+
[](https://opensource.org/licenses/MIT)
|
|
8
|
+
[](https://www.npmjs.com/package/linkdapi)
|
|
9
|
+
[](https://x.com/l1nkdapi)
|
|
10
|
+
|
|
11
|
+
<div align="center">
|
|
12
|
+
|
|
13
|
+
π **[Get Your API Key](https://linkdapi.com/?p=signup)** (100 free credits) β’ π **[Full Documentation](https://linkdapi.com/docs)** β’ π¬ **[Support](https://linkdapi.com/help-center)**
|
|
14
|
+
|
|
15
|
+
**β‘ Zero Dependencies** β’ **π Native Fetch API** β’ **π― Production Ready**
|
|
16
|
+
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
A lightweight Node.js wrapper for [LinkdAPI](https://linkdapi.com) β the most advanced API for accessing professional profile and company data. With unmatched **reliability**, **stability**, and **scalability**, it's perfect for developers, analysts, and anyone building tools that work with professional networking data at scale.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## π Table of Contents
|
|
24
|
+
|
|
25
|
+
- [Why LinkdAPI?](#why-linkdapi)
|
|
26
|
+
- [Why LinkdAPI Beats Alternatives](#why-linkdapi-beats-alternatives)
|
|
27
|
+
- [π¦ Installation](#-installation)
|
|
28
|
+
- [β¨ Key Features](#-key-features)
|
|
29
|
+
- [π Quick Start](#-quick-start)
|
|
30
|
+
- [ESM Usage](#esm-usage)
|
|
31
|
+
- [CommonJS Usage](#commonjs-usage)
|
|
32
|
+
- [Advanced Async Pattern](#advanced-async-pattern)
|
|
33
|
+
- [β‘ Performance Benefits](#-performance-benefits)
|
|
34
|
+
- [π API Reference](#-api-reference)
|
|
35
|
+
- [π‘ Real-World Examples](#-real-world-examples)
|
|
36
|
+
- [π Use Cases](#-use-cases)
|
|
37
|
+
- [π§ Error Handling](#-error-handling)
|
|
38
|
+
- [π Resources](#-resources)
|
|
39
|
+
- [π License](#-license)
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Why LinkdAPI?
|
|
44
|
+
|
|
45
|
+
- We deliver data **reliably and efficiently** without relying on complex workarounds.
|
|
46
|
+
- Built for **scale, stability, and accuracy**, so your applications run smoothly.
|
|
47
|
+
- Perfect for **automation**, **data analysis**, **contact enrichment**, and **lead generation**.
|
|
48
|
+
|
|
49
|
+

|
|
50
|
+
|
|
51
|
+
## Why LinkdAPI Beats Alternatives
|
|
52
|
+
|
|
53
|
+
| Feature | LinkdAPI | SerpAPI | Scraping |
|
|
54
|
+
|---------|----------|---------|----------|
|
|
55
|
+
| **Reliable Data Access** | β
Yes | β No | β No |
|
|
56
|
+
| **No Proxy Management** | β
Yes | β No | β No |
|
|
57
|
+
| **No Cookies Management** | β
Yes | β No | β No |
|
|
58
|
+
| **Structured JSON Data** | β
Yes | β HTML | β
Yes |
|
|
59
|
+
| **Scalability** | β
Built for scale | β Rate-limited | β Manual effort |
|
|
60
|
+
| **Pricing Transparency** | β
Clear pricing tiers | β
Pay-per-request | β Hidden costs (proxies, CAPTCHAs) |
|
|
61
|
+
| **API Reliability** | β
High uptime | β
Good | β Unstable (blocks) |
|
|
62
|
+
| **Automation-Friendly** | β
Full automation | β
Partial | β Manual work needed |
|
|
63
|
+
| **Support & Documentation** | β
Dedicated support | β
Good docs | β Community-based |
|
|
64
|
+
| **Stability & Resilience** | β
Optimized for reliability | β Limited | β High risk |
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## π¦ Installation
|
|
68
|
+
|
|
69
|
+
Install with npm:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
npm install linkdapi
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Or with yarn:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
yarn add linkdapi
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
> **Note:** Requires Node.js 18.0.0 or higher (uses native `fetch` API)
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## β¨ Key Features
|
|
86
|
+
|
|
87
|
+
<table>
|
|
88
|
+
<tr>
|
|
89
|
+
<td width="50%">
|
|
90
|
+
|
|
91
|
+
### π Full TypeScript Support
|
|
92
|
+
- **Type Definitions** - Built-in TypeScript support
|
|
93
|
+
- **IntelliSense** - Full IDE autocomplete
|
|
94
|
+
- **Type Safety** - Catch errors at compile time
|
|
95
|
+
|
|
96
|
+
### π Performance Optimized
|
|
97
|
+
- Built-in retry mechanism
|
|
98
|
+
- Automatic request throttling
|
|
99
|
+
- Zero external dependencies
|
|
100
|
+
- Native fetch API
|
|
101
|
+
|
|
102
|
+
</td>
|
|
103
|
+
<td width="50%">
|
|
104
|
+
|
|
105
|
+
### π οΈ Developer Friendly
|
|
106
|
+
- Full type hints support
|
|
107
|
+
- Comprehensive error handling
|
|
108
|
+
- ESM and CommonJS support
|
|
109
|
+
- Extensive documentation
|
|
110
|
+
|
|
111
|
+
### π― Production Ready
|
|
112
|
+
- Automatic retries with exponential backoff
|
|
113
|
+
- Timeout configuration
|
|
114
|
+
- Error recovery
|
|
115
|
+
- Battle tested
|
|
116
|
+
|
|
117
|
+
</td>
|
|
118
|
+
</tr>
|
|
119
|
+
</table>
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## π Quick Start
|
|
124
|
+
|
|
125
|
+
### ESM Usage
|
|
126
|
+
|
|
127
|
+
```typescript
|
|
128
|
+
import { LinkdAPI } from 'linkdapi';
|
|
129
|
+
|
|
130
|
+
// Initialize the client
|
|
131
|
+
const api = new LinkdAPI({ apiKey: 'your_api_key' });
|
|
132
|
+
|
|
133
|
+
// Get profile overview
|
|
134
|
+
const profile = await api.getProfileOverview('ryanroslansky');
|
|
135
|
+
console.log(`Profile: ${profile.data.fullName}`);
|
|
136
|
+
|
|
137
|
+
// Get company information
|
|
138
|
+
const company = await api.getCompanyInfo({ name: 'google' });
|
|
139
|
+
console.log(`Company: ${company.data.name}`);
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### CommonJS Usage
|
|
143
|
+
|
|
144
|
+
```javascript
|
|
145
|
+
const { LinkdAPI } = require('linkdapi');
|
|
146
|
+
|
|
147
|
+
const api = new LinkdAPI({ apiKey: 'your_api_key' });
|
|
148
|
+
|
|
149
|
+
async function main() {
|
|
150
|
+
// Single request
|
|
151
|
+
const profile = await api.getProfileOverview('ryanroslansky');
|
|
152
|
+
console.log(`Profile: ${profile.data.fullName}`);
|
|
153
|
+
|
|
154
|
+
// Fetch multiple profiles concurrently
|
|
155
|
+
const profiles = await Promise.all([
|
|
156
|
+
api.getProfileOverview('ryanroslansky'),
|
|
157
|
+
api.getProfileOverview('satyanadella'),
|
|
158
|
+
api.getProfileOverview('jeffweiner08')
|
|
159
|
+
]);
|
|
160
|
+
|
|
161
|
+
for (const profile of profiles) {
|
|
162
|
+
console.log(`Name: ${profile.data.fullName}`);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
main();
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### Advanced Async Pattern
|
|
170
|
+
|
|
171
|
+
```typescript
|
|
172
|
+
import { LinkdAPI } from 'linkdapi';
|
|
173
|
+
|
|
174
|
+
async function fetchProfileData(username: string) {
|
|
175
|
+
const api = new LinkdAPI({ apiKey: 'your_api_key' });
|
|
176
|
+
|
|
177
|
+
// Get profile overview first
|
|
178
|
+
const overview = await api.getProfileOverview(username);
|
|
179
|
+
const urn = overview.data.urn;
|
|
180
|
+
|
|
181
|
+
// Fetch multiple endpoints concurrently
|
|
182
|
+
const [details, experience, education, skills] = await Promise.all([
|
|
183
|
+
api.getProfileDetails(urn),
|
|
184
|
+
api.getFullExperience(urn),
|
|
185
|
+
api.getEducation(urn),
|
|
186
|
+
api.getSkills(urn)
|
|
187
|
+
]);
|
|
188
|
+
|
|
189
|
+
return {
|
|
190
|
+
overview,
|
|
191
|
+
details,
|
|
192
|
+
experience,
|
|
193
|
+
education,
|
|
194
|
+
skills
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// Usage
|
|
199
|
+
const data = await fetchProfileData('ryanroslansky');
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## β‘ Performance Benefits
|
|
205
|
+
|
|
206
|
+
The async nature of Node.js provides significant performance improvements when making multiple API calls:
|
|
207
|
+
|
|
208
|
+
| Scenario | Sequential | Concurrent (Promise.all) | Improvement |
|
|
209
|
+
|----------|------------|--------------------------|-------------|
|
|
210
|
+
| Single Request | ~200ms | ~200ms | Same |
|
|
211
|
+
| 10 Sequential Requests | ~2000ms | ~2000ms | Same |
|
|
212
|
+
| **10 Concurrent Requests** | ~2000ms | **~200ms** | **10x faster** |
|
|
213
|
+
| **100 Concurrent Requests** | ~20000ms | **~500ms** | **40x faster** |
|
|
214
|
+
|
|
215
|
+
**When to use Concurrent:**
|
|
216
|
+
- β
Scraping multiple profiles at once
|
|
217
|
+
- β
Batch processing jobs or companies
|
|
218
|
+
- β
Real-time data aggregation
|
|
219
|
+
- β
Building high-performance APIs
|
|
220
|
+
|
|
221
|
+
**When to use Sequential:**
|
|
222
|
+
- β
Simple scripts
|
|
223
|
+
- β
Single requests
|
|
224
|
+
- β
Learning/prototyping
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## π API Reference
|
|
229
|
+
|
|
230
|
+
All methods return Promises and support async/await.
|
|
231
|
+
|
|
232
|
+
<details>
|
|
233
|
+
<summary><b>πΉ Profile Endpoints</b> (Click to expand)</summary>
|
|
234
|
+
|
|
235
|
+
```typescript
|
|
236
|
+
// Profile Information
|
|
237
|
+
getProfileOverview(username) // Basic profile info
|
|
238
|
+
getProfileDetails(urn) // Detailed profile data
|
|
239
|
+
getContactInfo(username) // Email, phone, websites
|
|
240
|
+
getProfileAbout(urn) // About section & verification
|
|
241
|
+
getFullProfile({ username?, urn? }) // Complete profile data in 1 request
|
|
242
|
+
|
|
243
|
+
// Work & Education
|
|
244
|
+
getFullExperience(urn) // Complete work history
|
|
245
|
+
getCertifications(urn) // Professional certifications
|
|
246
|
+
getEducation(urn) // Education history
|
|
247
|
+
getSkills(urn) // Skills & endorsements
|
|
248
|
+
|
|
249
|
+
// Social & Engagement
|
|
250
|
+
getSocialMatrix(username) // Connections & followers count
|
|
251
|
+
getRecommendations(urn) // Given & received recommendations
|
|
252
|
+
getSimilarProfiles(urn) // Similar profile suggestions
|
|
253
|
+
getProfileReactions(urn, cursor?) // All profile reactions
|
|
254
|
+
getProfileInterests(urn) // Profile interests
|
|
255
|
+
getProfileServices(urn) // Profile services
|
|
256
|
+
getProfileUrn(username) // Get URN from username
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
</details>
|
|
260
|
+
|
|
261
|
+
<details>
|
|
262
|
+
<summary><b>πΉ Company Endpoints</b> (Click to expand)</summary>
|
|
263
|
+
|
|
264
|
+
```typescript
|
|
265
|
+
// Company Search & Info
|
|
266
|
+
companyNameLookup(query) // Search companies by name
|
|
267
|
+
getCompanyInfo({ companyId?, name? }) // Get company details
|
|
268
|
+
getSimilarCompanies(companyId) // Similar company suggestions
|
|
269
|
+
getCompanyEmployeesData(companyId) // Employee statistics
|
|
270
|
+
getCompanyJobs(companyIds, start?) // Active job listings
|
|
271
|
+
getCompanyAffiliatedPages(companyId) // Subsidiaries & affiliates
|
|
272
|
+
getCompanyPosts(companyId, start?) // Company posts
|
|
273
|
+
getCompanyId(universalName) // Get ID from universal name
|
|
274
|
+
getCompanyDetailsV2(companyId) // Extended company info
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
</details>
|
|
278
|
+
|
|
279
|
+
<details>
|
|
280
|
+
<summary><b>πΉ Job Endpoints</b> (Click to expand)</summary>
|
|
281
|
+
|
|
282
|
+
```typescript
|
|
283
|
+
// Job Search
|
|
284
|
+
searchJobs({
|
|
285
|
+
keyword?, // Job title, skills, or keywords
|
|
286
|
+
location?, // City, state, or region
|
|
287
|
+
geoId?, // Geographic ID
|
|
288
|
+
companyIds?, // Specific company IDs
|
|
289
|
+
jobTypes?, // full_time, part_time, contract, etc.
|
|
290
|
+
experience?, // internship, entry_level, mid_senior, etc.
|
|
291
|
+
regions?, // Region codes
|
|
292
|
+
timePosted?, // any, 24h, 1week, 1month
|
|
293
|
+
salary?, // any, 40k, 60k, 80k, 100k, 120k
|
|
294
|
+
workArrangement?, // onsite, remote, hybrid
|
|
295
|
+
start? // Pagination
|
|
296
|
+
})
|
|
297
|
+
|
|
298
|
+
// Job Search V2 (comprehensive)
|
|
299
|
+
searchJobsV2({
|
|
300
|
+
keyword?, start?, sortBy?, datePosted?, experience?,
|
|
301
|
+
jobTypes?, workplaceTypes?, salary?, companies?,
|
|
302
|
+
industries?, locations?, functions?, titles?,
|
|
303
|
+
benefits?, commitments?, easyApply?, verifiedJob?,
|
|
304
|
+
under10Applicants?, fairChance?
|
|
305
|
+
})
|
|
306
|
+
|
|
307
|
+
// Job Details
|
|
308
|
+
getJobDetails(jobId) // Detailed job information
|
|
309
|
+
getJobDetailsV2(jobId) // All job statuses supported
|
|
310
|
+
getSimilarJobs(jobId) // Similar job postings
|
|
311
|
+
getPeopleAlsoViewedJobs(jobId) // Related jobs
|
|
312
|
+
getHiringTeam(jobId, start?) // Hiring team members
|
|
313
|
+
getProfilePostedJobs(profileUrn, start?, count?) // Jobs by profile
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
</details>
|
|
317
|
+
|
|
318
|
+
<details>
|
|
319
|
+
<summary><b>πΉ Post Endpoints</b> (Click to expand)</summary>
|
|
320
|
+
|
|
321
|
+
```typescript
|
|
322
|
+
// Posts
|
|
323
|
+
getFeaturedPosts(urn) // Featured posts
|
|
324
|
+
getAllPosts(urn, cursor?, start?) // All posts with pagination
|
|
325
|
+
getPostInfo(urn) // Single post details
|
|
326
|
+
getPostComments(urn, start?, count?, cursor?) // Post comments
|
|
327
|
+
getPostLikes(urn, start?) // Post likes/reactions
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
</details>
|
|
331
|
+
|
|
332
|
+
<details>
|
|
333
|
+
<summary><b>πΉ Comment Endpoints</b> (Click to expand)</summary>
|
|
334
|
+
|
|
335
|
+
```typescript
|
|
336
|
+
getAllComments(urn, cursor?) // All comments by profile
|
|
337
|
+
getCommentLikes(urns, start?) // Likes on specific comments
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
</details>
|
|
341
|
+
|
|
342
|
+
<details>
|
|
343
|
+
<summary><b>πΉ Search Endpoints</b> (Click to expand)</summary>
|
|
344
|
+
|
|
345
|
+
```typescript
|
|
346
|
+
// People Search
|
|
347
|
+
searchPeople({
|
|
348
|
+
keyword?,
|
|
349
|
+
currentCompany?,
|
|
350
|
+
firstName?,
|
|
351
|
+
geoUrn?,
|
|
352
|
+
industry?,
|
|
353
|
+
lastName?,
|
|
354
|
+
profileLanguage?,
|
|
355
|
+
pastCompany?,
|
|
356
|
+
school?,
|
|
357
|
+
serviceCategory?,
|
|
358
|
+
title?,
|
|
359
|
+
start?
|
|
360
|
+
})
|
|
361
|
+
|
|
362
|
+
// Company Search
|
|
363
|
+
searchCompanies({
|
|
364
|
+
keyword?,
|
|
365
|
+
geoUrn?,
|
|
366
|
+
companySize?, // "1-10", "11-50", "51-200", "201-500", "501-1000", "1001-5000", "5001-10,000", "10,001+"
|
|
367
|
+
hasJobs?,
|
|
368
|
+
industry?,
|
|
369
|
+
start?
|
|
370
|
+
})
|
|
371
|
+
|
|
372
|
+
// Post Search
|
|
373
|
+
searchPosts({
|
|
374
|
+
keyword?,
|
|
375
|
+
authorCompany?,
|
|
376
|
+
authorIndustry?,
|
|
377
|
+
authorJobTitle?,
|
|
378
|
+
contentType?,
|
|
379
|
+
datePosted?,
|
|
380
|
+
fromMember?,
|
|
381
|
+
fromOrganization?,
|
|
382
|
+
mentionsMember?,
|
|
383
|
+
mentionsOrganization?,
|
|
384
|
+
sortBy?,
|
|
385
|
+
start?
|
|
386
|
+
})
|
|
387
|
+
|
|
388
|
+
// Other Search
|
|
389
|
+
searchServices({ keyword?, geoUrn?, profileLanguage?, serviceCategory?, start? })
|
|
390
|
+
searchSchools(keyword?, start?)
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
</details>
|
|
394
|
+
|
|
395
|
+
<details>
|
|
396
|
+
<summary><b>πΉ Article Endpoints</b> (Click to expand)</summary>
|
|
397
|
+
|
|
398
|
+
```typescript
|
|
399
|
+
getAllArticles(urn, start?) // All articles by profile
|
|
400
|
+
getArticleInfo(url) // Article details from URL
|
|
401
|
+
getArticleReactions(urn, start?) // Article likes/reactions
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
</details>
|
|
405
|
+
|
|
406
|
+
<details>
|
|
407
|
+
<summary><b>πΉ Services Endpoints</b> (Click to expand)</summary>
|
|
408
|
+
|
|
409
|
+
```typescript
|
|
410
|
+
getServiceDetails(vanityname) // Get service by VanityName
|
|
411
|
+
getSimilarServices(vanityname) // Get similar services
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
</details>
|
|
415
|
+
|
|
416
|
+
<details>
|
|
417
|
+
<summary><b>πΉ Lookup Endpoints</b> (Click to expand)</summary>
|
|
418
|
+
|
|
419
|
+
```typescript
|
|
420
|
+
geoNameLookup(query) // Search locations & get geo IDs
|
|
421
|
+
titleSkillsLookup(query) // Search skills & job titles
|
|
422
|
+
servicesLookup(query) // Search service categories
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
</details>
|
|
426
|
+
|
|
427
|
+
<details>
|
|
428
|
+
<summary><b>πΉ System</b> (Click to expand)</summary>
|
|
429
|
+
|
|
430
|
+
```typescript
|
|
431
|
+
getServiceStatus() // Check API service status
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
</details>
|
|
435
|
+
|
|
436
|
+
> π **Full documentation for all endpoints:** [linkdapi.com/docs](https://linkdapi.com/docs/intro)
|
|
437
|
+
|
|
438
|
+
> π **More endpoints coming soon!** Check our [roadmap](https://linkdapi.com/roadmap)
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
## π‘ Real-World Examples
|
|
442
|
+
|
|
443
|
+
### Example 1: Bulk Profile Enrichment
|
|
444
|
+
|
|
445
|
+
```typescript
|
|
446
|
+
import { LinkdAPI } from 'linkdapi';
|
|
447
|
+
|
|
448
|
+
async function enrichLeads(usernames: string[]) {
|
|
449
|
+
const api = new LinkdAPI({ apiKey: 'your_api_key' });
|
|
450
|
+
|
|
451
|
+
// Fetch all profiles concurrently
|
|
452
|
+
const profiles = await Promise.all(
|
|
453
|
+
usernames.map(username =>
|
|
454
|
+
api.getProfileOverview(username).catch(err => ({ error: err, username }))
|
|
455
|
+
)
|
|
456
|
+
);
|
|
457
|
+
|
|
458
|
+
const enrichedData = [];
|
|
459
|
+
for (let i = 0; i < usernames.length; i++) {
|
|
460
|
+
const profile = profiles[i];
|
|
461
|
+
if (profile.success) {
|
|
462
|
+
const data = profile.data;
|
|
463
|
+
enrichedData.push({
|
|
464
|
+
username: usernames[i],
|
|
465
|
+
name: data.fullName,
|
|
466
|
+
headline: data.headline,
|
|
467
|
+
location: data.location,
|
|
468
|
+
company: data.company
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
return enrichedData;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
// Process 100 leads in seconds instead of minutes
|
|
477
|
+
const leads = ['ryanroslansky', 'satyanadella', 'jeffweiner08'];
|
|
478
|
+
const data = await enrichLeads(leads);
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
### Example 2: Company Intelligence Dashboard
|
|
482
|
+
|
|
483
|
+
```typescript
|
|
484
|
+
import { LinkdAPI } from 'linkdapi';
|
|
485
|
+
|
|
486
|
+
async function getCompanyIntelligence(companyName: string) {
|
|
487
|
+
const api = new LinkdAPI({ apiKey: 'your_api_key' });
|
|
488
|
+
|
|
489
|
+
// Get company info
|
|
490
|
+
const companyInfo = await api.getCompanyInfo({ name: companyName });
|
|
491
|
+
const companyId = companyInfo.data.id;
|
|
492
|
+
|
|
493
|
+
// Fetch multiple data points concurrently
|
|
494
|
+
const [employees, similar, jobs, affiliates] = await Promise.all([
|
|
495
|
+
api.getCompanyEmployeesData(companyId),
|
|
496
|
+
api.getSimilarCompanies(companyId),
|
|
497
|
+
api.getCompanyJobs(companyId),
|
|
498
|
+
api.getCompanyAffiliatedPages(companyId)
|
|
499
|
+
]);
|
|
500
|
+
|
|
501
|
+
return {
|
|
502
|
+
info: companyInfo,
|
|
503
|
+
employees,
|
|
504
|
+
similar,
|
|
505
|
+
jobs,
|
|
506
|
+
affiliates
|
|
507
|
+
};
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
const intelligence = await getCompanyIntelligence('google');
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
### Example 3: Job Market Analysis
|
|
514
|
+
|
|
515
|
+
```typescript
|
|
516
|
+
import { LinkdAPI } from 'linkdapi';
|
|
517
|
+
|
|
518
|
+
async function analyzeJobMarket(role: string, locations: string[]) {
|
|
519
|
+
const api = new LinkdAPI({ apiKey: 'your_api_key' });
|
|
520
|
+
|
|
521
|
+
// Search jobs in multiple locations concurrently
|
|
522
|
+
const results = await Promise.all(
|
|
523
|
+
locations.map(location =>
|
|
524
|
+
api.searchJobs({ keyword: role, location, timePosted: '1week' })
|
|
525
|
+
)
|
|
526
|
+
);
|
|
527
|
+
|
|
528
|
+
const analysis: Record<string, any> = {};
|
|
529
|
+
for (let i = 0; i < locations.length; i++) {
|
|
530
|
+
const result = results[i];
|
|
531
|
+
if (result.success) {
|
|
532
|
+
const jobs = result.data.jobs;
|
|
533
|
+
analysis[locations[i]] = {
|
|
534
|
+
totalJobs: jobs.length,
|
|
535
|
+
companies: [...new Set(jobs.map((j: any) => j.company))],
|
|
536
|
+
salaryRange: jobs.filter((j: any) => j.salary).map((j: any) => j.salary)
|
|
537
|
+
};
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
return analysis;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
// Analyze "Software Engineer" jobs across 5 cities in parallel
|
|
545
|
+
const analysis = await analyzeJobMarket(
|
|
546
|
+
'Software Engineer',
|
|
547
|
+
['San Francisco, CA', 'New York, NY', 'Austin, TX', 'Seattle, WA', 'Boston, MA']
|
|
548
|
+
);
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
---
|
|
552
|
+
|
|
553
|
+
## π Use Cases
|
|
554
|
+
|
|
555
|
+
<table>
|
|
556
|
+
<tr>
|
|
557
|
+
<td width="50%">
|
|
558
|
+
|
|
559
|
+
### π― Lead Generation & Sales
|
|
560
|
+
- **Profile Enrichment** - Enhance lead data with professional profiles
|
|
561
|
+
- **Company Research** - Deep dive into target companies
|
|
562
|
+
- **Contact Discovery** - Find decision makers and key contacts
|
|
563
|
+
- **Market Intelligence** - Analyze competitors and opportunities
|
|
564
|
+
|
|
565
|
+
### π Data Analytics & Research
|
|
566
|
+
- **Market Analysis** - Job market trends and salary insights
|
|
567
|
+
- **Talent Mapping** - Identify skill gaps and hiring patterns
|
|
568
|
+
- **Content Analysis** - Track engagement and viral posts
|
|
569
|
+
- **Network Analysis** - Study professional connections
|
|
570
|
+
|
|
571
|
+
</td>
|
|
572
|
+
<td width="50%">
|
|
573
|
+
|
|
574
|
+
### π€ Automation & Integration
|
|
575
|
+
- **CRM Integration** - Auto-update contact records
|
|
576
|
+
- **Recruiting Pipelines** - Automated candidate sourcing
|
|
577
|
+
- **Brand Monitoring** - Track company mentions and sentiment
|
|
578
|
+
- **API Development** - Build applications using professional data
|
|
579
|
+
|
|
580
|
+
### π Verification & Compliance
|
|
581
|
+
- **Identity Verification** - Validate professional credentials
|
|
582
|
+
- **Background Checks** - Verify employment history
|
|
583
|
+
- **Email Validation** - Confirm email-to-profile matches
|
|
584
|
+
- **Due Diligence** - Research business partnerships
|
|
585
|
+
|
|
586
|
+
</td>
|
|
587
|
+
</tr>
|
|
588
|
+
</table>
|
|
589
|
+
|
|
590
|
+
## π§ Error Handling
|
|
591
|
+
|
|
592
|
+
The SDK provides robust error handling with custom error classes:
|
|
593
|
+
|
|
594
|
+
```typescript
|
|
595
|
+
import { LinkdAPI, HTTPError, NetworkError, TimeoutError } from 'linkdapi';
|
|
596
|
+
|
|
597
|
+
async function fetchWithErrorHandling() {
|
|
598
|
+
const api = new LinkdAPI({ apiKey: 'your_api_key' });
|
|
599
|
+
|
|
600
|
+
try {
|
|
601
|
+
const profile = await api.getProfileOverview('username');
|
|
602
|
+
|
|
603
|
+
if (profile.success) {
|
|
604
|
+
console.log(`Success: ${profile.data}`);
|
|
605
|
+
} else {
|
|
606
|
+
console.log(`API Error: ${profile.message}`);
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
} catch (error) {
|
|
610
|
+
if (error instanceof HTTPError) {
|
|
611
|
+
// Handle HTTP errors (4xx, 5xx)
|
|
612
|
+
console.error(`HTTP Error ${error.statusCode}: ${error.responseBody}`);
|
|
613
|
+
} else if (error instanceof TimeoutError) {
|
|
614
|
+
// Handle timeout errors
|
|
615
|
+
console.error(`Timeout: ${error.message}`);
|
|
616
|
+
} else if (error instanceof NetworkError) {
|
|
617
|
+
// Handle network errors
|
|
618
|
+
console.error(`Network Error: ${error.message}`);
|
|
619
|
+
} else {
|
|
620
|
+
// Handle unexpected errors
|
|
621
|
+
console.error(`Unexpected Error: ${error}`);
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
```
|
|
626
|
+
|
|
627
|
+
### Built-in Retry Mechanism
|
|
628
|
+
|
|
629
|
+
The client automatically retries failed requests with exponential backoff:
|
|
630
|
+
|
|
631
|
+
```typescript
|
|
632
|
+
// Configure retry behavior
|
|
633
|
+
const api = new LinkdAPI({
|
|
634
|
+
apiKey: 'your_api_key',
|
|
635
|
+
maxRetries: 5, // Default: 3
|
|
636
|
+
retryDelay: 2000, // Default: 1000 milliseconds
|
|
637
|
+
timeout: 60000 // Default: 30000 milliseconds
|
|
638
|
+
});
|
|
639
|
+
|
|
640
|
+
// Requests will be retried automatically on failure
|
|
641
|
+
const profile = await api.getProfileOverview('username');
|
|
642
|
+
```
|
|
643
|
+
|
|
644
|
+
---
|
|
645
|
+
|
|
646
|
+
## π Why Choose LinkdAPI Node.js SDK?
|
|
647
|
+
|
|
648
|
+
**LinkdAPI** is more than just an API wrapperβit's a complete solution for professional and company data access:
|
|
649
|
+
|
|
650
|
+
### β‘ **Performance First**
|
|
651
|
+
- **Promise.all Support** - Up to 40x faster for batch operations
|
|
652
|
+
- **Zero Dependencies** - Lightweight and fast
|
|
653
|
+
- **Smart Retries** - Automatic recovery from transient failures
|
|
654
|
+
|
|
655
|
+
### π‘οΈ **Production Ready**
|
|
656
|
+
- **Type Safety** - Full TypeScript support for better IDE experience
|
|
657
|
+
- **Error Recovery** - Comprehensive error handling and retries
|
|
658
|
+
- **Battle Tested** - Used by developers worldwide
|
|
659
|
+
|
|
660
|
+
### π **Developer Experience**
|
|
661
|
+
- **ESM & CommonJS** - Works with any module system
|
|
662
|
+
- **Async/Await** - Modern JavaScript patterns
|
|
663
|
+
- **Rich Documentation** - Examples for every use case
|
|
664
|
+
|
|
665
|
+
Whether you're building tools to gather professional profiles, analyze company data, or automate recruiting workflows, **LinkdAPI** gives you the speed, reliability, and flexibility you needβwithout the hassle of complicated setups.
|
|
666
|
+
|
|
667
|
+
---
|
|
668
|
+
|
|
669
|
+
## π Resources
|
|
670
|
+
|
|
671
|
+
<table>
|
|
672
|
+
<tr>
|
|
673
|
+
<td width="50%">
|
|
674
|
+
|
|
675
|
+
### π Documentation & Learning
|
|
676
|
+
- [π Getting Started Guide](https://linkdapi.com/docs/intro)
|
|
677
|
+
- [π API Documentation](https://linkdapi.com/docs)
|
|
678
|
+
|
|
679
|
+
</td>
|
|
680
|
+
<td width="50%">
|
|
681
|
+
|
|
682
|
+
### π οΈ Tools & Support
|
|
683
|
+
- [π Get API Key](https://linkdapi.com/?p=signup)
|
|
684
|
+
- [π¬ Help Center](https://linkdapi.com/help-center)
|
|
685
|
+
- [πΊοΈ Roadmap](https://linkdapi.com/roadmap)
|
|
686
|
+
- [π¦ Twitter/X](https://x.com/l1nkdapi)
|
|
687
|
+
|
|
688
|
+
</td>
|
|
689
|
+
</tr>
|
|
690
|
+
</table>
|
|
691
|
+
|
|
692
|
+
---
|
|
693
|
+
|
|
694
|
+
## π License
|
|
695
|
+
|
|
696
|
+
**MIT License** β Free to use for personal and commercial projects.
|
|
697
|
+
|
|
698
|
+
---
|
|
699
|
+
|
|
700
|
+
## π Support the Project
|
|
701
|
+
|
|
702
|
+
If you find LinkdAPI useful, consider:
|
|
703
|
+
- β **Starring the project** on GitHub
|
|
704
|
+
- π¦ **Following us** on [Twitter/X](https://x.com/l1nkdapi)
|
|
705
|
+
- π’ **Sharing** with your network
|
|
706
|
+
- π‘ **Contributing** ideas and feedback
|
|
707
|
+
|
|
708
|
+
---
|
|
709
|
+
|
|
710
|
+
<div align="center">
|
|
711
|
+
|
|
712
|
+
**Built with β€οΈ for developers who need reliable access to professional data**
|
|
713
|
+
|
|
714
|
+
[Website](https://linkdapi.com) β’ [Documentation](https://linkdapi.com/docs) β’ [Twitter](https://x.com/l1nkdapi) β’ [Support](https://linkdapi.com/help-center)
|
|
715
|
+
|
|
716
|
+
</div>
|