curl --request GET \
--url https://api.harvestapi.io/linkedin/job-search \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.harvestapi.io/linkedin/job-search"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.harvestapi.io/linkedin/job-search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.harvestapi.io/linkedin/job-search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.harvestapi.io/linkedin/job-search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.harvestapi.io/linkedin/job-search")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.harvestapi.io/linkedin/job-search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"elements": [
{
"id": "<string>",
"url": "<string>",
"title": "<string>",
"postedDate": "2023-11-07T05:31:56Z",
"company": {
"name": "<string>",
"universalName": "<string>",
"linkedinUrl": "<string>"
},
"location": {
"linkedinText": "<string>"
},
"easyApply": true
}
],
"pagination": {
"totalPages": 123,
"totalElements": 123,
"pageNumber": 123,
"previousElements": 123,
"pageSize": 123,
"paginationToken": "<string>"
},
"status": 123,
"error": "<string>",
"query": {
"title": "<string>",
"companyId": "<string>",
"location": "<string>",
"geoId": "<string>",
"sortBy": "<string>",
"workplaceType": "<string>",
"postedLimit": "<string>",
"page": 123
}
}{
"error": 123,
"message": "<string>"
}Search Jobs
Search LinkedIn jobs by title, company, location, and more.
curl --request GET \
--url https://api.harvestapi.io/linkedin/job-search \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.harvestapi.io/linkedin/job-search"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.harvestapi.io/linkedin/job-search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.harvestapi.io/linkedin/job-search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.harvestapi.io/linkedin/job-search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.harvestapi.io/linkedin/job-search")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.harvestapi.io/linkedin/job-search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"elements": [
{
"id": "<string>",
"url": "<string>",
"title": "<string>",
"postedDate": "2023-11-07T05:31:56Z",
"company": {
"name": "<string>",
"universalName": "<string>",
"linkedinUrl": "<string>"
},
"location": {
"linkedinText": "<string>"
},
"easyApply": true
}
],
"pagination": {
"totalPages": 123,
"totalElements": 123,
"pageNumber": 123,
"previousElements": 123,
"pageSize": 123,
"paginationToken": "<string>"
},
"status": 123,
"error": "<string>",
"query": {
"title": "<string>",
"companyId": "<string>",
"location": "<string>",
"geoId": "<string>",
"sortBy": "<string>",
"workplaceType": "<string>",
"postedLimit": "<string>",
"page": 123
}
}{
"error": 123,
"message": "<string>"
}const params = new URLSearchParams({
search: 'Software Engineer',
companyId: '1441', // Google
location: 'US',
sortBy: 'date',
workplaceType: 'hybrid,remote',
employmentType: 'full-time',
postedLimit: 'month',
page: '1',
salary: '100k+',
});
fetch(`https://api.harvestapi.io/linkedin/job-search?${params.toString()}`, {
headers: { 'X-API-Key': '<api-key>' },
})
.then((response) => response.json())
.then((data) => console.log(data));
curl --request GET \
--url https://api.harvestapi.io/linkedin/job-search?search=Software%20Engineer&companyId=1441&location=US&sortBy=date&workplaceType=hybrid&postedLimit=month&page=1 \
--header 'X-API-Key: <api-key>'
import requests
url = "https://api.harvestapi.io/linkedin/job-search?search=Software%20Engineer&companyId=1441&location=US&sortBy=date&workplaceType=hybrid&postedLimit=month&page=1"
headers = {"X-API-Key": "<api-key>"}
response = requests.request("GET", url, headers=headers)
print(response.text)
How to get Company ID
By company URL or ID
const params = new URLSearchParams({
query: 'https://www.linkedin.com/company/google',
// query: 'google', // 'google' is also accepted as a company ID (last part of the URL)
apiKey: '<api-key>',
});
fetch(`https://api.harvestapi.io/linkedin/company?${params.toString()}`)
.then((res) => res.json())
.then((data) => {
const company = data.element;
console.log(`LinkedIn ID for Google: ${company?.id}`);
});
curl --request GET \
--url https://api.harvestapi.io/linkedin/company?query=google \
--header 'X-API-Key: <api-key>'
import requests
url = "https://api.harvestapi.io/linkedin/company?query=google"
headers = {"X-API-Key": "<api-key>"}
response = requests.request("GET", url, headers=headers)
print("LinkedIn ID for Google: " + response.json()["element"]["id"])
By searching for a company name
const params = new URLSearchParams({
search: 'Google',
apiKey: '<api-key>',
});
fetch(`https://api.harvestapi.io/linkedin/company-search?${params.toString()}`)
.then((res) => res.json())
.then((data) => {
const companies = data.elements;
const firstMatchId = companies[0].id;
console.log(`LinkedIn ID for Google: ${firstMatchId}`);
});
curl --request GET \
--url https://api.harvestapi.io/linkedin/company-search?search=Google \
--header 'X-API-Key: <api-key>'
import requests
url = "https://api.harvestapi.io/linkedin/company-search?search=Google"
headers = {"X-API-Key": "<api-key>"}
response = requests.request("GET", url, headers=headers)
print("LinkedIn ID for Google: " + response.json()["elements"][0]["id"])
Search by LinkedIn GeoID
For most of the cases, when specifying full location name, the search by thelocation parameter works fine.However sometimes search by location may not give you what you expect, as LinkedIn have some other suggested location for your text query. For example,
NY returns New Zealand instead of New York; UK returns Ukraine instead of United Kingdom.
The location search is based on LinkedIn autocomplete feature, you can try it on the website first.
The scraper will use the first suggestion from the autocomplete popup when you type your location.
The same autocomplete is available via our API. You can look up a location and get LinkedIn GeoID to use for the API endpoint.
const apiKey = '<api-key>';
fetch(`https://api.harvestapi.io/linkedin/geo-id-search?search=New York`, {
headers: { 'X-API-Key': apiKey },
})
.then((response) => response.json())
.then((data) => {
console.log('All matches:', data.elements);
console.log('Closest match GeoID:', data.entityId);
// Search for profiles in New York
const params = new URLSearchParams({
geoId: data.entityId,
apiKey,
});
fetch(`https://api.harvestapi.io/linkedin/profile-search?${params.toString()}`)
.then((response) => response.json())
.then((data) => console.log(data));
});
curl --request GET \
--url https://api.harvestapi.io/linkedin/geo-id-search?search=New%20York \
--header 'X-API-Key: <api-key>'
import requests
url = "https://api.harvestapi.io/linkedin/geo-id-search?search=New York"
headers = {"X-API-Key": "<api-key>"}
response = requests.request("GET", url, headers=headers)
data = response.json()
print("All matches:", data["elements"])
print("Closest match GeoID:", data["id"])
Query Parameters
Filter by industry ID. One value or multiple comma-separated industry IDs. Full list of IDs: https://github.com/HarvestAPI/linkedin-industry-codes-v2/blob/main/linkedin_industry_code_v2_all_eng.csv
Filter by job function. One or multiple values comma-separated. Supported values: 'acct' (Accounting / Auditing), 'adm' (Administrative), 'advr' (Advertising), 'anls' (Analyst), 'art' (Art / Creative), 'bd' (Business Development), 'cnsl' (Consulting), 'cust' (Customer Service), 'dist' (Distribution), 'dsgn' (Design), 'edu' (Education), 'eng' (Engineering), 'fin' (Finance), 'genb' (General Business), 'hcpr' (Healthcare Provider), 'hr' (Human Resources), 'it' (Information Technology), 'lgl' (Legal), 'mgmt' (Management), 'mnfc' (Manufacturing), 'mrkt' (Marketing), 'othr' (Other), 'pr' (Public Relations), 'prch' (Purchasing), 'prdm' (Product Management), 'prjm' (Project Management), 'prod' (Production), 'qa' (Quality Assurance), 'rsch' (Research), 'sale' (Sales), 'sci' (Science), 'stra' (Strategy / Planning), 'supl' (Supply Chain), 'trng' (Training), 'wrt' (Writing / Editing)

