← back to gallery

AI Pink Slip

Live leaderboard of layoffs that companies have explicitly blamed on AI.

contentlayoffsailabornewsleaderboard
Open product ↗

ai-pink-slip

A live, searchable leaderboard of layoffs that companies have explicitly attributed to AI or automation — sourced from real public feeds, classified by a transparent keyword scorer, and ranked by AI-attributed headcount over rolling windows.

Built for journalists, recruiters, HR strategists, and tech workers who want one place to answer "how much of this layoff wave is genuinely AI vs. vague restructuring?" and to benchmark whether their own role might be next.

What it does

Data sources

Every "live" data point traces to one of these. No mock data. No Math.random().

| Source | URL | Refresh |
|--------|-----|---------|
| HN Algolia API | https://hn.algolia.com/api/v1/search_by_date?query=layoff&tags=story&hitsPerPage=100 | every 15 min |
| TechCrunch layoffs RSS | https://techcrunch.com/tag/layoffs/feed/ | every 30 min |
| Google News RSS | https://news.google.com/rss/search?q=layoffs+AI+OR+%22ai-attributed%22+OR+%22replaced+by+AI%22&hl=en-US&gl=US&ceid=US:en | every 30 min |
| layoffs.fyi | https://layoffs.fyi/ (HTML scrape) | every 6 h |

If a source fails, the previous data is kept; /health reports per-source status.

API endpoints

All endpoints are under /ai-pink-slip. No auth. Public.

| Method | Path | Purpose |
|--------|------|---------|
| GET | /health | {ok, sources:{<src>:{status,lastRunAt,itemsLastRun,…}}, sourcesLive} |
| GET | /api/stats | totals: AI-attributed items 30/90/365d, headcount 30/90/365d, total items, companies tracked, last refresh |
| GET | /api/leaderboard?window=30d\|90d\|365d\|all&limit=50 | array of {slug, name, headcount, itemCount, aiItemCount, latestAt, topItem} |
| GET | /api/companies | every company tracked, with item / AI-item / AI-headcount counts |
| GET | /api/companies/:slug | {company, items[], totals} for one company |
| GET | /api/items?q=&company=&label=&source=&limit=&offset= | filtered / searched items |
| GET | /share/weekly | server-rendered HTML page with OG meta tags — top 5 AI-attributed cuts last 7 days |
| GET | / | SPA shell |
| GET | /app.js, /style.css | static assets |

Classification

Three labels via a weighted regex scorer:

Every signal that matched is stored in ai_signals and surfaced as a chip in the UI so you can audit the decision.

Run locally

Requirements: Node ≥ 22.

npm install
PORT=4834 node server.js
# open http://localhost:4834/ai-pink-slip/

The server triggers an initial scrape of all 4 sources on boot and then schedules cron jobs. The SQLite database lives at data/ai-pink-slip.db (WAL mode).

Configuration

.env.example:

PORT=4834
NODE_ENV=production
OPENROUTER_API_KEY=__INJECT_FROM_VAULT__
BRAVE_API_KEY=__INJECT_FROM_VAULT__

OPENROUTER_API_KEY and BRAVE_API_KEY are reserved for future use — no current code path requires them.

Tech stack

Node 22 · Express · better-sqlite3 (WAL) · node-cron · helmet · compression · cheerio · fast-xml-parser. Frontend is vanilla JS (no framework).

File layout

ai-pink-slip/
├── server.js                  # express bootstrap, mounts /ai-pink-slip, starts cron
├── db.js                      # better-sqlite3 init, schema, prepared statements
├── lib/
│   ├── classifier.js          # keyword + regex AI-attribution scoring
│   ├── headcount.js           # regex extract headcount / percent
│   ├── company.js             # normalize, slugify, alias map (~80 entries)
│   ├── fetcher.js             # fetch w/ timeout + UA
│   ├── cron.js                # registers scrapers with node-cron
│   └── windows.js             # date-window helpers
├── scrapers/
│   ├── hn.js                  # HN Algolia → items
│   ├── techcrunch.js          # TC RSS → items
│   ├── googlenews.js          # Google News RSS → items
│   └── layoffsfyi.js          # layoffs.fyi HTML → items
├── routes/
│   ├── health.js
│   ├── stats.js
│   ├── leaderboard.js
│   ├── companies.js
│   ├── items.js
│   └── share.js
└── public/
    ├── index.html
    ├── app.js                 # vanilla JS SPA — hash routing
    └── style.css              # dark theme

Caveats

License

MIT — built by holyai.me.