Skip to content

Run the collector

The collector fetches new remote jobs from WFHeaven's job sources, labels where each can be done from, and saves them to a JSON file. On its own it keeps only worldwide jobs. The daily run adds --include-restricted, so the ranker can check the rest against each tester's profile, and one --himalayas-country per country query, so Himalayas jobs restricted to a list of countries are read too. The daily email sends the picks.

Before you start

You need Python 3.10 or later. The collector uses only Python's standard library, so there's nothing else to install.

To check your Python version, run:

python3 --version

Run it

From the root of the repository, run:

python3 collector/fetch_jobs.py

The collector prints what it fetched from each source and where it saved the result:

[himalayas] fetched 60 postings
[jobicy] fetched 100 postings
[remoteok] fetched 98 postings
Saved 47 jobs to data/jobs-2026-12-03.json

The data/ folder isn't saved to Git. Each run writes a new file named after the day, and running it again on the same day replaces that day's file.

Options

Option Default What it does
--days 2 How many days back to look for new postings
--out data Folder to save the file in
--himalayas-pages 10 Most Himalayas pages to read, at 20 jobs a page
--jobicy-count 100 How many of the newest Jobicy jobs to read
--include-restricted off Also keep jobs limited to some countries
--himalayas-hide-ai-training off Ask Himalayas to leave out AI-training gigs (ai_training=hide), for a profile set to hide (ADR 0009)
--himalayas-country none Also read Himalayas jobs restricted to countries that include this one, such as Taiwan. Repeat it for more countries; each is one more query (ADR 0008)

For example, to look back a week and keep every job:

python3 collector/fetch_jobs.py --days 7 --include-restricted

What it does

  1. Fetches. Reads the newest worldwide jobs from Himalayas, page by page, until the postings are older than --days. With --himalayas-country, it then reads, the same way, the jobs restricted to a list of countries that includes that country, once per country. Each is counted as a separate source, such as himalayas:Taiwan, but keeps the Himalayas credit. The output numbers them, himalayas country query 1, and never prints the country, because in the daily run it comes from testers' profiles. If HIMALAYAS_API_KEY is set, it's sent as an Authorization header. Reads the newest Jobicy jobs in one request, and the whole Remote OK feed in one request. Remote OK's feed starts with a legal notice, which is skipped.
  2. Normalizes. Turns each posting into the same shape, whatever its source. Descriptions become plain text and dates become UTC.
  3. Labels the location. Combines the source's location field with the description. See How locations are labelled. It also tags AI-training gigs (is_ai_training) by company and title words, from collector/ai_training.py (ADR 0009).
  4. Filters. Drops jobs that are older than --days, already expired, or not worldwide (unless you use --include-restricted).
  5. Removes duplicates. Treats two postings with the same company and title as one job and keeps the newest.
  6. Saves the jobs, newest first, with a summary and the source credits.

If one source fails, the collector still saves the jobs from the others and marks the failed source as "failed" in the file. If every source fails, it saves nothing and exits with an error.

How locations are labelled

Every job gets four location fields (ADR 0003):

Field What it holds
location_scope worldwide, restricted, or unclear
allowed_locations Countries and regions, such as ["EMEA", "APAC"], when the scope is restricted
timezone_requirement The sentence that asks for certain working hours, or null
location_evidence Where the label comes from, with the exact sentence or source field in quotes

First, the source field gives a starting label:

  • Himalayas: no country limits means worldwide. A list of countries means restricted.
  • Jobicy: Anywhere means worldwide. Other places mean restricted. An empty field means unclear.
  • Remote OK: a location that says nothing but Worldwide, Anywhere, or Remote means worldwide. A place means restricted. An empty field means unclear.

Source fields follow the same place rules as the description. Remote and similar words are never places: Remote, Japan is restricted to Japan. A place the table doesn't know, such as San Francisco, CA, makes the job unclear, wherever it appears. A city followed by its country means the city: Taipei, Taiwan is restricted to Taipei.

A timezone note in a source field is taken out first, in brackets or as its own comma-separated part: Worldwide (US timezones) and Anywhere (UTC) are worldwide, Americas (EST) is restricted to the Americas, and (CET +/- 3) alone gives no place, so it's unclear. Each note becomes the timezone requirement.

Then the labeller reads every sentence of the description, not just the first one that matches.

Safety principle. When a sentence talks about where you can work, but the rules can't read it with confidence, the job is unclear, with that sentence as evidence. The rules never guess that a job passes. A sentence is uncertain when it has:

  • a negation: We cannot hire in Germany, not open to candidates in California. Sentences about visa sponsorship don't count.
  • an exception: anywhere except the US, worldwide, excluding India, outside of the EU
  • a preference: Candidates in the EU are preferred, We prefer Europe but are open to anywhere
  • a rule with no place: countries where we have an entity, our supported countries

The same applies to an exception in a source field, such as Worldwide except US.

Places that aren't about where you live are ignored: a place after words like customers, clients, team, offices, experience, or knowledge (our customers in Europe), and a place before words like time zones, hours, data, regulations, GAAP, company, or a language (EU-only data regulations, US time zones). Languages after a location phrase (work in English) aren't places either.

