side project
Job radar: my saved LinkedIn searches, turned into real job posts
A Python script that reads my saved searches, pulls the concrete job posts out of each one, drops the ones that don't fit and leaves me an Excel file with direct links to review.
The problem
While looking for a backend Python role I kept a list of saved searches: Python remote anywhere in Spain, on-site in Valladolid, hybrid in Madrid, in Castilla y León… Each one was a link to /jobs/search/?keywords=….
Those links open a listing, not a job post, and the listing changes every day. There was no way to note "already checked this one" or to compare posts across searches. What I wanted was a table with one row per job post, its direct link, and none of the posts that were no use to me.
What it does
- Reads a CSV with my searches (criteria, work type, location and link).
- For each search, requests the job cards from LinkedIn's public guest endpoint, the same one the site uses when you're not logged in.
- Takes the job ID from each card and builds its canonical link:
linkedin.com/jobs/view/<id>/. - Filters by country, by technology and by the language of the description.
- Saves the result as CSV and as an Excel file with clickable links.
Technical decisions
Location as text didn't work: geoId
The first version passed the location as text, and job posts from the United States started showing up. The endpoint ignores that parameter and picks the area from the IP. What it does respect is LinkedIn's internal geoId, so each search is mapped to its geographic ID, with Spain as the default.
# The endpoint ignores "location" and answers based on the IP.
# With geoId the posts really are from Spain or the region.
GEO_IDS = {
"españa": "105646813",
"madrid": "100994331",
"valladolid": "105147105",
"castilla y león": "104802667",
}
Cheapest filter first
Every request to LinkedIn costs time and raises the risk of being rate-limited, so the filters run in order of cost. Country comes first, using the location the card already carries, with no extra request. Only if a post passes is its detail downloaded, and that is what the technology and language checks use.
def evaluate_offer(session, job_id, title, card_loc, keyword, search_loc):
# 1. Country, from the card's location: zero extra requests
if not is_spain_location(card_loc, search_loc):
return False, f"fuera de España ({card_loc})", card_loc
# Only now is the job detail downloaded
detail = fetch_job_detail(session, job_id)
time.sleep(2.5)
# 2. Does it mention python, django, fastapi or flask?
# 3. Is the description in Spanish?
...
Country is decided with an allowlist. Locations that mention another country or a foreign city are dropped first; a post is then kept only if it names Spain, a Spanish province, region or a known town. A post with no location is dropped, because I can't be sure it's from here.
Detecting the language without another dependency
Many posts published in Spain are written in English and ask for native English. I didn't want to add a language-detection library for such a simple decision, so I use a heuristic. If characters only Spanish has appear, the post stays. Otherwise I count very common words in each language and only drop it if English clearly dominates. When in doubt, it stays: I'd rather review one too many than miss a good one.
# simplified
def looks_spanish(text):
if any(ch in "áéíóúñ¿¡ü" for ch in text):
return True
words = re.findall(r"[a-záéíóúñ]+", text)
es = sum(w in ES_STOPWORDS for w in words)
en = sum(w in EN_STOPWORDS for w in words)
return not (en >= 5 and en > es * 1.3)
One card, one job post
The endpoint returns HTML. If you look for titles, companies and locations across the whole document at once, it's easy to pair one post's title with the next post's company. The script splits the HTML at each <li> and extracts the fields inside that chunk, so they always belong to the same post. Posts are de-duplicated by ID, across searches too: a Python job in Madrid usually shows up in several.
Without hammering anyone
There's a 2.5-second pause between pages, and descriptions already downloaded are kept in memory so they're never requested twice. If LinkedIn answers 429 (too many requests), the script waits longer each time and, after three unsuccessful waits, skips that search instead of insisting.
if resp.status_code == 429:
retries += 1
if retries > 3:
break # skip this search
time.sleep(10 * retries) # 10, 20 and 30 seconds
continue
Built for real use
Results are saved after every search, so nothing collected is lost if a run is interrupted. And there's a detail that came from using it: if the previous Excel file was still open, Windows won't let you overwrite it. Instead of failing, the script saves a copy with the date and time in its name.
try:
wb.save(OUT_XLSX)
except PermissionError: # the previous Excel file is still open
wb.save(OUT_XLSX.with_name(f"{OUT_XLSX.stem}_{stamp}.xlsx"))
The Excel file has a frozen header, columns sized for reading and clickable links, because that's where I actually review the posts.
Result of a real run
Figures from the log of a run in July 2026:
- searches
- 17
- results read
- 142
- posts kept
- 74
The 142 results include posts repeated across searches. After de-duplicating and filtering, 74 concrete posts were left: Python, in Spain and described in Spanish. For example, for "Python, on-site in Valladolid" LinkedIn returned 10 results and only one passed the filters, which is exactly the noise I wanted to get rid of.
Limits and what I'd do differently
- It depends on an undocumented endpoint. If LinkedIn changes its HTML or starts requiring a session, the script stops working. It's a low-volume tool for personal use, not a service.
- The HTML is parsed with regular expressions. For anything more serious I'd use an HTML parser and tests against saved responses, to spot format changes straight away.
- The language heuristic is deliberately simple. It works for this case, but mixed-language text can fool it.
- Next step: run it on a schedule and flag the posts that are new since the previous run.
This project sums up how I work: understand the real problem before writing code, choose the simplest solution that works and make it ready for everyday failures.