LINKEDIN PROFILE API

How to Interpret LinkedIn Enrichment API Status Codes

Every HTTP status and body status a LinkedIn profile enrichment API returns: what each means, whether it costs a credit and whether to retry.

By Surender Kumar, GTM Engineer, ProfileHunt · Published · 9 min read

Also in: Español · Português (Brasil) · Deutsch · Français · 简体中文 · हिन्दी · العربية · বাংলা · Русский · Bahasa Indonesia · اردو · 日本語 · मराठी · Tiếng Việt · తెలుగు · Hausa · Türkçe · தமிழ் · 한국어

How to Interpret LinkedIn Enrichment API Status Codes

To interpret status codes from a LinkedIn profile enrichment API, read two layers. The HTTP status tells you whether the request itself was processed. The status field in the body tells you what happened to the profile. With ProfileHunt, an HTTP 200 can carry ok, gone or unavailable, and every other HTTP status carries an error code such as { "error": "rate_limited" }. Only ok costs a credit; every other outcome is free, so a retry never costs twice.

One table for every code, then real examples. If you're new to profile APIs, read what a LinkedIn profile API is first.

Key takeaways

  • HTTP 200 does not mean "found". It means the lookup ran. Read status to learn whether a profile came back.
  • Only ok is charged. gone, unavailable, timeouts and every error are free. The credit held at the start of the request is refunded automatically.
  • Three answers, three actions. Retry after Retry-After (429, 503), retry with back-off (500, 502, 504), or don't retry at all (401, 422, gone).
  • Batches add their own statuses. Items in a batch can also be failed, pending, invalid_url or duplicate.

Two layers: the HTTP status and the body status

The HTTP status answers "did the API process my request?" The body status answers "what did the API find at that URL?" A profile that doesn't exist is not an error in the API's eyes: the request was valid, the lookup ran, and the answer is "nothing there". That is why it comes back as 200 with status: "gone" rather than as a 404.

So the reading order is fixed:

  1. Check the HTTP status. Anything other than 200 (or 202 when you create a batch) is an error with an error code in the body.
  2. On 200, check status. Only ok has a profile object; gone and unavailable have profile: null.
  3. Only then read profile fields.

Skip step 2 and your code crashes on the first deleted profile. Typed versions of this order are in parsing responses in JavaScript and in Python.

The full table for POST /v1/profile

Every code the single profile endpoint returns, from the errors reference:

HTTPBodyMeaningCreditRetry?What to do
200"status": "ok"Profile found and returned.1No needSave profile.
200"status": "gone"No public profile at this URL.0NoMark the record; see handling not found profiles.
200"status": "unavailable"LinkedIn didn't serve the profile just then.0LaterQueue it; see what unavailable means.
401unauthorizedAPI key missing, wrong or revoked.0NoFix the key or header.
402insufficient_creditsThe workspace is out of credits.0After topping upStop the job and top up on the billing page.
422invalid_urlNot a linkedin.com/in/ profile URL.0NoFix or drop the input.
429rate_limitedOver 60 requests a minute on this key.0After Retry-AfterWait the seconds in Retry-After.
500internalSomething failed on ProfileHunt's side.0YesRetry with back-off.
502upstream_failedProfileHunt couldn't reach LinkedIn.0YesRetry with back-off.
503temporarily_unavailableBusy right now; requests are paused briefly.0After Retry-AfterWait the seconds in Retry-After.
504timeoutThe lookup took too long.0YesRetry with back-off.

gone covers four situations: the profile is private, it was deleted, it never existed, or the member asked ProfileHunt to stop returning it. The API doesn't say which, and for your pipeline the action is the same.

Two pairs are easy to mix up. unavailable (a 200) and 502 upstream_failed both involve LinkedIn, but unavailable means LinkedIn answered without the profile, while 502 means the request to LinkedIn failed outright. And 503 temporarily_unavailable is about ProfileHunt pausing requests briefly, not about the profile at all.

The batch API: request codes and item statuses

The batch API has two levels too. The HTTP status covers creating or reading the batch; each item in results has its own status.

HTTPerrorWhen
202noneBatch created; every result starts as pending. Keep the id.
401unauthorizedMissing or invalid key.
402insufficient_creditsNot enough credits for every URL in the batch. Nothing is held.
404not_foundUnknown batch id, one from another workspace, or older than 30 days.
422invalid_batchurls missing, empty, over 100, or not all strings.
429rate_limitedOver the rate limit when creating. Wait for Retry-After.
503temporarily_unavailableThe batch couldn't be queued. Nothing is held; retry after Retry-After.

The batch itself is processing until every item is settled, then completed. Each item is one of:

Item statusMeaningCredit
okProfile found.1
goneNo public profile at this URL.0
unavailableLinkedIn didn't serve it. Send it again later, in a new batch or a single call.0
failedIt couldn't be read after several tries.0
pendingNot done yet.Held
invalid_urlNot a linkedin.com/in/ URL. Never queued.0
duplicateThe same profile appeared earlier in this batch. Only the first is fetched.0

