curl --request GET \
--url https://api.harvestapi.io/linkedin/job-search-v2 \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.harvestapi.io/linkedin/job-search-v2"
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-v2', 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-v2",
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-v2"
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-v2")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.harvestapi.io/linkedin/job-search-v2")
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": "4490000001",
"url": "https://www.linkedin.com/jobs/view/4490000001",
"title": "Growth Analyst",
"company": {
"name": "Acme",
"logo": "https://media.licdn.com/dms/image/v2/C4D0BAQexample/company-logo_400_400/0/1630568140219"
},
"location": {
"linkedinText": "United States (Remote)"
},
"workplaceType": "remote",
"postedAgo": "5 days ago",
"salary": "$110K/yr - $140K/yr",
"benefits": "Medical, Vision, Dental, 401(k)",
"easyApply": false,
"earlyApplicant": true,
"verified": true,
"insights": []
},
{
"id": "4490000002",
"url": "https://www.linkedin.com/jobs/view/4490000002",
"title": "Product Analyst, Growth",
"company": {
"name": "Globex",
"logo": null
},
"location": {
"linkedinText": "Boston, MA (Remote)"
},
"workplaceType": "remote",
"postedAgo": "22 hours ago",
"salary": null,
"benefits": null,
"easyApply": true,
"earlyApplicant": false,
"verified": false,
"insights": [
"Actively reviewing applicants"
]
}
],
"pagination": {
"totalPages": 0,
"totalElements": 0,
"pageNumber": 1,
"previousElements": 0,
"pageSize": 25,
"hasNextPage": true
},
"status": 200,
"query": {
"search": "Growth Analyst",
"location": "United States",
"geoId": "103644278",
"geoTitle": "United States",
"companyIds": [],
"page": "1"
}
}{
"error": 123,
"message": "<string>"
}Search Jobs V2
Search LinkedIn jobs with LinkedIn’s semantic job search, the search LinkedIn now runs. It matches keywords by meaning, so results include related job titles and quoted phrases are not matched exactly. Its filters are applied to every result: workplace type, employment type, experience level, date posted, company, Easy Apply and under 10 applicants. It has no industry, job function or salary filter and no sorting (sortBy is accepted but has no effect): industryId, functionId, salary, and values its filters do not offer, are answered with status 400. A location is required. 25 jobs a page, as LinkedIn’s results list shows them; LinkedIn gives no count, so pagination.totalPages and pagination.totalElements are 0 and pagination.hasNextPage says whether there are more jobs.
curl --request GET \
--url https://api.harvestapi.io/linkedin/job-search-v2 \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.harvestapi.io/linkedin/job-search-v2"
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-v2', 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-v2",
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-v2"
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-v2")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.harvestapi.io/linkedin/job-search-v2")
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": "4490000001",
"url": "https://www.linkedin.com/jobs/view/4490000001",
"title": "Growth Analyst",
"company": {
"name": "Acme",
"logo": "https://media.licdn.com/dms/image/v2/C4D0BAQexample/company-logo_400_400/0/1630568140219"
},
"location": {
"linkedinText": "United States (Remote)"
},
"workplaceType": "remote",
"postedAgo": "5 days ago",
"salary": "$110K/yr - $140K/yr",
"benefits": "Medical, Vision, Dental, 401(k)",
"easyApply": false,
"earlyApplicant": true,
"verified": true,
"insights": []
},
{
"id": "4490000002",
"url": "https://www.linkedin.com/jobs/view/4490000002",
"title": "Product Analyst, Growth",
"company": {
"name": "Globex",
"logo": null
},
"location": {
"linkedinText": "Boston, MA (Remote)"
},
"workplaceType": "remote",
"postedAgo": "22 hours ago",
"salary": null,
"benefits": null,
"easyApply": true,
"earlyApplicant": false,
"verified": false,
"insights": [
"Actively reviewing applicants"
]
}
],
"pagination": {
"totalPages": 0,
"totalElements": 0,
"pageNumber": 1,
"previousElements": 0,
"pageSize": 25,
"hasNextPage": true
},
"status": 200,
"query": {
"search": "Growth Analyst",
"location": "United States",
"geoId": "103644278",
"geoTitle": "United States",
"companyIds": [],
"page": "1"
}
}{
"error": 123,
"message": "<string>"
}industryId, functionId and salary, and values
its filters do not offer, are answered with status 400, and sortBy has no effect.
A location (location or geoId) is required: the search does not search worldwide.
Each page holds 25 jobs as LinkedIn’s results list shows them: the posting time as LinkedIn shows it (postedAgo, e.g.
“3 weeks ago”) and the company’s name and logo, without its page. Use Get job for a
job’s exact posting time, company and description. LinkedIn gives no count: pagination.totalPages and
pagination.totalElements are 0, pagination.hasNextPage says whether there are more jobs, and a page with fewer than
25 jobs is the last.
const params = new URLSearchParams({
search: 'Growth Analyst',
location: 'United States',
workplaceType: 'remote',
postedLimit: 'week',
page: '1',
});
fetch(`https://api.harvestapi.io/linkedin/job-search-v2?${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-v2?search=Growth%20Analyst&location=United%20States&workplaceType=remote&postedLimit=week&page=1' \
--header 'X-API-Key: <api-key>'
import requests
url = "https://api.harvestapi.io/linkedin/job-search-v2?search=Growth%20Analyst&location=United%20States&workplaceType=remote&postedLimit=week&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"])

