Scrape LinkedIn job listings
Extract job titles, company names, locations, and posting dates from LinkedIn's public job search results.
- A Browserless API token from your account dashboard
Steps
LinkedIn's public job board (linkedin.com/jobs/search) renders with JavaScript and has aggressive bot detection. A standard headless browser gets blocked or served a login wall. The examples below search for "software engineer" jobs and route through stealth mode with a residential proxy.
LinkedIn updates its markup frequently. If .base-card or related selectors stop returning results, inspect the live page with browser DevTools to find the current class names.
- AI Agent
- REST API
- Frameworks
- BQL
Use the Browserless MCP server to scrape job listings from LinkedIn from any MCP-compatible AI agent (Claude Desktop, Cursor, Windsurf, ChatGPT, etc.).
1. Connect the MCP server
Send this prompt to your AI agent to install the Browserless MCP server:
Go to https://github.com/browserless/browserless-mcp/blob/main/install.md
and follow the instructions to install the Browserless MCP server
for my client.
2. Scrape LinkedIn jobs
Use browserless_smartscraper. It handles LinkedIn's dynamic content and bot protection automatically.
Use the browserless_smartscraper tool to scrape job listings
from https://www.linkedin.com/jobs/search/?keywords=software+engineer&location=United+States
and return the results as markdown
Send the BQL mutation over HTTP to the stealth endpoint. No browser library or BQL IDE required.
- cURL
- JavaScript
- Python
- Java
- C#
1. Send the request
curl -X POST \
"https://production-sfo.browserless.io/stealth/bql?token=YOUR_API_TOKEN_HERE&proxy=residential&proxyCountry=us" \
-H "Content-Type: application/json" \
-d '{
"query": "mutation ScrapeLinkedInJobs { goto(url: \"https://www.linkedin.com/jobs/search/?keywords=software+engineer&location=United+States\", waitUntil: networkIdle) { status } waitForSelector(selector: \".base-card\", timeout: 15000) { time } jobs: mapSelector(selector: \".base-card\") { title: mapSelector(selector: \".base-search-card__title\") { innerText } company: mapSelector(selector: \".base-search-card__subtitle a\") { innerText } location: mapSelector(selector: \".job-search-card__location\") { innerText } posted: mapSelector(selector: \"time\") { innerText } link: mapSelector(selector: \"a.base-card__full-link\") { href: attribute(name: \"href\") { value } } } }",
"variables": {}
}'
2. Check the output
{
"data": {
"goto": { "status": 200 },
"waitForSelector": { "time": 3876 },
"jobs": [
{
"title": [{ "innerText": "Senior Software Engineer" }],
"company": [{ "innerText": "Google" }],
"location": [{ "innerText": "Mountain View, CA" }],
"posted": [{ "innerText": "2 days ago" }],
"link": [{ "href": { "value": "https://www.linkedin.com/jobs/view/1234567890" } }]
},
{
"title": [{ "innerText": "Software Engineer II" }],
"company": [{ "innerText": "Microsoft" }],
"location": [{ "innerText": "Redmond, WA" }],
"posted": [{ "innerText": "1 week ago" }],
"link": [{ "href": { "value": "https://www.linkedin.com/jobs/view/9876543210" } }]
}
]
}
}
1. Send the request
const query = `mutation ScrapeLinkedInJobs {
goto(url: "https://www.linkedin.com/jobs/search/?keywords=software+engineer&location=United+States", waitUntil: networkIdle) {
status
}
waitForSelector(selector: ".base-card", timeout: 15000) {
time
}
jobs: mapSelector(selector: ".base-card") {
title: mapSelector(selector: ".base-search-card__title") { innerText }
company: mapSelector(selector: ".base-search-card__subtitle a") { innerText }
location: mapSelector(selector: ".job-search-card__location") { innerText }
posted: mapSelector(selector: "time") { innerText }
link: mapSelector(selector: "a.base-card__full-link") {
href: attribute(name: "href") { value }
}
}
}`;
const response = await fetch(
'https://production-sfo.browserless.io/stealth/bql?token=YOUR_API_TOKEN_HERE&proxy=residential&proxyCountry=us',
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ query, variables: {} }),
}
);
const { data } = await response.json();
console.log(JSON.stringify(data.jobs, null, 2));
2. Check the output
[
{
"title": [{ "innerText": "Senior Software Engineer" }],
"company": [{ "innerText": "Google" }],
"location": [{ "innerText": "Mountain View, CA" }],
"posted": [{ "innerText": "2 days ago" }],
"link": [{ "href": { "value": "https://www.linkedin.com/jobs/view/1234567890" } }]
},
{
"title": [{ "innerText": "Full Stack Developer" }],
"company": [{ "innerText": "Microsoft" }],
"location": [{ "innerText": "Redmond, WA" }],
"posted": [{ "innerText": "5 days ago" }],
"link": [{ "href": { "value": "https://www.linkedin.com/jobs/view/9876543210" } }]
}
]
1. Install dependencies
pip install requests
2. Send the request
import requests
query = """
mutation ScrapeLinkedInJobs {
goto(url: "https://www.linkedin.com/jobs/search/?keywords=software+engineer&location=United+States", waitUntil: networkIdle) {
status
}
waitForSelector(selector: ".base-card", timeout: 15000) {
time
}
jobs: mapSelector(selector: ".base-card") {
title: mapSelector(selector: ".base-search-card__title") { innerText }
company: mapSelector(selector: ".base-search-card__subtitle a") { innerText }
location: mapSelector(selector: ".job-search-card__location") { innerText }
posted: mapSelector(selector: "time") { innerText }
link: mapSelector(selector: "a.base-card__full-link") {
href: attribute(name: "href") { value }
}
}
}
"""
response = requests.post(
'https://production-sfo.browserless.io/stealth/bql',
params={
'token': 'YOUR_API_TOKEN_HERE',
'proxy': 'residential',
'proxyCountry': 'us',
},
json={'query': query, 'variables': {}},
)
data = response.json()['data']
for job in data['jobs']:
title = job['title'][0]['innerText']
company = job['company'][0]['innerText']
location = job['location'][0]['innerText']
print(f'{title} at {company} ({location})')
3. Check the output
Senior Software Engineer at Google (Mountain View, CA)
Full Stack Developer at Microsoft (Redmond, WA)
1. Send the request
import java.net.URI;
import java.net.http.*;
String token = "YOUR_API_TOKEN_HERE";
String endpoint = "https://production-sfo.browserless.io/stealth/bql?token=" + token
+ "&proxy=residential&proxyCountry=us";
String query = "mutation ScrapeLinkedInJobs {"
+ " goto(url: \\\"https://www.linkedin.com/jobs/search/?keywords=software+engineer&location=United+States\\\", waitUntil: networkIdle) { status }"
+ " waitForSelector(selector: \\\".base-card\\\", timeout: 15000) { time }"
+ " jobs: mapSelector(selector: \\\".base-card\\\") {"
+ " title: mapSelector(selector: \\\".base-search-card__title\\\") { innerText }"
+ " company: mapSelector(selector: \\\".base-search-card__subtitle a\\\") { innerText }"
+ " location: mapSelector(selector: \\\".job-search-card__location\\\") { innerText }"
+ " posted: mapSelector(selector: \\\"time\\\") { innerText }"
+ " }"
+ " }";
String payload = "{\"query\": \"" + query + "\", \"variables\": {}}";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(endpoint))
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(payload))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
2. Check the output
{
"data": {
"goto": { "status": 200 },
"waitForSelector": { "time": 3876 },
"jobs": [
{
"title": [{ "innerText": "Senior Software Engineer" }],
"company": [{ "innerText": "Google" }],
"location": [{ "innerText": "Mountain View, CA" }]
}
]
}
}
1. Send the request
using System.Net.Http;
using System.Text;
using System.Text.Json;
string token = "YOUR_API_TOKEN_HERE";
string endpoint = $"https://production-sfo.browserless.io/stealth/bql?token={token}&proxy=residential&proxyCountry=us";
var payload = new
{
query = @"mutation ScrapeLinkedInJobs {
goto(url: ""https://www.linkedin.com/jobs/search/?keywords=software+engineer&location=United+States"", waitUntil: networkIdle) { status }
waitForSelector(selector: "".base-card"", timeout: 15000) { time }
jobs: mapSelector(selector: "".base-card"") {
title: mapSelector(selector: "".base-search-card__title"") { innerText }
company: mapSelector(selector: "".base-search-card__subtitle a"") { innerText }
location: mapSelector(selector: "".job-search-card__location"") { innerText }
posted: mapSelector(selector: ""time"") { innerText }
link: mapSelector(selector: ""a.base-card__full-link"") {
href: attribute(name: ""href"") { value }
}
}
}",
variables = new { },
};
using (HttpClient httpClient = new HttpClient())
{
var content = new StringContent(
JsonSerializer.Serialize(payload), Encoding.UTF8, "application/json");
var response = await httpClient.PostAsync(endpoint, content);
string body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
2. Check the output
{
"data": {
"goto": { "status": 200 },
"waitForSelector": { "time": 3876 },
"jobs": [
{
"title": [{ "innerText": "Senior Software Engineer" }],
"company": [{ "innerText": "Google" }],
"location": [{ "innerText": "Mountain View, CA" }]
}
]
}
}
Connect through stealth mode and a residential proxy so LinkedIn sees traffic from a real browser, then extract job data from the rendered search results.
- Puppeteer
- Playwright
1. Install dependencies
npm install puppeteer-core
2. Connect and scrape
import puppeteer from 'puppeteer-core';
const browser = await puppeteer.connect({
browserWSEndpoint:
'wss://production-sfo.browserless.io/stealth?token=YOUR_API_TOKEN_HERE&proxy=residential&proxyCountry=us',
});
try {
const page = await browser.newPage();
await page.goto('https://www.linkedin.com/jobs/search/?keywords=software+engineer&location=United+States', {
waitUntil: 'networkidle2',
});
await page.waitForSelector('.base-card');
const jobs = await page.evaluate(() =>
Array.from(document.querySelectorAll('.base-card')).map((card) => ({
title: card.querySelector('.base-search-card__title')?.innerText?.trim() ?? '',
company: card.querySelector('.base-search-card__subtitle a')?.innerText?.trim() ?? '',
location: card.querySelector('.job-search-card__location')?.innerText?.trim() ?? '',
posted: card.querySelector('time')?.innerText?.trim() ?? '',
link: card.querySelector('a.base-card__full-link')?.href ?? '',
}))
);
console.log(JSON.stringify(jobs, null, 2));
} finally {
await browser.close();
}
3. Check the output
Run with node scrape-linkedin-jobs.mjs. Each object has title, company, location, posted, and link fields.
[
{
"title": "Senior Software Engineer",
"company": "Google",
"location": "Mountain View, CA",
"posted": "2 days ago",
"link": "https://www.linkedin.com/jobs/view/1234567890"
}
]
1. Install dependencies
npm install playwright-core
2. Connect and scrape
import { chromium } from 'playwright-core';
const browser = await chromium.connectOverCDP(
'wss://production-sfo.browserless.io?token=YOUR_API_TOKEN_HERE&stealth&proxy=residential&proxyCountry=us'
);
try {
const context = browser.contexts()[0];
const page = await context.newPage();
await page.goto('https://www.linkedin.com/jobs/search/?keywords=software+engineer&location=United+States', {
waitUntil: 'networkidle',
});
await page.waitForSelector('.base-card');
const jobs = await page.evaluate(() =>
Array.from(document.querySelectorAll('.base-card')).map((card) => ({
title: card.querySelector('.base-search-card__title')?.innerText?.trim() ?? '',
company: card.querySelector('.base-search-card__subtitle a')?.innerText?.trim() ?? '',
location: card.querySelector('.job-search-card__location')?.innerText?.trim() ?? '',
posted: card.querySelector('time')?.innerText?.trim() ?? '',
link: card.querySelector('a.base-card__full-link')?.href ?? '',
}))
);
console.log(JSON.stringify(jobs, null, 2));
} finally {
await browser.close();
}
3. Check the output
Run with node scrape-linkedin-jobs.mjs. Each object has title, company, location, posted, and link fields.
[
{
"title": "Senior Software Engineer",
"company": "Google",
"location": "Mountain View, CA",
"posted": "2 days ago",
"link": "https://www.linkedin.com/jobs/view/1234567890"
}
]
1. Write the mutation
Navigate to LinkedIn's public job search, wait for cards to render, then extract job details from each listing. We use /stealth/bql because LinkedIn's bot detection blocks standard headless browsers.
mutation ScrapeLinkedInJobs {
goto(url: "https://www.linkedin.com/jobs/search/?keywords=software+engineer&location=United+States", waitUntil: networkIdle) {
status
}
waitForSelector(selector: ".base-card", timeout: 15000) {
time
}
jobs: mapSelector(selector: ".base-card") {
title: mapSelector(selector: ".base-search-card__title") { innerText }
company: mapSelector(selector: ".base-search-card__subtitle a") { innerText }
location: mapSelector(selector: ".job-search-card__location") { innerText }
posted: mapSelector(selector: "time") { innerText }
link: mapSelector(selector: "a.base-card__full-link") {
href: attribute(name: "href") { value }
}
}
}
2. Run it
Paste into the BQL IDE and click Run.
3. Check the output
{
"data": {
"goto": { "status": 200 },
"waitForSelector": { "time": 3876 },
"jobs": [
{
"title": [{ "innerText": "Senior Software Engineer" }],
"company": [{ "innerText": "Google" }],
"location": [{ "innerText": "Mountain View, CA" }],
"posted": [{ "innerText": "2 days ago" }],
"link": [{ "href": { "value": "https://www.linkedin.com/jobs/view/1234567890" } }]
},
{
"title": [{ "innerText": "Software Engineer II" }],
"company": [{ "innerText": "Microsoft" }],
"location": [{ "innerText": "Redmond, WA" }],
"posted": [{ "innerText": "1 week ago" }],
"link": [{ "href": { "value": "https://www.linkedin.com/jobs/view/9876543210" } }]
}
]
}
}
Next steps
- Scrape Indeed Job Listings -- scrape another job board with similar techniques
- Scrape Glassdoor Job Listings -- stealth-mode scraping against aggressive bot detection
- Automate Google Search -- pull search results using the same
/stealth/bqlendpoint