Spaces:
Sleeping
Sleeping
File size: 7,264 Bytes
2ec6949 c494a1e 2ec6949 c494a1e 2ec6949 c494a1e 2ec6949 c494a1e 2ec6949 c494a1e 2ec6949 c494a1e 2ec6949 c494a1e 2ec6949 c494a1e 2ec6949 c494a1e 2ec6949 c494a1e 2ec6949 c494a1e 2ec6949 c494a1e 2ec6949 c494a1e 2ec6949 c494a1e 2ec6949 c494a1e 2ec6949 c494a1e 2ec6949 c494a1e 2ec6949 c494a1e 2ec6949 c494a1e 2ec6949 c494a1e 2ec6949 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 | # Career-Ops Deployed API
Base URL: `https://scythe327-career-ops.hf.space`
> **Deployment**: Hugging Face Spaces (Docker) β 2 vCPU, 16 GB RAM, persistent storage at `/data`
---
## Health Check
**GET** `/health`
Check if the server is alive.
```powershell
curl.exe https://scythe327-career-ops.hf.space/health
```
Response:
```json
{ "status": "ok", "uptime": 137.4 }
```
---
## Scanners β Find Jobs
### Scan all portals
**POST** `/run/scan`
Scans job boards and company career pages (Ashby, Greenhouse, Lever, Wellfound, etc.) for matching roles.
```powershell
curl.exe -X POST https://scythe327-career-ops.hf.space/run/scan
```
Options (JSON body):
- `company` β scan only a specific company
- `dryRun` β `true` to preview without saving
---
### Unified Job Scraper
**POST** `/run/scrape`
Run one or more scrapers with a single request. Supports:
| source | What it does |
|--------|-------------|
| `yc` | Searches YC Work at a Startup via Algolia (requires `YC_ALGOLIA_KEY` secret) |
| `yc-eng` | Deep engineering-focused YC Algolia scrape |
| `yc-public` | Public YC Companies API (no key needed) |
| `portals` | Same as `/run/scan` |
| `all` | Runs all four in parallel |
```powershell
$body = '{"source":"yc-public"}'
curl.exe -X POST https://scythe327-career-ops.hf.space/run/scrape ^
-H "Content-Type: application/json" -d $body
```
```powershell
$body = '{"source":"yc","role":"eng","location":"Remote","hits":10}'
curl.exe -X POST https://scythe327-career-ops.hf.space/run/scrape ^
-H "Content-Type: application/json" -d $body
```
---
## Outreach β Send Emails
### Smart Outreach (Auto)
**POST** `/run/outreach-for`
Give it a company name and role. The server will:
1. Search YC Algolia for the job description
2. Read your CV (`cv.md`)
3. Craft a personalized email based on your actual experience
4. Guess the company email (`hello@`, `founders@`, `apply@`, `team@`)
5. Send the email
```powershell
$body = '{"company":"Zymbly","role":"Forward Deployed Engineer"}'
curl.exe -X POST https://scythe327-career-ops.hf.space/run/outreach-for ^
-H "Content-Type: application/json" -d $body
```
Response:
```json
{
"success": true,
"company": "Zymbly",
"role": "Forward Deployed Engineer",
"candidate_name": "Rohan P H",
"emails_tried": [
{ "to": "hello@zymbly.com", "success": true }
]
}
```
### Send Outreach from TSV
**POST** `/run/send-outreach`
Sends all "draft" rows from `data/outreach.tsv` through the full pipeline (verification β throttle β send). Max 20 emails per run.
```powershell
curl.exe -X POST https://scythe327-career-ops.hf.space/run/send-outreach
```
### Send Test Email
**POST** `/run/test-email`
Send a one-off email to any address.
```powershell
$body = '{"to":"someone@gmail.com","subject":"Hello","message":"This is a test"}'
curl.exe -X POST https://scythe327-career-ops.hf.space/run/test-email ^
-H "Content-Type: application/json" -d $body
```
---
## System β Diagnostics
### Doctor
**POST** `/run/doctor`
Runs a health check on the system β validates config files, dependencies, and connectivity.
```powershell
curl.exe -X POST https://scythe327-career-ops.hf.space/run/doctor
```
### Verify Pipeline
**POST** `/run/verify`
Verifies the end-to-end pipeline is functional.
```powershell
curl.exe -X POST https://scythe327-career-ops.hf.space/run/verify
```
---
## PDF Generation
**POST** `/run/pdf`
Convert HTML to PDF using Playwright (Chromium).
```powershell
$body = '{"input":"input.html","output":"output/cv.pdf"}'
curl.exe -X POST https://scythe327-career-ops.hf.space/run/pdf ^
-H "Content-Type: application/json" -d $body
```
---
## YC-Specific
### Fetch YC Jobs (Algolia)
**POST** `/run/yc-fetch`
Search YC Work at a Startup with filters. Requires `YC_ALGOLIA_KEY` secret.
```powershell
$body = '{"role":"eng","location":"Remote","hits":20}'
curl.exe -X POST https://scythe327-career-ops.hf.space/run/yc-fetch ^
-H "Content-Type: application/json" -d $body
```
### Scrape YC Public
**POST** `/run/yc-scrape`
Lists all YC companies via the public API (no key needed).
```powershell
curl.exe -X POST https://scythe327-career-ops.hf.space/run/yc-scrape
```
### Deep YC Engineering Scrape
**POST** `/run/yc-scrape-eng`
Filters YC jobs by engineering role with pagination.
```powershell
$body = '{"filters":"role:eng","hits":100}'
curl.exe -X POST https://scythe327-career-ops.hf.space/run/yc-scrape-eng ^
-H "Content-Type: application/json" -d $body
```
---
## AI-Powered Prompts (Async)
### Run AI Prompt
**POST** `/run/ai-prompt`
Run an AI prompt via `opencode-ai` (built-in model, no external API key needed). Returns immediately with a `job_id` β poll the GET endpoint for results.
```powershell
Set-Content -Path body.json -Value '{"prompt":"List 3 SRE best practices"}'
curl.exe -X POST https://scythe327-career-ops.hf.space/run/ai-prompt ^
-H "Content-Type: application/json" -d @body.json
```
Response:
```json
{ "success": true, "job_id": "a1b2c3d4", "status": "running" }
```
### Poll AI Result
**GET** `/run/ai-prompt/:jobId`
```powershell
curl.exe https://scythe327-career-ops.hf.space/run/ai-prompt/a1b2c3d4
```
Response (running):
```json
{ "job_id": "a1b2c3d4", "status": "running", "result": null }
```
Response (done):
```json
{ "job_id": "a1b2c3d4", "status": "done", "result": "...", "error": null }
```
### List AI Jobs
**GET** `/run/ai-prompt`
Lists all recent AI prompt jobs.
```powershell
curl.exe https://scythe327-career-ops.hf.space/run/ai-prompt
```
---
## Scheduled Jobs
The server auto-runs these if the corresponding env vars are set:
| Env Var | Cron Format | Default Schedule |
|---------|------------|------------------|
| `SCAN_SCHEDULE` | `0 9 * * 1` | Mon 9am |
| `OUTREACH_SCHEDULE` | `0 10 * * *` | Daily 10am |
| `YC_SCHEDULE` | `0 8 * * 1` | Mon 8am |
---
## Step-by-Step Example: Full Workflow
### 1. Check the server is alive
```powershell
curl.exe https://scythe327-career-ops.hf.space/health
# β { "status": "ok", "uptime": 137 }
```
### 2. Find jobs
```powershell
# Quick public YC scan (no key needed)
curl.exe -X POST https://scythe327-career-ops.hf.space/run/scrape ^
-H "Content-Type: application/json" -d '{"source":"yc-public"}'
# β { "success": true, "results": [...] }
```
### 3. Send a targeted outreach
```powershell
curl.exe -X POST https://scythe327-career-ops.hf.space/run/outreach-for ^
-H "Content-Type: application/json" -d '{"company":"Zymbly","role":"Forward Deployed Engineer"}'
# β { "success": true, "emails_tried": [...] }
```
### 4. Run diagnostics
```powershell
curl.exe -X POST https://scythe327-career-ops.hf.space/run/doctor
# β { "success": true }
```
---
## Notes
- Use a temp file for JSON body in PowerShell: `Set-Content -Path body.json -Value '...'` then `curl.exe -d "@body.json"`
- Persistent storage at `/data` β config files (`profile.yml`, `portals.yml`, `cv.md`) go in `/data/config/` and survive redeploys
- SMTP credentials (`SMTP_USER`, `SMTP_PASS`) are injected via HF Secrets
- `config/email.yml` is auto-created at startup from `SMTP_USER`/`SMTP_PASS` env vars
- `YC_ALGOLIA_KEY` is optional β Algolia-based endpoints work without it (public endpoints don't need it)
|