orangeslice 1.7.7 → 1.7.9
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/README.md +75 -149
- package/dist/cli.js +23 -21
- package/dist/index.d.ts +11 -61
- package/dist/index.js +11 -45
- package/docs/AGENTS.md +72 -141
- package/docs/linkedin_data/QUICK_REF.md +27 -0
- package/package.json +2 -2
- package/dist/apify.d.ts +0 -57
- package/dist/apify.js +0 -127
- package/dist/browser.d.ts +0 -68
- package/dist/browser.js +0 -114
- package/dist/firecrawl.d.ts +0 -49
- package/dist/firecrawl.js +0 -85
- package/dist/generateObject.d.ts +0 -34
- package/dist/generateObject.js +0 -83
- package/dist/geo.d.ts +0 -50
- package/dist/geo.js +0 -92
- package/dist/serp.d.ts +0 -44
- package/dist/serp.js +0 -70
- package/docs/apify.md +0 -133
- package/docs/b2b.md +0 -178
- package/docs/browser.md +0 -173
- package/docs/serp.md +0 -167
- package/docs/strategies.md +0 -250
package/README.md
CHANGED
|
@@ -1,158 +1,107 @@
|
|
|
1
1
|
# orangeslice
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
B2B LinkedIn database prospector. **1.15B profiles, 85M companies.**
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
npx orangeslice
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
This
|
|
9
|
+
This installs documentation your AI agent needs to master the database. Point your agent (Claude Code, Cursor, etc.) to `./AGENTS.md` and it becomes a B2B prospecting expert.
|
|
10
10
|
|
|
11
|
-
## What
|
|
11
|
+
## What It Does
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
Your AI agent gets:
|
|
14
|
+
- Full database schema (40+ tables)
|
|
15
|
+
- Query patterns and examples
|
|
16
|
+
- Anti-patterns to avoid
|
|
17
|
+
- Performance rules
|
|
18
|
+
- **Parallelization patterns** — agents must run queries in parallel, never sequentially
|
|
19
19
|
|
|
20
|
-
##
|
|
21
|
-
|
|
22
|
-
```typescript
|
|
23
|
-
import { orangeslice } from 'orangeslice';
|
|
20
|
+
## 🚨 CRITICAL: Always Parallelize
|
|
24
21
|
|
|
25
|
-
|
|
26
|
-
const company = await orangeslice.b2b.sql(`
|
|
27
|
-
SELECT company_name, employee_count, description
|
|
28
|
-
FROM linkedin_company WHERE domain = 'stripe.com'
|
|
29
|
-
`);
|
|
22
|
+
**The #1 rule: NEVER run queries sequentially. ALWAYS use `Promise.all()`.**
|
|
30
23
|
|
|
31
|
-
|
|
32
|
-
const news = await orangeslice.serp.search("Stripe funding 2024");
|
|
24
|
+
The API handles rate limiting automatically. Fire all queries at once.
|
|
33
25
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
26
|
+
```typescript
|
|
27
|
+
// ❌ WRONG - Sequential (SLOW)
|
|
28
|
+
const company = await orangeslice.b2b.sql("...");
|
|
29
|
+
const funding = await orangeslice.b2b.sql("...");
|
|
30
|
+
const jobs = await orangeslice.b2b.sql("...");
|
|
31
|
+
|
|
32
|
+
// ✅ CORRECT - Parallel (FAST)
|
|
33
|
+
const [company, funding, jobs] = await Promise.all([
|
|
34
|
+
orangeslice.b2b.sql("..."),
|
|
35
|
+
orangeslice.b2b.sql("..."),
|
|
36
|
+
orangeslice.b2b.sql("..."),
|
|
37
|
+
]);
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
## Documentation
|
|
43
|
-
|
|
44
|
-
| Doc | What it covers |
|
|
45
|
-
|-----|----------------|
|
|
46
|
-
| [**AGENTS.md**](./docs/AGENTS.md) | **Start here** - Sales agent instructions |
|
|
47
|
-
| [B2B_DATABASE.md](./docs/B2B_DATABASE.md) | Database overview, query examples |
|
|
48
|
-
| [B2B_SCHEMA.md](./docs/B2B_SCHEMA.md) | All tables and columns |
|
|
49
|
-
| [B2B_EMPLOYEE_SEARCH.md](./docs/B2B_EMPLOYEE_SEARCH.md) | Finding people by title/company |
|
|
50
|
-
| [B2B_GENERALIZATION_RULES.md](./docs/B2B_GENERALIZATION_RULES.md) | Query patterns and best practices |
|
|
51
|
-
| [B2B_NLP_QUERY_MAPPINGS.md](./docs/B2B_NLP_QUERY_MAPPINGS.md) | Natural language to SQL mappings |
|
|
52
|
-
|
|
53
|
-
## Installation
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
npm install orangeslice
|
|
57
|
-
```
|
|
40
|
+
## Quick Example
|
|
58
41
|
|
|
59
|
-
|
|
42
|
+
```typescript
|
|
43
|
+
import { orangeslice } from 'orangeslice';
|
|
60
44
|
|
|
61
|
-
|
|
45
|
+
// Research a company - ALL queries in parallel
|
|
46
|
+
const [company, funding, recentJobs, leadership] = await Promise.all([
|
|
47
|
+
orangeslice.b2b.sql(`SELECT * FROM linkedin_company WHERE domain = 'stripe.com'`),
|
|
48
|
+
orangeslice.b2b.sql(`SELECT * FROM linkedin_crunchbase_funding WHERE linkedin_company_id = 123`),
|
|
49
|
+
orangeslice.b2b.sql(`SELECT * FROM linkedin_job WHERE linkedin_company_id = 123 LIMIT 10`),
|
|
50
|
+
orangeslice.b2b.sql(`
|
|
51
|
+
SELECT p.first_name, p.last_name, pos.title
|
|
52
|
+
FROM linkedin_profile p
|
|
53
|
+
JOIN linkedin_profile_position3 pos ON pos.linkedin_profile_id = p.id
|
|
54
|
+
WHERE pos.linkedin_company_id = 123 AND pos.end_date IS NULL
|
|
55
|
+
LIMIT 10
|
|
56
|
+
`),
|
|
57
|
+
]);
|
|
62
58
|
|
|
63
|
-
|
|
64
|
-
|
|
59
|
+
// Research multiple companies - ALL in parallel
|
|
60
|
+
const domains = ['stripe.com', 'openai.com', 'anthropic.com'];
|
|
61
|
+
const companies = await Promise.all(
|
|
62
|
+
domains.map(d => orangeslice.b2b.sql(`SELECT * FROM linkedin_company WHERE domain = '${d}'`))
|
|
63
|
+
);
|
|
65
64
|
```
|
|
66
65
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
```json
|
|
70
|
-
{
|
|
71
|
-
"compilerOptions": {
|
|
72
|
-
"target": "ES2020",
|
|
73
|
-
"module": "NodeNext",
|
|
74
|
-
"moduleResolution": "NodeNext",
|
|
75
|
-
"esModuleInterop": true,
|
|
76
|
-
"strict": false,
|
|
77
|
-
"skipLibCheck": true
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
```
|
|
66
|
+
## Documentation
|
|
81
67
|
|
|
82
|
-
|
|
68
|
+
After running `npx orangeslice`, you get:
|
|
83
69
|
|
|
84
|
-
```bash
|
|
85
|
-
npx tsx your-script.ts
|
|
86
70
|
```
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
// Query the B2B database - automatically rate-limited
|
|
94
|
-
const companies = await orangeslice.b2b.sql(`
|
|
95
|
-
SELECT company_name, domain, employee_count
|
|
96
|
-
FROM linkedin_company
|
|
97
|
-
WHERE universal_name = 'stripe'
|
|
98
|
-
`);
|
|
99
|
-
|
|
100
|
-
// Multiple parallel calls are queued (max 2 concurrent by default)
|
|
101
|
-
const results = await Promise.all([
|
|
102
|
-
orangeslice.b2b.sql("SELECT * FROM linkedin_company WHERE universal_name = 'stripe'"),
|
|
103
|
-
orangeslice.b2b.sql("SELECT * FROM linkedin_company WHERE universal_name = 'openai'"),
|
|
104
|
-
orangeslice.b2b.sql("SELECT * FROM linkedin_company WHERE universal_name = 'meta'"),
|
|
105
|
-
orangeslice.b2b.sql("SELECT * FROM linkedin_company WHERE universal_name = 'google'"),
|
|
106
|
-
orangeslice.b2b.sql("SELECT * FROM linkedin_company WHERE universal_name = 'amazon'"),
|
|
107
|
-
]);
|
|
108
|
-
// ^ Only 2 run at once, rest wait in queue automatically
|
|
71
|
+
orangeslice-docs/
|
|
72
|
+
├── AGENTS.md # Agent instructions (includes parallelization rules)
|
|
73
|
+
└── linkedin_data/
|
|
74
|
+
├── QUICK_REF.md # START HERE - Critical rules & patterns
|
|
75
|
+
├── tables/ # Full schema (denormalized + normalized)
|
|
76
|
+
└── search_examples/ # Query patterns for people & companies
|
|
109
77
|
```
|
|
110
78
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
```typescript
|
|
114
|
-
// Optional - configure before use
|
|
115
|
-
orangeslice.b2b.configure({
|
|
116
|
-
proxyUrl: 'http://your-proxy-url:3000/query', // default: B2B_SQL_PROXY_URL env var
|
|
117
|
-
concurrency: 3, // default: 2
|
|
118
|
-
minDelayMs: 200, // default: 100ms between requests
|
|
119
|
-
});
|
|
120
|
-
```
|
|
79
|
+
**Read `linkedin_data/QUICK_REF.md` before writing any queries.**
|
|
121
80
|
|
|
122
|
-
##
|
|
81
|
+
## Installation
|
|
123
82
|
|
|
124
83
|
```bash
|
|
125
|
-
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
## How It Works
|
|
129
|
-
|
|
130
|
-
```
|
|
131
|
-
Agent calls: [1] [2] [3] [4] [5] [6]
|
|
132
|
-
↓
|
|
133
|
-
Queue: [ 1, 2 running ] [ 3, 4, 5, 6 waiting ]
|
|
134
|
-
↓
|
|
135
|
-
API: [1] [2] ← only 2 hit the API at once
|
|
136
|
-
↓
|
|
137
|
-
[3] [4] ← when 1,2 finish, 3,4 start
|
|
84
|
+
npm install orangeslice
|
|
138
85
|
```
|
|
139
86
|
|
|
140
|
-
|
|
141
|
-
- Think about concurrency
|
|
142
|
-
- Add `await sleep()`
|
|
143
|
-
- Worry about rate limits
|
|
144
|
-
- Handle API throttling errors
|
|
145
|
-
|
|
146
|
-
## API Reference
|
|
87
|
+
## API
|
|
147
88
|
|
|
148
89
|
### `orangeslice.b2b.sql<T>(query: string): Promise<T>`
|
|
149
90
|
|
|
150
|
-
Execute SQL and return rows.
|
|
91
|
+
Execute SQL and return rows. **Always wrap multiple calls in `Promise.all()`.**
|
|
151
92
|
|
|
152
93
|
```typescript
|
|
94
|
+
// Single query
|
|
153
95
|
const companies = await orangeslice.b2b.sql<Company[]>(
|
|
154
96
|
"SELECT * FROM linkedin_company WHERE employee_count > 1000 LIMIT 10"
|
|
155
97
|
);
|
|
98
|
+
|
|
99
|
+
// Multiple queries - ALWAYS parallel
|
|
100
|
+
const [techCos, healthCos, financeCos] = await Promise.all([
|
|
101
|
+
orangeslice.b2b.sql("SELECT * FROM linkedin_company WHERE industry_code = 4 LIMIT 10"),
|
|
102
|
+
orangeslice.b2b.sql("SELECT * FROM linkedin_company WHERE industry_code = 14 LIMIT 10"),
|
|
103
|
+
orangeslice.b2b.sql("SELECT * FROM linkedin_company WHERE industry_code = 43 LIMIT 10"),
|
|
104
|
+
]);
|
|
156
105
|
```
|
|
157
106
|
|
|
158
107
|
### `orangeslice.b2b.query<T>(query: string): Promise<QueryResult<T>>`
|
|
@@ -164,42 +113,19 @@ const result = await orangeslice.b2b.query("SELECT * FROM linkedin_company LIMIT
|
|
|
164
113
|
// result.rows, result.rowCount, result.duration_ms
|
|
165
114
|
```
|
|
166
115
|
|
|
167
|
-
### `orangeslice.
|
|
116
|
+
### `orangeslice.b2b.configure(options)`
|
|
168
117
|
|
|
169
|
-
|
|
118
|
+
Configure rate limiting. Default settings handle parallelization automatically.
|
|
170
119
|
|
|
171
120
|
```typescript
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
// With options
|
|
176
|
-
const filtered = await orangeslice.serp.search("site:linkedin.com CEO", {
|
|
177
|
-
tbs: "qdr:m", // Past month
|
|
178
|
-
page: 1
|
|
121
|
+
orangeslice.b2b.configure({
|
|
122
|
+
concurrency: 3, // default: 2 concurrent requests
|
|
123
|
+
minDelayMs: 200, // default: 100ms between requests
|
|
179
124
|
});
|
|
180
125
|
```
|
|
181
126
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
Scrape a website and get markdown + social URLs.
|
|
185
|
-
|
|
186
|
-
```typescript
|
|
187
|
-
const page = await orangeslice.firecrawl.scrape("https://stripe.com/about");
|
|
188
|
-
// page.markdown, page.socialUrls
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
### `orangeslice.browser.execute(code: string, options?): Promise<BrowserResponse>`
|
|
192
|
-
|
|
193
|
-
Execute Playwright code with `page` in scope.
|
|
194
|
-
|
|
195
|
-
```typescript
|
|
196
|
-
const response = await orangeslice.browser.execute(`
|
|
197
|
-
await page.goto("https://example.com", { waitUntil: 'domcontentloaded' });
|
|
198
|
-
return await page.evaluate(() => document.title);
|
|
199
|
-
`);
|
|
200
|
-
// response.success, response.result
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
## Note on Concurrency
|
|
127
|
+
## Restrictions
|
|
204
128
|
|
|
205
|
-
|
|
129
|
+
- No direct contact data (email/phone)
|
|
130
|
+
- No Indeed job board data
|
|
131
|
+
- No traffic/analytics data
|
package/dist/cli.js
CHANGED
|
@@ -59,7 +59,8 @@ function copyDirSync(src, dest) {
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
async function main() {
|
|
62
|
-
console.log("\n🍊 orangeslice -
|
|
62
|
+
console.log("\n🍊 orangeslice - B2B LinkedIn Database Prospector\n");
|
|
63
|
+
console.log(" Your AI agent's sole job: understand this database and answer queries.\n");
|
|
63
64
|
// 1. Copy AGENTS.md to project root (for auto-detection by Claude Code, etc.)
|
|
64
65
|
console.log("1. Installing AGENTS.md at project root...");
|
|
65
66
|
if (fs.existsSync(AGENTS_MD)) {
|
|
@@ -67,7 +68,7 @@ async function main() {
|
|
|
67
68
|
console.log(" ✓ AGENTS.md → ./AGENTS.md (auto-detected by AI agents)\n");
|
|
68
69
|
}
|
|
69
70
|
// 2. Copy full docs to orangeslice-docs/ (wipe existing to ensure clean state)
|
|
70
|
-
console.log("2. Copying
|
|
71
|
+
console.log("2. Copying database documentation...");
|
|
71
72
|
if (fs.existsSync(TARGET_DIR)) {
|
|
72
73
|
fs.rmSync(TARGET_DIR, { recursive: true, force: true });
|
|
73
74
|
}
|
|
@@ -83,15 +84,13 @@ async function main() {
|
|
|
83
84
|
fs.copyFileSync(src, dest);
|
|
84
85
|
}
|
|
85
86
|
}
|
|
86
|
-
console.log(` ✓
|
|
87
|
-
console.log("
|
|
88
|
-
console.log(" • AGENTS.md
|
|
89
|
-
console.log(" • linkedin_data/
|
|
90
|
-
console.log("
|
|
91
|
-
console.log("
|
|
92
|
-
console.log("
|
|
93
|
-
console.log(" • apify.md - Pre-built web scrapers");
|
|
94
|
-
console.log(" • strategies.md - Prospecting & enrichment patterns\n");
|
|
87
|
+
console.log(` ✓ Docs → ./orangeslice-docs/\n`);
|
|
88
|
+
console.log(" Documentation:");
|
|
89
|
+
console.log(" • AGENTS.md - Agent instructions");
|
|
90
|
+
console.log(" • linkedin_data/ - Full database schema + query examples");
|
|
91
|
+
console.log(" ├── QUICK_REF.md - START HERE: Critical rules & patterns");
|
|
92
|
+
console.log(" ├── tables/ - Table schemas (denormalized + normalized)");
|
|
93
|
+
console.log(" └── search_examples/ - Query patterns for people & companies\n");
|
|
95
94
|
// 3. Install package
|
|
96
95
|
console.log("3. Installing orangeslice package...");
|
|
97
96
|
try {
|
|
@@ -101,15 +100,18 @@ async function main() {
|
|
|
101
100
|
console.log(" (skipped - no package.json or npm not available)\n");
|
|
102
101
|
}
|
|
103
102
|
// 4. Done
|
|
104
|
-
console.log("\n✅ Done! Your AI agent is now a
|
|
105
|
-
console.log("
|
|
106
|
-
console.log("
|
|
107
|
-
console.log("
|
|
108
|
-
console.log("
|
|
109
|
-
console.log("
|
|
110
|
-
console.log("
|
|
111
|
-
console.log("
|
|
112
|
-
console.log("
|
|
113
|
-
console.log("
|
|
103
|
+
console.log("\n✅ Done! Your AI agent is now a B2B LinkedIn database prospector.\n");
|
|
104
|
+
console.log(" Database: 1.15B profiles, 85M companies\n");
|
|
105
|
+
console.log(" ⚠️ CRITICAL RULE: ALWAYS PARALLELIZE QUERIES\n");
|
|
106
|
+
console.log(" // ❌ WRONG - Sequential");
|
|
107
|
+
console.log(" const a = await orangeslice.b2b.sql('...');");
|
|
108
|
+
console.log(" const b = await orangeslice.b2b.sql('...');\n");
|
|
109
|
+
console.log(" // ✅ CORRECT - Parallel");
|
|
110
|
+
console.log(" const [a, b] = await Promise.all([");
|
|
111
|
+
console.log(" orangeslice.b2b.sql('...'),");
|
|
112
|
+
console.log(" orangeslice.b2b.sql('...'),");
|
|
113
|
+
console.log(" ]);\n");
|
|
114
|
+
console.log(" The API handles rate limiting. Fire all queries at once.\n");
|
|
115
|
+
console.log(" Read linkedin_data/QUICK_REF.md before writing queries.\n");
|
|
114
116
|
}
|
|
115
117
|
main().catch(console.error);
|
package/dist/index.d.ts
CHANGED
|
@@ -1,45 +1,23 @@
|
|
|
1
1
|
import { b2b } from "./b2b";
|
|
2
|
-
|
|
3
|
-
import { firecrawl } from "./firecrawl";
|
|
4
|
-
import { browser } from "./browser";
|
|
5
|
-
import { generateObject } from "./generateObject";
|
|
6
|
-
import { apify } from "./apify";
|
|
7
|
-
import { geo } from "./geo";
|
|
8
|
-
export { b2b, serp, firecrawl, browser, generateObject, apify, geo };
|
|
2
|
+
export { b2b };
|
|
9
3
|
/**
|
|
10
|
-
*
|
|
4
|
+
* orangeslice - B2B LinkedIn Database
|
|
11
5
|
*
|
|
12
6
|
* @example
|
|
13
7
|
* import { orangeslice } from 'orangeslice';
|
|
14
8
|
*
|
|
15
|
-
* //
|
|
9
|
+
* // Query 1B+ LinkedIn profiles
|
|
16
10
|
* const companies = await orangeslice.b2b.sql("SELECT * FROM linkedin_company WHERE domain = 'stripe.com'");
|
|
17
11
|
*
|
|
18
|
-
* //
|
|
19
|
-
* const
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* await page.goto("https://example.com", { waitUntil: 'domcontentloaded' });
|
|
27
|
-
* return await page.evaluate(() => document.title);
|
|
12
|
+
* // Find people at a company
|
|
13
|
+
* const people = await orangeslice.b2b.sql(`
|
|
14
|
+
* SELECT p.first_name, p.last_name, pos.title
|
|
15
|
+
* FROM linkedin_profile p
|
|
16
|
+
* JOIN linkedin_profile_position3 pos ON pos.linkedin_profile_id = p.id
|
|
17
|
+
* JOIN linkedin_company c ON c.id = pos.linkedin_company_id
|
|
18
|
+
* WHERE c.domain = 'stripe.com' AND pos.end_date IS NULL
|
|
19
|
+
* LIMIT 10
|
|
28
20
|
* `);
|
|
29
|
-
*
|
|
30
|
-
* // AI Structured Output
|
|
31
|
-
* const extracted = await orangeslice.generateObject.generate({
|
|
32
|
-
* prompt: "Extract company info from: Apple was founded in 1976",
|
|
33
|
-
* schema: { type: "object", properties: { name: { type: "string" }, year: { type: "number" } } }
|
|
34
|
-
* });
|
|
35
|
-
*
|
|
36
|
-
* // Apify Actors (web scrapers)
|
|
37
|
-
* const reviews = await orangeslice.apify.run("compass/crawler-google-places", { searchStringsArray: ["cafes NYC"] });
|
|
38
|
-
*
|
|
39
|
-
* // Geocoding
|
|
40
|
-
* const location = await orangeslice.geo.parseAddress("1600 Amphitheatre Parkway, Mountain View, CA");
|
|
41
|
-
*
|
|
42
|
-
* // All calls are automatically rate-limited and queued
|
|
43
21
|
*/
|
|
44
22
|
export declare const orangeslice: {
|
|
45
23
|
b2b: {
|
|
@@ -47,33 +25,5 @@ export declare const orangeslice: {
|
|
|
47
25
|
query: typeof import("./b2b").query;
|
|
48
26
|
configure: typeof import("./b2b").configure;
|
|
49
27
|
};
|
|
50
|
-
serp: {
|
|
51
|
-
search: typeof import("./serp").search;
|
|
52
|
-
organic: typeof import("./serp").organic;
|
|
53
|
-
};
|
|
54
|
-
firecrawl: {
|
|
55
|
-
scrape: typeof import("./firecrawl").scrape;
|
|
56
|
-
markdown: typeof import("./firecrawl").markdown;
|
|
57
|
-
socials: typeof import("./firecrawl").socials;
|
|
58
|
-
};
|
|
59
|
-
browser: {
|
|
60
|
-
execute: typeof import("./browser").execute;
|
|
61
|
-
snapshot: typeof import("./browser").snapshot;
|
|
62
|
-
text: typeof import("./browser").text;
|
|
63
|
-
};
|
|
64
|
-
generateObject: {
|
|
65
|
-
generate: typeof import("./generateObject").generate;
|
|
66
|
-
extract: typeof import("./generateObject").extract;
|
|
67
|
-
};
|
|
68
|
-
apify: {
|
|
69
|
-
run: typeof import("./apify").run;
|
|
70
|
-
search: typeof import("./apify").search;
|
|
71
|
-
getInputSchema: typeof import("./apify").getInputSchema;
|
|
72
|
-
};
|
|
73
|
-
geo: {
|
|
74
|
-
parseAddress: typeof import("./geo").parseAddress;
|
|
75
|
-
geocode: typeof import("./geo").geocode;
|
|
76
|
-
getCityState: typeof import("./geo").getCityState;
|
|
77
|
-
};
|
|
78
28
|
};
|
|
79
29
|
export default orangeslice;
|
package/dist/index.js
CHANGED
|
@@ -1,62 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.orangeslice = exports.
|
|
3
|
+
exports.orangeslice = exports.b2b = void 0;
|
|
4
4
|
const b2b_1 = require("./b2b");
|
|
5
5
|
Object.defineProperty(exports, "b2b", { enumerable: true, get: function () { return b2b_1.b2b; } });
|
|
6
|
-
const serp_1 = require("./serp");
|
|
7
|
-
Object.defineProperty(exports, "serp", { enumerable: true, get: function () { return serp_1.serp; } });
|
|
8
|
-
const firecrawl_1 = require("./firecrawl");
|
|
9
|
-
Object.defineProperty(exports, "firecrawl", { enumerable: true, get: function () { return firecrawl_1.firecrawl; } });
|
|
10
|
-
const browser_1 = require("./browser");
|
|
11
|
-
Object.defineProperty(exports, "browser", { enumerable: true, get: function () { return browser_1.browser; } });
|
|
12
|
-
const generateObject_1 = require("./generateObject");
|
|
13
|
-
Object.defineProperty(exports, "generateObject", { enumerable: true, get: function () { return generateObject_1.generateObject; } });
|
|
14
|
-
const apify_1 = require("./apify");
|
|
15
|
-
Object.defineProperty(exports, "apify", { enumerable: true, get: function () { return apify_1.apify; } });
|
|
16
|
-
const geo_1 = require("./geo");
|
|
17
|
-
Object.defineProperty(exports, "geo", { enumerable: true, get: function () { return geo_1.geo; } });
|
|
18
6
|
/**
|
|
19
|
-
*
|
|
7
|
+
* orangeslice - B2B LinkedIn Database
|
|
20
8
|
*
|
|
21
9
|
* @example
|
|
22
10
|
* import { orangeslice } from 'orangeslice';
|
|
23
11
|
*
|
|
24
|
-
* //
|
|
12
|
+
* // Query 1B+ LinkedIn profiles
|
|
25
13
|
* const companies = await orangeslice.b2b.sql("SELECT * FROM linkedin_company WHERE domain = 'stripe.com'");
|
|
26
14
|
*
|
|
27
|
-
* //
|
|
28
|
-
* const
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* await page.goto("https://example.com", { waitUntil: 'domcontentloaded' });
|
|
36
|
-
* return await page.evaluate(() => document.title);
|
|
15
|
+
* // Find people at a company
|
|
16
|
+
* const people = await orangeslice.b2b.sql(`
|
|
17
|
+
* SELECT p.first_name, p.last_name, pos.title
|
|
18
|
+
* FROM linkedin_profile p
|
|
19
|
+
* JOIN linkedin_profile_position3 pos ON pos.linkedin_profile_id = p.id
|
|
20
|
+
* JOIN linkedin_company c ON c.id = pos.linkedin_company_id
|
|
21
|
+
* WHERE c.domain = 'stripe.com' AND pos.end_date IS NULL
|
|
22
|
+
* LIMIT 10
|
|
37
23
|
* `);
|
|
38
|
-
*
|
|
39
|
-
* // AI Structured Output
|
|
40
|
-
* const extracted = await orangeslice.generateObject.generate({
|
|
41
|
-
* prompt: "Extract company info from: Apple was founded in 1976",
|
|
42
|
-
* schema: { type: "object", properties: { name: { type: "string" }, year: { type: "number" } } }
|
|
43
|
-
* });
|
|
44
|
-
*
|
|
45
|
-
* // Apify Actors (web scrapers)
|
|
46
|
-
* const reviews = await orangeslice.apify.run("compass/crawler-google-places", { searchStringsArray: ["cafes NYC"] });
|
|
47
|
-
*
|
|
48
|
-
* // Geocoding
|
|
49
|
-
* const location = await orangeslice.geo.parseAddress("1600 Amphitheatre Parkway, Mountain View, CA");
|
|
50
|
-
*
|
|
51
|
-
* // All calls are automatically rate-limited and queued
|
|
52
24
|
*/
|
|
53
25
|
exports.orangeslice = {
|
|
54
26
|
b2b: b2b_1.b2b,
|
|
55
|
-
serp: serp_1.serp,
|
|
56
|
-
firecrawl: firecrawl_1.firecrawl,
|
|
57
|
-
browser: browser_1.browser,
|
|
58
|
-
generateObject: generateObject_1.generateObject,
|
|
59
|
-
apify: apify_1.apify,
|
|
60
|
-
geo: geo_1.geo,
|
|
61
27
|
};
|
|
62
28
|
exports.default = exports.orangeslice;
|