Skip to content

0008 Read restricted Himalayas jobs with one country query

  • Status: Proposed
  • Date: 2026-12-05

Context

The collector asks Himalayas only for worldwide jobs (worldwide=true). A job open to, say, Europe and Asia-Pacific never reaches the ranker, even when it covers every country in the profile's can_work_from list: Hungary, Japan, and Taiwan (ADR 0003).

What the Himalayas API documentation says, read on 2026-12-05:

  • The search endpoint, https://himalayas.app/jobs/api/search, has a country filter. It takes one country per request: the documentation says country=BR,AR returns 400.
  • With a country filter, worldwide jobs are included unless exclude_worldwide=true is set.
  • There's no region filter. A job's locationRestrictions is a list of full country names, so a job open to Asia-Pacific lists each country by name. An empty list means worldwide.
  • Without an API key, every caller shares one public request allowance, with no number given. A free key allows 60 requests a minute and 10,000 a day.
  • Search results are cached for about an hour. The terms ask API users to cache job data where they can and to stay within their request limits. They set no fixed number of reads a day. WFHeaven's own rule is to read Himalayas in one run a day (Job sources).
  • The page size of the search endpoint isn't documented. The collector reads pages until one is empty, too old, or the page limit is reached.

Checked against real data on 2026-12-05

Four search requests, at 08:31 UTC, with exclude_worldwide=true and sort=recent: country=Taiwan, country=TW, country=taiwan, and country=Japan. The data dictionary has no list of country values, so only real responses could answer these questions.

  • Taiwan is its own country. Taiwan, the ISO code TW, and the slug taiwan returned the same jobs. locationRestrictions uses Taiwan, China, and Hong Kong as three separate names. Taiwan isn't folded into China.
  • The country filter matches locationRestrictions. All 20 jobs on the first country=Taiwan page list Taiwan, and none is worldwide.
  • Jobs open across Asia-Pacific list Taiwan. On the first country=Japan page, 9 jobs listed four or more Asian countries. 8 of them list Taiwan. The ninth lists 76 countries chosen by the employer, without Taiwan or Hungary, so it couldn't pass anyway.
  • The Taiwan query finds what a Japan query finds. 5 jobs on the Japan page list Hungary, Japan, and Taiwan. All 5 are on the first Taiwan page too.
  • No region names. No APAC, Asia, or EMEA appears in locationRestrictions. Regions are always spelled out as countries, which is what the labeller expects.
  • Volume. country=Taiwan has about 1,550 restricted jobs in total, and country=Japan about 1,960, so Taiwan is the smaller one, as expected. The first Taiwan page covers 34 hours: about 14 new jobs a day, or 2 to 3 pages for the collector's two-day window. That's well under the 10-page limit.
  • Sort order. sort=recent is mostly, not strictly, newest first: jobs a few hours apart can swap, and one 25-day-old job led the Japan page. The collector stops only at a page with no recent job at all, so a stray old job doesn't stop it early.

These requests and the daily run made two Himalayas reads that day, one more than WFHeaven's own rule. The maintainer asked for this check. The API terms set no daily limit.

The key fact: a job open in all three countries must list Taiwan, and also Hungary and Japan. A query for any one of them finds every job that could pass. The location labeller and the ranker already check the rest of the list.

Options considered

Requests are counted per daily run. The worldwide query that exists today reads up to 10 pages; the first live run read 6.

Option Extra requests a day Finds EMEA+APAC-type jobs Terms
A. Keep the worldwide query only 0 No Within the terms
B. One query per can_work_from country, keep the jobs that appear in all three 3 queries, each up to 10 pages: about 3 to 30 Yes Within the terms, but triple the requests of option C for the same jobs
C. One query for one can_work_from country, with exclude_worldwide=true, and check the rest locally 1 query, up to 10 pages: about 2 to 3 for Taiwan on real data Yes, the same jobs as option B Within the terms: one more query in the same daily run
D. A query without worldwide or country, filtered locally 1 query, but it returns every Himalayas job, most limited to the US. A two-day window needs far more than 10 pages. Only if every page is read Many requests on the shared allowance, against the terms' request to stay within request limits

Decision

Option C. The daily run adds one country query, for Taiwan, with exclude_worldwide=true, so the worldwide jobs the first query already has aren't read twice. It uses the same page limit (--himalayas-pages, 10) and stops at the first page whose jobs are all older than the collection window.

  • Why Taiwan: any of the three countries finds the same jobs, so the choice only changes how many pages are read. Taiwan is the smallest job market of the three. Real data confirmed it has fewer restricted jobs than Japan. Hungary wasn't checked, to keep the check to four requests.
  • Where: the collector gets a --himalayas-country option. The daily workflow passes --himalayas-country Taiwan. A test checks that the country is in the profile's can_work_from list, so the two can't drift apart.
  • The rest stays the same: the jobs go through the same location labels and the same ranker. A job whose locationRestrictions lists Taiwan but not Hungary or Japan is labelled restricted and excluded as location not open to you.
  • Counted separately: the run summary shows the country query as its own row, Himalayas (restricted, incl. Taiwan). A day with no such jobs isn't a fault, so only a failed query fails the run. Its jobs keep the Himalayas credit and applicationLink.

Consequences

  • At most 10 more requests a day, in the same daily run, with a 1-second pause between pages. Still one run a day, and still no API key.
  • Jobs open in all three countries can reach the ranker for the first time. On the first live run, all 74 kept jobs were worldwide.
  • The documentation doesn't say in words that country=Taiwan matches every job whose locationRestrictions lists Taiwan. Real data on 2026-12-05 showed it does. The summary's new row keeps showing it every day.
  • Risk: Himalayas changes how it names Taiwan, for example folds it into China. Then the Taiwan query would miss jobs, and the summary's row would drop toward 0. Fallback: change --himalayas-country in collect.yml to Japan, the next smallest of the three. Any can_work_from country finds the same jobs; it only reads more pages. The workflow test accepts any country in can_work_from.
  • Risk: more than 10 pages of new jobs in the two-day window, about 100 a day. Then the oldest are cut off. The summary shows the row at 200, the limit. Raise --himalayas-pages or use an API key.
  • If the profile's countries change, the workflow's country must be one of the new ones. The test fails until it is.
  • For many users in Milestone 2, one query per country that appears in some profile would be needed, which grows with the number of countries, not users. Built in Phase 2 of the demo: every tester gets at least one query, up to 10 a day (ADR 0013). The maintainer's countries are all queried, so the Taiwan query stays. The workflow test now checks that the run passes every chosen country, and the summary numbers the queries instead of naming them.
  • If the shared allowance becomes a problem (429 answers), a free API key allows 10,000 requests a day. Phase 2 uses one, HIMALAYAS_API_KEY, sent as an Authorization header.

Open questions

  • Himalayas has an ai_training=hide filter. Could it replace some of the exclude_companies entries that remove AI-training gigs today? Answered in ADR 0009: it's used only for profiles set to hide.