# Pull every open job from Greenhouse, Lever and Ashby with Python (public APIs, no key)

*I wrote this with help from an AI assistant. I ran every script below myself on Nov 23, 2026, against the live public job-board APIs, and the output shown is copied from those runs.*

Most tech companies don't host their own careers backend. They use an applicant tracking system (ATS), and the three you'll see most often at startups and scale-ups are **Greenhouse**, **Lever** and **Ashby**. All three publish a free, public, read-only JSON API for each company's job board. You don't need an API key, a headless browser, or any HTML scraping.

In this post we'll write one small Python file that:

- pulls every open job from Greenhouse, Lever and Ashby boards,
- normalizes them into the same six fields,
- filters by keyword and saves to CSV,
- and, in a second short script, prints only the jobs that are **new since the last run**.

The only dependency is `requests`.

## Finding a company's board slug

Open a company's careers page and click any job. The URL tells you which ATS it uses and what the slug is:

| ATS | Job URL looks like | Slug |
|---|---|---|
| Greenhouse | `boards.greenhouse.io/stripe/jobs/123` or `job-boards.greenhouse.io/stripe/...` | `stripe` |
| Lever | `jobs.lever.co/spotify/...` | `spotify` |
| Ashby | `jobs.ashbyhq.com/notion/...` | `notion` |

