Blog / Web data by industry

LinkedIn Jobs API: Job Listings as JSON

A LinkedIn jobs API call returns public LinkedIn job listings as JSON. Two endpoints do the work: GET /v1/linkedin/jobs-search takes a query, and GET /v1/linkedin/job takes the url of one posting. Each successful call costs 1 credit and failed calls cost nothing. This post covers both endpoints' parameters, a cURL request, and a weekly hiring-signal job for a list of companies that costs 1 credit per company per week.

Which LinkedIn endpoints return jobs?

The LinkedIn API has 11 endpoints, and three of them matter for job data. Jobs Search finds postings from a text query. Job returns one posting from its URL. Company returns a company page, which puts the employer behind a set of postings in context. All three are GET and cost 1 credit per successful call.

Endpoint Starts from Required Credits
GET /v1/linkedin/jobs-search A text query query 1
GET /v1/linkedin/job A posting URL url 1
GET /v1/linkedin/company A company URL or ID none (url or company_id) 1
GET /v1/linkedin/company-posts A company slug slug 1

The API also has profile and post endpoints. This post doesn't use them: a hiring signal is about what companies advertise, and it needs nothing about individual people. Company Posts is the one extra worth knowing: it returns a company's posts from its slug.

Which parameters does jobs-search take?

jobs-search takes one required parameter, query, and twelve optional ones. The reference documents types, lengths and allowed values, and nothing else: no defaults, no page sizes and no description of what each optional parameter changes. Treat the table as the contract, and try any optional parameter in the playground before a job depends on it.

Parameter Type Required Allowed values or limit
query string yes up to 2,048 characters
num integer no none stated
start integer no none stated
page integer no none stated
hl string no up to 2 characters
lr string no none stated
gl string no up to 2 characters
cr string no none stated
safe string no active, off
dateRestrict string no none stated
sort string no date, date:r, date:d
filter integer no 0, 1
rights string no cc_publicdomain, cc_attribute, cc_sharealike, cc_noncommercial, cc_nonderived

The single-posting and company endpoints are smaller:

Endpoint Parameter Type Required
job url string yes
job use_cache boolean no
job maximum_cache_age integer no
company url string no
company company_id string no
company use_cache boolean no
company maximum_cache_age integer no

A value outside the allowed list, such as sort=newest, returns invalid_parameters (422) and costs nothing.

How do you request LinkedIn job listings with cURL?

Send a GET request with your key in the X-API-Key header and a URL-encoded query. The request below searches for data engineer postings. Keys start with sk_live_; where you can't set a header, pass the key as the api_key query parameter, as the authentication docs describe.

curl "https://api.perceptlayer.com/v1/linkedin/jobs-search?query=data+engineer+berlin" \
  -H "X-API-Key: $API_KEY"

To fetch one posting, pass its public URL, URL-encoded:

curl -G "https://api.perceptlayer.com/v1/linkedin/job" \
  --data-urlencode "url=$POSTING_URL" \
  -H "X-API-Key: $API_KEY"

We don't have a recorded response for the LinkedIn endpoints, so this post doesn't show one. Run jobs-search with your own query in the playground on the LinkedIn API page to see the response shape. Check there, too, whether search results carry posting URLs you can pass to job, before you write code that chains the two.

What do the headers tell you?

The headers are documented even where the body isn't. A successful response carries X-Credits-Used, what the call cost, and X-Credits-Remaining, your balance after it, plus RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset. An error returns an HTTP status and a JSON body with error.code, error.message and error.request_id. The requests and responses docs cover the format.

How do you build a weekly hiring signal for a list of companies?

A hiring signal answers one question per company per week: did its advertised openings change? Run one jobs-search call per company on a fixed schedule, with a fixed query such as the company name plus a role family. Store each raw response with the company, the query and the date. The signal is the week-over-week change, so the query has to stay the same from week to week.

Fixed inputs matter more than coverage. A company that adds ten engineering postings in a month shows up as a run of changed results for the same query. Change the query halfway through and you can't tell a hiring change from a search change. Job postings measure advertised demand, not hires, which Job Posting Data for Labour-Market Research covers in depth.

A weekly collector in Python

This script uses requests and the standard library. It runs one search per company, stores the body and the credit header in SQLite, and flags a company when its response differs from last week's. It hashes the whole body instead of reading fields, because no response is recorded yet; once you've seen real results in the playground, replace the hash with a count of postings.

import hashlib
import json
import os
import sqlite3
import time
from datetime import date

import requests

API = "https://api.perceptlayer.com/v1/linkedin/jobs-search"
HEADERS = {"X-API-Key": os.environ["API_KEY"]}

COMPANIES = ["Acme Analytics", "Northwind Logistics", "Contoso Health"]
ROLE = "data engineer"

db = sqlite3.connect("hiring.db")
db.execute(
    """CREATE TABLE IF NOT EXISTS runs (
        run_date TEXT, company TEXT, query TEXT, status INTEGER,
        credits_used TEXT, body_hash TEXT, body TEXT,
        PRIMARY KEY (run_date, company)
    )"""
)


def search(query):
    while True:
        resp = requests.get(API, headers=HEADERS, params={"query": query}, timeout=60)
        if resp.status_code == 429:
            time.sleep(int(resp.headers.get("Retry-After", "1")))
            continue
        return resp