The labeller then decides:

  1. Any uncertain sentence makes the job unclear.
  2. A sentence that limits where you must live or work makes the job restricted to the places it names. It may narrow the source's places, but never widen them: a source of Germany with Candidates based in Europe are welcome is a conflict, so the job is unclear, with both as evidence. Examples:
    • Candidates must reside in the United States, you're based in the EU
    • eligible to work in Germany, must be a citizen of Canada
    • US only, Hungary, Japan only, US citizens only, US-based candidates
    • remote within the US, anywhere in LATAM
    • one of the following countries: US, Canada, UK
  3. Such a sentence naming a place that collector/places.py doesn't know, such as a city or a US state, makes the job unclear.
  4. Two restriction sentences naming different places, or a restriction and a work from anywhere sentence, make the job unclear, with both as evidence.
  5. A source that names countries while the description says work from anywhere makes the job unclear, with both as evidence.
  6. A source with no location and a work from anywhere sentence make the job worldwide.
  7. Last, the title. A title that names a place, such as Project Manager - India (Gift City) or EMEA Support Specialist, makes a worldwide job unclear, and a restricted job too, unless its places include the title's. The evidence quotes the title. Languages and customers aren't places here either: Japanese Support Specialist and Customer Success, US Customers stay as they are.

Only restricted jobs keep places in allowed_locations. An unclear job's list is always empty, even when the source named places, so later code can't treat unconfirmed places as true. The evidence still quotes them.

The first sentence that asks for working hours in a timezone, such as At least 4 hours overlap with CET or UTC-5 to UTC+1, becomes timezone_requirement. It never changes the scope.

Known country and region names, with the countries each region covers, are in collector/places.py. Sub-regions follow the United Nations geoscheme, so Southeast Asia covers Singapore and Vietnam but not Japan, and Western Europe covers Germany and France but not Hungary.

  • Cities. Major cities are known, including Budapest, Tokyo, Osaka, and Taipei. A city is its own, narrower place: a job open only in Budapest doesn't count as open in Hungary.
  • Greater China means mainland China, Hong Kong, and Taiwan, as job postings use it in business. It counts for Taiwan, never for Japan.
  • Names inside longer names. A compass word or New in front of a known name makes a different place: North Korea, New Mexico, and Northeast Asia are unknown, not South Korea, Mexico, or Asia.
  • America on its own isn't read as a place, because postings use it for the United States, for the Americas, and in company names.
  • Middle East and MENA don't include Kenya, Nigeria, or South Africa. EMEA does.

To teach the labeller a new place, add it there and add a test.

The output file

{
  "fetched_at": "2026-12-03T19:30:00+00:00",
  "since": "2026-12-01T19:30:00+00:00",
  "include_restricted": false,
  "sources": {"himalayas": 60, "jobicy": 100, "remoteok": 98},
  "credits": {
    "himalayas": {"name": "Himalayas", "url": "https://himalayas.app"},
    "jobicy": {"name": "Jobicy", "url": "https://jobicy.com"},
    "remoteok": {"name": "Remote OK", "url": "https://remoteok.com"}
  },
  "job_count": 47,
  "jobs": [
    {
      "id": "himalayas:https://himalayas.app/companies/example/jobs/kb-specialist",
      "source": "himalayas",
      "title": "Knowledge Base Specialist",
      "company": "Example Co",
      "apply_url": "https://himalayas.app/companies/example/jobs/kb-specialist",
      "posted_at": "2026-12-02T12:00:00+00:00",
      "expires_at": "2027-01-02T12:00:00+00:00",
      "location_scope": "worldwide",
      "allowed_locations": [],
      "timezone_requirement": null,
      "location_evidence": "Himalayas lists no location restrictions",
      "is_ai_training": false,
      "salary_min": 40000,
      "salary_max": 55000,
      "salary_currency": "USD",
      "salary_period": "annual",
      "categories": ["Customer Support"],
      "description": "Own our help center..."
    }
  ]
}

Always use apply_url for "Apply" buttons and show the matching entry from credits next to each job. Every source's terms require this. For Remote OK, apply_url is the job's page on Remote OK, and the link must not be marked nofollow.

Run the tests

The tests use sample postings shaped like real API responses, so they run without internet access:

python3 -m unittest discover tests

The tests also run automatically on every pull request.

Known limits

  • Remote OK salaries are assumed to be in USD a year.
  • Location rules only recognize the phrasings and places they know. Unusual wording can be labelled wrongly. Each wrong label found should become a test in tests/test_location_label.py.
  • The safety principle makes some readable jobs unclear. For example, US-based candidates preferred is unclear, even if the rest of the posting says the job is US-only. These jobs can't be picks, but they may take a place in Worth checking.
  • Only major cities are in the place table, and no states or provinces. A restriction naming one that isn't there, such as Pécs or California, makes the job unclear.
  • A job open only in a city can never be a pick, because a city doesn't cover a whole country in can_work_from.
  • Greater China is a choice: some postings may mean mainland China and Hong Kong only. A job open to Greater China counts for Taiwan.
  • America on its own is never read as the United States, so US-only wording that says only America makes the job unclear or is missed.
  • A list that names a region and then examples, such as LATAM, including Colombia and Mexico, keeps only the region.
  • Sub-regions follow the United Nations geoscheme. An employer may mean something wider by Western Europe, such as including the UK and Spain.
  • Only the first timezone sentence is kept.
  • The Himalayas country query reads jobs that list one country. That finds every job open in all can_work_from countries only if the country is one of them. A test checks the daily workflow's country against the profile.
  • Himalayas doesn't document its search page size or say in words that a country query matches every job listing that country. The run summary's country row shows whether it does.
  • Jobicy calls the endpoint used here a legacy endpoint and recommends its newer unified API. Moving to it is planned.
  • Duplicate detection only matches identical company and title wording.