career-ops / docs /DEPLOYED_API.md
scythe327
update DEPLOYED_API.md with HF Spaces base URL and AI prompt docs
c494a1e
|
Raw
History Blame Contribute Delete
7.26 kB

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.

curl.exe https://scythe327-career-ops.hf.space/health

Response:

{ "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.

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
$body = '{"source":"yc-public"}'
curl.exe -X POST https://scythe327-career-ops.hf.space/run/scrape ^
  -H "Content-Type: application/json" -d $body
$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
$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:

{
  "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.

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.

$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.

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.

curl.exe -X POST https://scythe327-career-ops.hf.space/run/verify

PDF Generation

POST /run/pdf

Convert HTML to PDF using Playwright (Chromium).

$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.

$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).

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.

$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.

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:

{ "success": true, "job_id": "a1b2c3d4", "status": "running" }

Poll AI Result

GET /run/ai-prompt/:jobId

curl.exe https://scythe327-career-ops.hf.space/run/ai-prompt/a1b2c3d4

Response (running):

{ "job_id": "a1b2c3d4", "status": "running", "result": null }

Response (done):

{ "job_id": "a1b2c3d4", "status": "done", "result": "...", "error": null }

List AI Jobs

GET /run/ai-prompt

Lists all recent AI prompt jobs.

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

curl.exe https://scythe327-career-ops.hf.space/health
# β†’ { "status": "ok", "uptime": 137 }

2. Find jobs

# 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

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

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)