Some companies hide the ATS behind their own domain (Stripe's links go to `stripe.com/jobs/search?gh_jid=...`; the `gh_jid` gives Greenhouse away).

## The three endpoints

- Greenhouse: `GET https://boards-api.greenhouse.io/v1/boards/{slug}/jobs`, which returns `{"jobs": [...]}`
- Lever: `GET https://api.lever.co/v0/postings/{slug}?mode=json`, which returns a plain list
- Ashby: `GET https://api.ashbyhq.com/posting-api/job-board/{slug}`, which returns `{"jobs": [...]}`

Each uses different field names (`title` vs `text`, `absolute_url` vs `hostedUrl` vs `jobUrl`, ISO dates vs epoch milliseconds), so the main job of our code is mapping them to one shape.

## The script

Save this as `ats_jobs.py`:

```python
import json, sys, time, csv
import requests

UA = {"User-Agent": "ats-jobs-tutorial/1.0 (+https://saadhazz.hashnode.dev)"}

def greenhouse(board):
    url = f"https://boards-api.greenhouse.io/v1/boards/{board}/jobs"
    r = requests.get(url, params={"content": "false"}, headers=UA, timeout=30)
    r.raise_for_status()
    for j in r.json().get("jobs", []):
        yield {
            "source": "greenhouse", "company": board, "title": j.get("title"),
            "location": (j.get("location") or {}).get("name"),
            "url": j.get("absolute_url"), "updated": j.get("updated_at"),
        }

def lever(company):
    url = f"https://api.lever.co/v0/postings/{company}"
    r = requests.get(url, params={"mode": "json"}, headers=UA, timeout=30)
    r.raise_for_status()
    for j in r.json():
        cats = j.get("categories") or {}
        yield {
            "source": "lever", "company": company, "title": j.get("text"),
            "location": cats.get("location"), "url": j.get("hostedUrl"),
            "updated": time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime(j["createdAt"] / 1000)) if j.get("createdAt") else None,
        }

def ashby(org):
    url = f"https://api.ashbyhq.com/posting-api/job-board/{org}"
    r = requests.get(url, params={"includeCompensation": "true"}, headers=UA, timeout=30)
    r.raise_for_status()
    for j in r.json().get("jobs", []):
        if not j.get("isListed", True):
            continue
        yield {
            "source": "ashby", "company": org, "title": j.get("title"),
            "location": j.get("location"), "url": j.get("jobUrl"),
            "updated": j.get("publishedAt"),
        }

FETCHERS = {"greenhouse": greenhouse, "lever": lever, "ashby": ashby}

def fetch_all(boards, keyword=None):
    rows = []
    for source, slug in boards:
        try:
            for job in FETCHERS[source](slug):
                if keyword and keyword.lower() not in (job["title"] or "").lower():
                    continue
                rows.append(job)
        except requests.HTTPError as e:
            print(f"skip {source}/{slug}: {e.response.status_code}", file=sys.stderr)
        time.sleep(0.5)
    return rows

if __name__ == "__main__":
    boards = [("greenhouse", "stripe"), ("greenhouse", "airbnb"), ("lever", "spotify"),
              ("lever", "palantir"), ("ashby", "notion"), ("ashby", "openai"), ("lever", "no-such-company-xyz")]
    kw = sys.argv[1] if len(sys.argv) > 1 else None
    rows = fetch_all(boards, kw)
    with open("jobs.csv", "w", newline="") as f:
        w = csv.DictWriter(f, fieldnames=["source", "company", "title", "location", "url", "updated"])
        w.writeheader(); w.writerows(rows)
    from collections import Counter
    print(len(rows), "jobs", dict(Counter(r["company"] for r in rows)))
    for r in rows[:5]: print(r)
```

A few details worth pointing out:

- **Lever dates** are epoch milliseconds (`createdAt`), so we convert them to ISO.
- **Ashby** can return unlisted postings; we skip anything with `isListed: false`.
- A wrong slug returns **404**. We log it and move on instead of crashing the whole run.
- The half-second pause between boards keeps us polite. These are public endpoints, so don't hammer them.

## Running it

```text
$ python3 ats_jobs.py
skip lever/no-such-company-xyz: 404
2398 jobs {'stripe': 776, 'airbnb': 201, 'spotify': 91, 'palantir': 308, 'notion': 170, 'openai': 852}
{'source': 'greenhouse', 'company': 'stripe', 'title': 'Abuse Investigator', 'location': 'Seattle, San Francisco, New York City', 'url': 'https://stripe.com/jobs/search?gh_jid=8172510', 'updated': '2026-11-19T12:12:24-05:00'}
...
```

Six boards, about 2,400 open jobs, in a few seconds. The made-up `no-such-company-xyz` slug shows the 404 handling. With a keyword:

```text
$ python3 ats_jobs.py engineer
skip lever/no-such-company-xyz: 404
877 jobs {'stripe': 181, 'airbnb': 54, 'spotify': 31, 'palantir': 187, 'notion': 32, 'openai': 392}
```

Everything also lands in `jobs.csv`, ready for a spreadsheet.

## Only show new jobs since the last run

Usually you don't want the full list every day, just what was posted since yesterday. Job URLs are stable, so a small "seen" file is enough. Save this as `watch_new.py` next to the first script:

```python
import json, os
from ats_jobs import fetch_all

SEEN = "seen.json"
boards = [("greenhouse", "stripe"), ("lever", "spotify"), ("ashby", "notion")]

seen = set(json.load(open(SEEN))) if os.path.exists(SEEN) else set()
jobs = fetch_all(boards, keyword="engineer")
new = [j for j in jobs if j["url"] not in seen]
for j in new:
    print(f"NEW  {j['company']:<8} {j['title']}  ({j['location']})")
json.dump(sorted(seen | {j["url"] for j in jobs}), open(SEEN, "w"))
print(f"{len(new)} new of {len(jobs)} matching jobs")
```

First run, everything is new:

```text
$ python3 watch_new.py
...
NEW  notion   Software Engineer, Collections Infra  (San Francisco, California)
244 new of 244 matching jobs
```

Run it again right away and nothing has changed:

```text
$ python3 watch_new.py
0 new of 244 matching jobs
```

Put that in a daily cron job (`0 8 * * * cd ~/jobs && python3 watch_new.py`) and pipe the output to email, Slack or Telegram, and you have your own job alert for exactly the companies you care about.

## Ideas for using it

- A personal watchlist of 20 to 50 target companies, filtered for your role.
- Hiring-signal research: a company that suddenly posts many sales or infra roles is usually growing or launching something.
- A niche job board for one stack or region, built on the same normalized rows.

If you'd rather not host and schedule this yourself, I packaged the same idea as a hosted tool: [ATS Jobs API on Apify](https://apify.com/saadhazz/ats-jobs-api). It covers Greenhouse, Lever and Ashby plus SmartRecruiters and Recruitee, and adds salary, department and full descriptions. But for a personal watchlist, the two scripts above are all you need.

Know another ATS with a public JSON feed (Workable, Personio, Teamtailor...)? Leave a comment and I may cover it next.
