LINKEDIN PROFILE API

API That Converts a LinkedIn Profile URL Into JSON

What an API that turns a LinkedIn profile URL into JSON should guarantee: accepted URLs, stable keys and nulls, clear statuses, and a buyer checklist.

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

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

API That Converts a LinkedIn Profile URL Into JSON

An API that converts a public LinkedIn profile URL into JSON takes one profile URL in a request and returns that person's public profile as structured data: name, headline, location, roles, education, followers and recent activity. What separates a good one from a weak one is not the fields on the pricing page but the contract: which URLs it accepts, whether the response has the same shape every time, and how clearly it tells you that a profile wasn't found.

This guide explains that contract and ends with a checklist for choosing a provider. For the basics of how profile APIs work, start with what a LinkedIn profile API is.

Key takeaways

  • The contract matters more than the field list. Your code depends on what the API accepts, what it returns and how it fails.
  • Same keys every time. A good API returns every key on every profile, with null or [] when a value isn't public.
  • Not found is a status, not an error. gone and unavailable should be distinct, documented and free.
  • Errors should be standard HTTP. 401, 402, 422, 429 with Retry-After, and 5xx you can retry.
  • Test the contract before you buy. Twenty real URLs from your own data tell you more than any feature table.

What a URL-to-JSON API actually does

A URL-to-JSON API does three jobs. It validates the URL you send, it reads the public profile behind it, and it maps that profile into a fixed JSON structure. Each job is a promise your integration relies on.

JobThe promiseWhat breaks if it's weak
Accept the inputClear rules for which URLs are validReal-world URLs from CRMs get rejected, or junk gets charged
Read the profileLive data with a timestampYou act on stale titles and companies
Shape the outputThe same keys and types for every profileYour parser crashes on the first unusual profile

How each part of a profile page becomes a JSON key is its own topic; how a LinkedIn profile URL API returns structured data walks through that mapping. This guide is about the guarantees around it.

The input contract: which URLs it accepts

An API that only accepts one exact URL format pushes cleanup work onto you. URLs in real data come from forms, CSV exports and copy-paste, so they arrive in many forms. ProfileHunt accepts a linkedin.com/in/ URL written any of these ways:

InputAcceptedNotes
https://www.linkedin.com/in/williamhgatesYesThe standard form
linkedin.com/in/williamhgatesYesNo scheme, no www.
uk.linkedin.com/in/williamhgatesYesCountry subdomain
https://www.linkedin.com/in/williamhgates/?trk=abcYesTrailing slash and query string
https://www.linkedin.com/company/microsoftNoCompany page: 422 invalid_url
williamhgatesNoBare username: 422 invalid_url

A rejected URL is never charged. The input is a single JSON field, url, sent to POST https://api.profilehunt.dev/v1/profile with the key in Authorization: Bearer or x-api-key.

A shelf of identical cubby holes, two left empty

The output guarantees: same keys, explicit nulls

The most important output guarantee is that every key is always present. With ProfileHunt, a value the public profile doesn't show is null, and an empty list is [], so profile.about never throws and profile.experience.length always works. A profile with almost nothing public has exactly the same keys as a famous one.

{
  "status": "ok",
  "profile": {
    "public_id": "jane-doe",
    "full_name": "Jane Doe",
    "headline": null,
    "about": null,
    "experience": [
      { "company": "Acme", "title": null, "start_date": "2019", "end_date": "2023" }
    ],
    "recent_posts": [],
    "connections": 500,
    "scraped_at": "2026-11-01T09:00:00.000Z"
  }
}

This illustrative snippet shows three things a parser must expect. headline and about can be null. A past role has a company and dates but title: null, because the public view shows titles for current roles only. And connections: 500 means 500 or more, since LinkedIn shows logged-out visitors "500+" above that. The full field list, with types, is in the JSON schema guide.

Statuses: found, not found, try later

A URL-to-JSON API has to tell you three different outcomes apart, and it should do it in the body, not by failing the request. ProfileHunt answers HTTP 200 with one of three statuses:

statusMeaningprofileCredit
okProfile foundThe JSON object1
goneNo public profile at this URL: private, deleted, never existed, or removed at the member's requestnull0
unavailableLinkedIn didn't serve the profile just thennull0

Everything else is an HTTP error with a JSON body such as { "error": "rate_limited" }: 401 for a bad key, 402 when credits run out, 422 for an invalid URL, 429 above 60 requests a minute per key, and 500, 502, 503 or 504 for temporary failures. For 429 and 503, wait the seconds in the Retry-After header. None of these is charged. Every code, with its retry rule, is in how to interpret status codes.

What Most Guides Get Wrong About URL-to-JSON APIs