The batch's counts object gives one number per item status.

A row of tiles in separate slots, one highlighted, like a status table with one row selected

Reading real responses

A found profile, shortened:

{
  "status": "ok",
  "profile": {
    "public_id": "williamhgates",
    "full_name": "Bill Gates",
    "headline": "Chair, Gates Foundation and Founder, Breakthrough Energy",
    "scraped_at": "2026-10-13T09:00:00.000Z"
  }
}

A profile that isn't there, and one LinkedIn didn't serve. Both are HTTP 200 and both are free:

{ "status": "gone", "profile": null }
{ "status": "unavailable", "profile": null }

An error is a non-200 status with an error code. Here is a rate-limited request with its headers:

HTTP/1.1 429 Too Many Requests
Retry-After: 12
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 0

{ "error": "rate_limited" }

X-RateLimit-Limit and X-RateLimit-Remaining come with every counted request, so you can slow down before you hit 429. Retry-After is the number of seconds until the next clock minute starts, because the rate limit resets at the top of each minute, not 60 seconds after your first request. The header itself is standard HTTP, defined in RFC 9110.

What Most Guides Get Wrong About API Status Codes

They treat 200 as success. For an enrichment API, 200 only means the lookup ran. A pipeline that counts every 200 as an enriched record will report a hit rate that includes deleted and private profiles.

They expect a 404 for a missing profile. Clients are often written to catch 404. ProfileHunt reserves 404 for a batch id it doesn't know. A missing profile is a normal answer, 200 with gone, so your "not found" branch has to look at the body.

They lump every failure into "retry". A blanket retry loop sends a bad key or a company page URL again and again, burning rate limit for an answer that will never change. 401 and 422 are fixed by changing the request, not by repeating it. The full retry logic, in JavaScript and Python, is in response status handling for failed public profile lookups.

Myth vs Reality

MythReality
"A 200 means I paid for a profile."Only status: "ok" uses a credit. gone and unavailable are 200 and free.
"Errors cost money, so retries add up."Every error is free. The credit held at the start is refunded, so retrying never costs twice.
"unavailable and gone mean the same thing."gone is lasting: no public profile at that URL. unavailable is momentary: try again later.
"429 means wait 60 seconds."Wait the seconds in Retry-After, which counts to the next clock minute and is often shorter.
"A batch is all-or-nothing."Each item settles on its own. A completed batch can mix ok, gone, unavailable and failed.

Shelves with stacks of blocks grouped by height, one stack taller than the rest

Advanced: Status Codes as Pipeline Metrics

Once your client handles each code correctly, the codes become your best monitoring signal. Count them per run, per list and per day, and each one points to a different owner:

SignalUsually meansOwner
High share of gone in one listThe list is old or was built from mistyped URLs.Whoever supplies the list
invalid_url or 422 risingA new source is sending company pages or bare usernames.The integration that feeds URLs
A cluster of unavailable in one windowMomentary; it should clear on the next pass.Your retry queue
Any 402The workspace ran dry mid-job.Whoever manages credits
Steady 429Workers are sharing a key without sharing a limiter.Your client code

Store the status with every record, not just the profile, and compare credits_used in each batch response with your ok count; they should match, because only found profiles are charged. When something looks off, every request appears on the Usage page with its ID (req_…), which is what support@profilehunt.dev will ask for.

Where ProfileHunt Fits

ProfileHunt is a LinkedIn Profile API: a public profile URL in, JSON out, and you pay only for profiles found. The status design follows from that pricing. Because only ok is charged, every other code can be retried or logged without a cost penalty, and the refund happens automatically with no ticket to file.

The data is the public view of a profile, read live on each call. No email addresses or phone numbers, no titles for past roles, and connections stops at 500.

Getting Started

Create a workspace at profilehunt.dev/login: 100 free credits with a work email, 10 with a personal one. Make a key, run the call in the quickstart, and try one real URL plus one made-up URL to see ok and gone side by side. For how this API fits the rest of your stack, the LinkedIn profile API guide is the starting point.

Frequently asked questions

Why does a LinkedIn profile API return 200 when the profile doesn't exist?

Because the request was valid and the lookup ran; the answer is simply "no profile here". ProfileHunt returns 200 with status: "gone" and profile: null, and does not charge for it.

What does error 422 invalid_url mean in a LinkedIn profile API?

The URL isn't a linkedin.com/in/ profile URL, for example a company page or a bare username. Fix the input; sending it again won't change the answer. It is not charged.

How long should I wait after a 429 from a LinkedIn enrichment API?

Wait the number of seconds in the Retry-After header. ProfileHunt's limit is 60 requests a minute per key and resets at the start of each clock minute.

Am I charged when a LinkedIn profile API returns an error?

Not with ProfileHunt. Only status: "ok" uses a credit. Errors, timeouts, gone and unavailable are refunded automatically.

What is the difference between unavailable and gone?

gone means there is no public profile at that URL, so don't retry. unavailable means LinkedIn didn't serve the profile at that moment, so retry later. Both are free.

Get API key 100 free credits with a work email