DEV Community

Techforce Global
Techforce Global

Posted on

Build a LinkedIn Candidate Shortlist in Python Without a LinkedIn Cookie

If you've ever been asked to "just pull a list of senior Java devs in Pune" for the hiring team, this post is for you. We'll build a candidate shortlist from public LinkedIn profiles in about 15 lines of Python, with no LinkedIn account, no cookie and no li_at token.

We'll use LinkedIn Candidate Search (No Cookies), an Apify Actor we built at Techforce Global. It composes the X-ray search query for you, runs it through Brave Search and returns structured results.

1. Install the client

pip install apify-client
export APIFY_TOKEN=your_token_here
Enter fullscreen mode Exit fullscreen mode

2. Describe the role and run it

import os
from apify_client import ApifyClient

client = ApifyClient(os.getenv("APIFY_TOKEN"))

run = client.actor("techforce.global/linkedin-candidate-search").call(run_input={
    "job_role": "Java Developer",
    "seniority": "Senior",
    "technologies": ["Spring Boot", "Kafka"],
    "exclude_keywords": ["recruiter", "intern"],
    "location": ["Pune", "Mumbai"],
    "max_profiles": 20,
    "deliveryMode": "none",
})

items = client.dataset(run["defaultDatasetId"]).list_items().items
print(f"{len(items)} candidates")
Enter fullscreen mode Exit fullscreen mode

3. Read the results

Each item has four fields:

{
  "name": "Aditi Ranganathan",
  "title": "Senior Java Developer at FinServe Systems",
  "profile_url": "https://in.linkedin.com/in/aditi-ranganathan-1a2b3c",
  "snippet": "Senior Java Developer with 8 years building Spring Boot microservices..."
}
Enter fullscreen mode Exit fullscreen mode

The snippet is your best relevance signal, so filter on it:

strong = [c for c in items if "kafka" in (c["snippet"] or "").lower()]
for c in strong:
    print(c["name"], "|", c["title"], "|", c["profile_url"])
Enter fullscreen mode Exit fullscreen mode

Gotchas worth knowing

  • Always set a search signal. Set at least one of job_role, technologies or keywords. With none, the Actor falls back to a default query and you get unrelated results.
  • Max 50 per run (5 on free plans). For more, loop by city or seniority.
  • The query is capped at 450 characters. Very long tech lists get cut. Keep briefs tight.
  • Dedupe on profile_url across runs.
  • No emails or phone numbers. It's search-result depth by design.

Bonus: call it from an AI agent

It's a native MCP tool, so you can add it to Claude Code:

claude mcp add --transport http apify "https://mcp.apify.com?tools=techforce.global/linkedin-candidate-search"
Enter fullscreen mode Exit fullscreen mode

Then just ask: "Find 20 senior React developers in Bangalore, no recruiters."

Full input reference, JavaScript and cURL examples: LinkedIn Candidate Search (No Cookies) - Talent Sourcing API

Top comments (0)