today = date.today().isoformat()
for company in COMPANIES:
    query = f"{company} {ROLE}"
    resp = search(query)
    body = json.dumps(resp.json(), sort_keys=True)
    body_hash = hashlib.sha256(body.encode()).hexdigest() if resp.ok else None
    previous = db.execute(
        "SELECT body_hash FROM runs WHERE company = ? AND run_date < ? "
        "AND body_hash IS NOT NULL ORDER BY run_date DESC LIMIT 1",
        (company, today),
    ).fetchone()
    db.execute(
        "INSERT OR REPLACE INTO runs VALUES (?, ?, ?, ?, ?, ?, ?)",
        (today, company, query, resp.status_code,
         resp.headers.get("X-Credits-Used"), body_hash, body),
    )
    db.commit()
    if body_hash and previous and previous[0] != body_hash:
        print(f"{company}: results changed since last run")
    elif not resp.ok:
        print(f"{company}: HTTP {resp.status_code}, not billed")
    time.sleep(1)  # stays inside the free tier's 1 request a second

A changed hash is a prompt to look, not a measurement: results can differ for reasons other than new postings. Its value is in cutting a list of 150 companies down to the handful worth opening this week. Failed calls store the error body and cost nothing; the errors docs list the codes.

What does a hiring signal cost per company per week?

One jobs-search call per company per week costs 1 credit per company per week. The arithmetic scales directly with the list: 150 companies × 1 call × 1 credit = 150 credits a week, or 150 × 52 = 7,800 credits a year. Two role families per company doubles it. A monthly company call per employer for context adds 1 credit per company per month.

Job Calls a week Credits a week Credits a year
50 companies, 1 query each 50 50 2,600
150 companies, 1 query each 150 150 7,800
150 companies, 2 queries each 300 300 15,600
500 companies, 2 queries each 1,000 1,000 52,000

The 100 free credits on signup cover the first 2 weeks of the 50-company job, or a first run for 100 companies. The Starter pack's 10,000 credits covers either of the first two rows for a year. The last row is about 4,330 credits a month; the Build pack's 50,000 credits covers a little under a year of it, and purchased credits last 12 months. Opening the postings behind a changed result with job adds 1 credit each. See pricing for what credits cost and the credits docs for how debits work.

What do the restricted-endpoint terms mean for job data?

The LinkedIn API includes restricted endpoints, which work only after you accept the restricted-endpoint terms in your dashboard. Until then a call returns restricted_endpoint (403) and costs nothing. The terms don't permit collecting personal data without a lawful basis or using it to contact people, and that decides the shape of a hiring-signal job.

Keep the job to postings and companies: how many roles a company advertises, in which functions and places, and how that changes over time. Don't use job data to find, track or profile individual people, such as recruiters named on a posting, and don't use it to message anyone. If a response includes a person's details, drop them before storage. Read LinkedIn's own terms before you build on its data, and get legal advice for commercial use. Data is collected from publicly available sources and returned as found at the time of the call.

Where does LinkedIn fit among job sources?

LinkedIn is one jobs source, and a hiring signal is sturdier with more than one. Jobs API: Indeed, Glassdoor and Google Jobs Compared covers three other sources with recorded responses, which helps when you need fields you can parse today. For pay, Salary Data from Job Sites explains how to read posted ranges. The web data hub has more.

To start, run jobs-search with one of your companies in the playground on the LinkedIn API page, then get a free API key and schedule the collector weekly.

APIs in this post

Frequently asked questions

Is there a LinkedIn jobs API for public job listings?

Perceptlayer's LinkedIn endpoints work with one API key: GET /v1/linkedin/jobs-search searches postings by query, and GET /v1/linkedin/job returns one posting by url. Each successful call costs 1 credit. They include restricted endpoints, so accept the restricted-endpoint terms in your dashboard before the first call. Every account gets 100 free credits on signup.

How much does it cost to track hiring at a company?

One search per company per week costs 1 credit per company per week, or 52 credits a company a year. A list of 150 companies is 150 credits a week and 7,800 a year. Failed calls cost nothing and return X-Credits-Used: 0, so a week with errors only charges for the searches that succeeded.

Can I get the people who posted a job or work at a company?

Not for this kind of job. The restricted-endpoint terms don't permit collecting personal data without a lawful basis or using it to contact people. Use LinkedIn job data for postings and companies in aggregate, such as advertised roles by function and location over time, and leave personal details out of what you store.

How do I page through more jobs-search results?

The reference lists num, start and page as optional integers but doesn't document what they do or any page size. Test them in the playground with a query you know well and compare the results before relying on them. Each page you request is a separate call and costs 1 credit.

What happens when I hit the rate limit?

The call returns rate_limited (429) with a Retry-After header giving the seconds to wait, and costs nothing. Limits are per account, shared by all its keys, and counted per minute. Free accounts get 1 request a second; paying accounts get at least 5. The rate limits docs list each pack's rate.

  1. Job Posting Data for Labour-Market Research

    Which Indeed posting fields support trend analysis, where postings mislead versus hires, and a weekly collection plan that costs 3,000 credits a month.

  2. Jobs API: Indeed, Glassdoor and Google Jobs Compared

    Indeed returns postings with apply_url and coordinates, Glassdoor returns ratings, reviews and pay percentiles, Google Jobs adds date filters. 1 credit a call.

  3. Salary Data from Job Sites: Reading Ranges Without Bias

    Glassdoor's salaries endpoint returns p10 to p90 total pay, a currency and a national count. How to read those ranges and the biases of self-reported pay.

Start with 100 free credits

No password to set. We email you a sign-in link, and your key works on every API.

No credit card. 100 free credits on signup.