job-scout 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.
Files changed (2) hide show
  1. package/README.md +120 -0
  2. package/package.json +41 -0
package/README.md ADDED
@@ -0,0 +1,120 @@
1
+ # job-scout
2
+
3
+ TypeScript-first job scraping library for LinkedIn, Indeed, ZipRecruiter, Glassdoor, Google Jobs, Bayt, Naukri, and BDJobs.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ bun add job-scout
9
+ ```
10
+
11
+ Node `>=20` is required.
12
+
13
+ ## Quick Start
14
+
15
+ ```ts
16
+ import { scoutJobs } from 'job-scout'
17
+
18
+ const jobs = await scoutJobs(
19
+ {
20
+ sites: ['indeed', 'linkedin', 'zipRecruiter', 'google'],
21
+ query: 'software engineer',
22
+ location: 'San Francisco, CA',
23
+ pagination: { limitPerSite: 20 },
24
+ filters: { postedWithinHours: 72 },
25
+ google: {
26
+ query: 'software engineer jobs near San Francisco, CA since yesterday',
27
+ },
28
+ indeed: { country: 'usa' },
29
+ linkedin: { fetchDescription: true },
30
+ },
31
+ {
32
+ transport: {
33
+ timeoutMs: 20_000,
34
+ },
35
+ logging: {
36
+ level: 'warn',
37
+ },
38
+ },
39
+ )
40
+
41
+ console.log(jobs.length)
42
+ console.log(jobs[0])
43
+ ```
44
+
45
+ ## Client API
46
+
47
+ ```ts
48
+ import { createClient } from 'job-scout'
49
+
50
+ const client = createClient({
51
+ transport: { timeoutMs: 20_000 },
52
+ logging: { level: 'warn' },
53
+ })
54
+
55
+ const jobs = await client.scoutJobs({
56
+ sites: ['indeed'],
57
+ query: 'backend engineer',
58
+ location: 'Austin, TX',
59
+ indeed: { country: 'usa' },
60
+ })
61
+ ```
62
+
63
+ ## Public API
64
+
65
+ - `createClient(config?: JobScoutConfig): JobScoutClient`
66
+ - `scoutJobs(request: JobSearchRequest, config?: JobScoutConfig): Promise<Job[]>`
67
+ - `scoutJobRows(request: JobSearchRequest, config?: JobScoutConfig): Promise<JobRow[]>`
68
+ - `toJobRows(jobs: Job[]): JobRow[]`
69
+
70
+ ## Request Model
71
+
72
+ `JobSearchRequest` supports:
73
+
74
+ - `sites?: JobSite[]`
75
+ - `query?: string`
76
+ - `location?: string`
77
+ - `pagination?: { limitPerSite?: number; offset?: number }`
78
+ - `filters?: { distanceMiles?: number; remote?: boolean; easyApply?: boolean; employmentType?: ...; postedWithinHours?: number }`
79
+ - `linkedin?: { fetchDescription?: boolean; companyIds?: number[] }`
80
+ - `indeed?: { country?: string }`
81
+ - `google?: { query?: string }`
82
+
83
+ Constraint rules enforced at runtime:
84
+
85
+ - If `sites` includes `google`, `google.query` is required.
86
+ - For Indeed, use only one filter group at a time:
87
+ - `filters.postedWithinHours`
88
+ - `filters.easyApply`
89
+ - `filters.employmentType`/`filters.remote`
90
+ - For LinkedIn, `filters.postedWithinHours` and `filters.easyApply` cannot both be enabled.
91
+
92
+ ## Configuration
93
+
94
+ `JobScoutConfig`:
95
+
96
+ - `transport`: proxies, user agent, CA cert path, timeout
97
+ - `performance`: global/site concurrency, retry policy, adaptive concurrency
98
+ - `output`: description format, salary annualization, salary fallback behavior
99
+ - `logging`: `error | warn | info | debug`
100
+
101
+ ## Testing
102
+
103
+ Unit tests:
104
+
105
+ ```bash
106
+ bun run test
107
+ ```
108
+
109
+ Live integration tests:
110
+
111
+ ```bash
112
+ JOBSCOUT_TEST_PROXIES="host1:port1,host2:port2" \
113
+ bun run test:integration:live
114
+ ```
115
+
116
+ Full suite:
117
+
118
+ ```bash
119
+ bun run test:all
120
+ ```
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "job-scout",
3
+ "version": "1.0.0",
4
+ "description": "TypeScript-native job-scout library",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ }
13
+ },
14
+ "files": [
15
+ "dist"
16
+ ],
17
+ "packageManager": "bun@1.3.5",
18
+ "scripts": {
19
+ "build": "tsc -p tsconfig.build.json",
20
+ "typecheck": "tsc -p tsconfig.json --noEmit",
21
+ "test": "bun run test:unit",
22
+ "test:unit": "bun test ./test/*.test.ts",
23
+ "test:integration:live": "bun test ./test/integration/live",
24
+ "test:all": "bun run test:unit && bun run test:integration:live",
25
+ "test:watch": "bun test --watch ./test/*.test.ts"
26
+ },
27
+ "engines": {
28
+ "node": ">=20"
29
+ },
30
+ "dependencies": {
31
+ "cheerio": "^1.1.2",
32
+ "turndown": "^7.2.0",
33
+ "undici": "^7.16.0",
34
+ "zod": "^4.1.5"
35
+ },
36
+ "devDependencies": {
37
+ "@types/node": "^24.3.0",
38
+ "@types/turndown": "^5.0.5",
39
+ "typescript": "^5.9.2"
40
+ }
41
+ }