They compare field lists. Almost every provider lists name, headline, experience and education. Two APIs with the same list can behave completely differently: one omits keys it couldn't find, the other returns null. The first breaks your parser on day one with a real list.

They treat 404 as "not found". If a provider returns HTTP 404 both for "this profile doesn't exist" and for "wrong endpoint", your code can't tell a bad URL from a bug. A body status like gone, separate from transport errors, keeps those apart.

They ignore the price of a miss. Every real list contains private, deleted and mistyped profiles. Whether a miss is charged changes your real cost more than the list price does. The pricing guide does that math.

A balance scale weighing one blue block against a pile of grey blocks

A buyer checklist for URL-to-JSON APIs

Ask every provider these questions before you integrate. The answers belong in its docs; if they aren't there, ask.

QuestionWhy it mattersProfileHunt
Which URL forms are accepted?Real data is messyAny linkedin.com/in/ form, incl. country subdomains, slashes and query strings
Is every key present on every response?Parser safetyYes: null or [] when not public
How is "not found" reported?Clean records, no false errorsgone in the body, HTTP 200
Are misses charged?Real costNo: gone, unavailable and errors are free
Is the data live or cached?FreshnessLive on every call, with scraped_at
Does it use a LinkedIn account?Account riskNo login, cookie or seat
Is there a batch endpoint?ListsUp to 100 URLs per request
Is there a machine-readable spec?Generated clients, testsYes, /openapi.json
What does it not return?No surprisesNo email, phone or past-role titles

Ranking providers against each other on live data, freshness and price is a separate question, covered in the best live LinkedIn profile API.

Myth vs Reality

MythReality
"More fields means a better API."Stable fields beat more fields. A key that is sometimes missing costs more than a key you don't get.
"A null means the API failed."null means the public profile doesn't show that value. The lookup worked.
"All URL-to-JSON APIs return the same data."They read different views. A public-view API returns what a logged-out visitor sees; tools that use a member's session see more and put that account at risk.
"An error code is enough to handle not-found."You need gone (stop) and unavailable (retry later) to be distinct, or you retry dead URLs and give up on live ones.
"Cached data is just as good."A cached title can be months old. Live reads with a timestamp let you decide how fresh is fresh enough.

Advanced: Contract-Testing a Provider Before You Commit

This section is for teams about to wire a provider into production.

  • Build a test set from your own data. Take 20 to 50 URLs from your CRM, including country subdomains, query strings, a company page, a deleted profile and one with almost nothing public.
  • Assert the shape, not the values. For every ok response, check that the key set equals the documented set. Values change; keys must not.
  • Measure the miss rate on your list. Count gone and unavailable. That rate, times the provider's charge for a miss, is a cost you will pay on every run.
  • Diff the spec over time. Fetch /openapi.json on a schedule and alert when it changes, so a new field or a type change never surprises a downstream job.
  • Check the timestamp. If scraped_at is far older than your request time, you are reading a cache, whatever the marketing says.

Where ProfileHunt Fits

ProfileHunt is a LinkedIn Profile API built around exactly this contract: loose URL input, every key on every response, ok / gone / unavailable in the body, and standard HTTP errors with Retry-After. A found profile costs one credit ($0.50 per 1,000), and everything else costs nothing.

It returns the public view, so there are no emails, phones or past-role titles, and connections stops at 500. Everything it does return is read live, without any LinkedIn login, and documented in the profile endpoint reference.

Getting Started

Sign in for 100 free credits with a work email and run your own test set in the playground; the step-by-step is in how to look up a public LinkedIn profile using its URL. The quickstart has the request in cURL, Python and Node.js. For the concepts, read what a LinkedIn profile API is.

Frequently asked questions

What is the best API to convert a LinkedIn profile URL to JSON?

The best one for you returns every key on every profile, accepts the URL forms in your data, reports not-found as a free status, and reads live. ProfileHunt meets all four at $0.50 per 1,000 profiles found.

Is there an API that returns LinkedIn profile data as JSON from a URL?

Yes. ProfileHunt takes a linkedin.com/in/ URL in a POST /v1/profile request and returns the public profile as JSON with a fixed set of keys. The quickstart shows the call.

Why are some fields null in the LinkedIn profile JSON?

A null means the public view of that profile doesn't show the value. Past-role titles are always null because LinkedIn's public view shows titles for current roles only.

Does a LinkedIn URL to JSON API return email addresses?

No. LinkedIn doesn't show email addresses or phone numbers to logged-out visitors, so an API that reads the public view can't return them.

Do I pay when a LinkedIn profile URL isn't found?

Not with ProfileHunt. A profile that comes back gone or unavailable is not charged, and neither is an invalid URL or any HTTP error.

Get API key 100 free credits with a work email