LINKEDIN PROFILE API

Required Parameters for a LinkedIn Profile URL API Request

Which parameters a LinkedIn profile URL API request needs: url or urls, the batch id, the key and Content-Type headers, and what each missing one returns.

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

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

Required Parameters for a LinkedIn Profile URL API Request

A LinkedIn profile URL API request with ProfileHunt needs exactly two things: an API key in a header (Authorization: Bearer <key> or x-api-key: <key>) and a JSON body with one parameter, url. That's the whole list for POST /v1/profile. The batch endpoint swaps url for urls, an array of 1 to 100 URLs, and reading a batch back needs only the key and the batch id in the path. There are no optional parameters. This page lists each one, per endpoint, and what the API answers when it is missing or wrong.

For the concepts behind the endpoints, see what a LinkedIn profile API is.

Key takeaways

  • One body parameter per endpoint. url for a single profile, urls for a batch. Both are required.
  • One key header, two names. Authorization: Bearer or x-api-key. A missing or malformed key gets 401.
  • No optional parameters exist. No field selector, no country, no cache flag. Every call returns the full profile.
  • Missing parameters never cost credits. 401, 422 and 429 answers are all free.

Required vs Optional at a Glance

EndpointPath parameterHeadersBody
POST /v1/profilenonekey (required), Content-Type: application/json (send it)url (required, string)
POST /v1/profile/batchesnonekey (required), Content-Type: application/json (send it)urls (required, array of 1–100 strings)
GET /v1/profile/batches/{id}id (required)key (required)none

The base URL is https://api.profilehunt.dev. The same table, as a machine-readable spec, is the OpenAPI document: url and urls are its only required body properties, and it lists both key headers as security schemes.

POST /v1/profile: One Parameter

url is a string holding a public LinkedIn profile URL:

curl -X POST https://api.profilehunt.dev/v1/profile \
  -H "Authorization: Bearer $PROFILEHUNT_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://www.linkedin.com/in/williamhgates" }'

The URL can be loose: no scheme, www. or not, a country subdomain, a trailing slash or a query string are all fine. What it must be is a linkedin.com /in/ profile URL; company pages and bare usernames get 422 invalid_url. The answer is 200 with status ok, gone or unavailable, and only ok uses a credit.

Copy-ready variants of this body, each with its response, are in LinkedIn profile API request body examples.

POST /v1/profile/batches: One Parameter

urls is an array of 1 to 100 strings:

{ "urls": ["https://www.linkedin.com/in/williamhgates", "https://www.linkedin.com/in/satyanadella"] }

The array as a whole is validated strictly. Each URL inside it is validated loosely: a bad one doesn't fail the request, it is just marked invalid_url in the results, and a repeat is marked duplicate. Neither is charged. The answer is 202 with a batch id.

GET /v1/profile/batches/{id}: One Path Parameter

id is the batch id from the 202 answer, such as bat_9f2c…. There is no body and no query string:

curl https://api.profilehunt.dev/v1/profile/batches/bat_... \
  -H "Authorization: Bearer $PROFILEHUNT_KEY"

Polling this does not count against the rate limit. The batch API docs cover the response shape.

Three slots in a wall, each with a matching block, one already filled

Headers: the Key and Content-Type

The API key is required on every endpoint. Send it in either header:

Authorization: Bearer YOUR_API_KEY
x-api-key: YOUR_API_KEY

Send the key in one of these headers, never in the query string or the body. Keys are per workspace; the authentication docs cover creating and revoking them.

Content-Type: application/json is part of the contract. Every documented example sends it, and so should you: HTTP libraries, proxies and no-code tools behave predictably when it is set. Python's requests sets it for you when you pass json=.

What Happens When Each Parameter Is Missing

What's missing or wrongEndpointHTTPBodyCredit
No key header, a wrong key or a revoked keyall401{"error":"unauthorized"}0
url isn't a linkedin.com /in/ URL/v1/profile422{"error":"invalid_url"}0
No urls, an empty array, more than 100, or a non-string item/v1/profile/batches422{"error":"invalid_batch"}0
An id that doesn't exist or belongs to another workspaceGET batch404{"error":"not_found"}0

The error reference has every status the API can return, including 402 for an empty balance and 429 for going over 60 requests a minute; how to interpret status codes adds what to do about each.

What Most Guides Get Wrong About Profile API Parameters

They invent optional parameters. Guides written across several providers list things like fields, include_skills, use_cache or country. ProfileHunt has none of them. Every call reads the profile live and returns every key, so there is nothing to switch on. Leave such keys out.

They treat "required" as "must be perfect". url is required, but its format is forgiving. linkedin.com/in/williamhgates/?trk=abc is a perfectly good value. The rules for what is accepted are in how to validate LinkedIn profile URL input.

They put the key in the URL. Some APIs accept ?api_key= in the query string. This one takes the key in a header, which also keeps keys out of server logs and browser history.

Myth vs Reality

MythReality
You need a LinkedIn username or member ID as well as the URL.The URL is the only identifier. The API reads the name after /in/.
A batch needs a callback or webhook URL parameter.There is none. You poll GET /v1/profile/batches/{id}, and polling is free.
You must send both Authorization and x-api-key.Either one is enough. Send one.
Leaving out a parameter can still cost a credit.Every missing-parameter answer (401, 422, 404) is free. Credits are only used for profiles found.
Content-Type is optional decoration.It is part of the documented request. Send application/json on every POST.

Three gates in a row along one path: a padlock, a turnstile, then a final gate

Advanced: Fixing a Request with Several Problems

A request can have more than one thing wrong with it, but each answer names one: 401 the key, 429 the pace, 422 the input, 402 the balance. Fix what the code names and send again; if something else is wrong, the next answer names that.

A routine that clears problems fastest:

  1. Key. Get a request that doesn't answer 401. A missing, wrong or revoked key always gets 401, so any other answer means the key was accepted.
  2. Pace. On 429, wait the seconds in Retry-After. A refused request is never charged.
  3. Input. 422 invalid_url means the url isn't a linkedin.com /in/ profile URL; 422 invalid_batch means urls is missing, empty, over 100 or holds something other than strings.
  4. Credits. 402 insufficient_credits means the workspace needs a top-up. For a batch, the message says how many credits it needs.

If the API has briefly paused requests, a 503 with Retry-After tells you when to try again.

Two habits make all of this rarer:

  • Validate URLs before sending. Rejecting a company page in your own code saves a round trip and gives the user a clearer message.
  • Send one key header. With only Authorization or only x-api-key on the request, it's always clear which key made the call.

Where ProfileHunt Fits

ProfileHunt is a LinkedIn Profile API: public LinkedIn profile URL in, JSON out. The short parameter list is the design. One required body parameter means one thing to map in Clay, n8n, Make, Zapier or your own code, and nothing to get subtly wrong.

Pricing is as simple as the parameters: $1 buys 2,000 credits, one credit is one profile found, and everything that isn't a found profile is free. The data is the public view, read live, without a LinkedIn login. It has no emails or phone numbers, no titles for past roles, and connections stops at 500.

Getting Started

Sign in for an API key and 100 free credits with a work email, then send the one-parameter request above. The quickstart shows it in Python and Node.js. For how to write the url value itself, accents and spreadsheet links included, see how to format a LinkedIn profile URL in an API payload. For the bigger picture, go back to what a LinkedIn profile API is.

Frequently asked questions

What parameters does a LinkedIn profile API need?

With ProfileHunt, one body parameter, url, holding the public profile URL, plus your API key in an Authorization: Bearer or x-api-key header. Send Content-Type: application/json with it.

Are there optional parameters for the LinkedIn profile API?

No. There are no options to select fields, locations or caching. Every call reads the profile live and returns the full profile object with the same keys.

What happens if I leave out the API key?

You get 401 with {"error":"unauthorized"} and no credit is used. Send the key in the Authorization or x-api-key header.

Do I need to send Content-Type for a LinkedIn profile API request?

Send Content-Type: application/json. It is part of the documented request, and most HTTP clients add it when you send JSON.

How many URLs can I send in one LinkedIn profile API request?

One in url on /v1/profile, or 1 to 100 in urls on /v1/profile/batches. More than 100 gets 422 invalid_batch; split longer lists into batches of 100.

Get API key 100 free credits with a work email