A LinkedIn profile API request body with ProfileHunt is one JSON object with one key: { "url": "https://www.linkedin.com/in/williamhgates" }. You POST it to https://api.profilehunt.dev/v1/profile with your API key in a header, and the answer is the profile as JSON. For a list, the body is { "urls": [...] } with 1 to 100 URLs, sent to /v1/profile/batches. Everything below is copy-ready, and each body is shown with the response it gets.
If you're new to the idea, what a LinkedIn profile API is covers the concepts. This page is the bodies themselves.
Key takeaways
- The single body has one key.
url, a string. There are no options, flags or field selectors to add. - The batch body has one key.
urls, an array of 1 to 100 strings, answered at once with202and a batchid. - Two header sets work.
Authorization: Bearer <key>orx-api-key: <key>, plusContent-Type: application/json. - The URL can be written loosely. No scheme, a trailing slash, a country subdomain or a tracking query string all resolve to the same profile.
The minimal single-profile body
This is the whole body for one profile:
{ "url": "https://www.linkedin.com/in/williamhgates" }
Sent with cURL:
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 request waits while the profile is read live, then answers 200. Here is the real response, trimmed to a few keys:
{
"status": "ok",
"profile": {
"public_id": "williamhgates",
"profile_url": "https://www.linkedin.com/in/williamhgates",
"full_name": "Bill Gates",
"headline": "Chair, Gates Foundation and Founder, Breakthrough Energy",
"location": "Seattle, Washington, United States",
"country": "US",
"followers": 40725248,
"connections": 8,
"scraped_at": "2026-10-13T09:00:00.000Z"
}
}
The full object always has the same keys, with null or [] where the profile shows nothing. The profile endpoint reference lists every one.
If no public profile exists at the URL, the same body gets 200 with { "status": "gone", "profile": null }. If LinkedIn didn't serve the profile just then, it is { "status": "unavailable", "profile": null }. Neither costs a credit.
The same body from Python and Node.js
Let the HTTP library serialize the body. It also sets Content-Type for you.
import os, requests
r = requests.post(
"https://api.profilehunt.dev/v1/profile",
headers={"Authorization": f"Bearer {os.environ['PROFILEHUNT_KEY']}"},
json={"url": "https://www.linkedin.com/in/williamhgates"},
)
print(r.status_code, r.json())
const res = await fetch("https://api.profilehunt.dev/v1/profile", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.PROFILEHUNT_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ url: "https://www.linkedin.com/in/williamhgates" }),
})
console.log(res.status, await res.json())
The batch request body
For a list, send the URLs in one array:
{
"urls": [
"https://www.linkedin.com/in/williamhgates",
"https://www.linkedin.com/in/satyanadella"
]
}
curl -X POST https://api.profilehunt.dev/v1/profile/batches \
-H "Authorization: Bearer $PROFILEHUNT_KEY" \
-H "Content-Type: application/json" \
-d '{ "urls": ["https://www.linkedin.com/in/williamhgates", "https://www.linkedin.com/in/satyanadella"] }'
The answer comes back at once, 202, with every result pending:
{
"id": "bat_9f2c…",
"status": "processing",
"created_at": "2026-11-01T10:12:03.511Z",
"total": 2,
"credits_used": 0,
"counts": { "ok": 0, "gone": 0, "unavailable": 0, "failed": 0, "pending": 2, "invalid_url": 0, "duplicate": 0 },
"results": [
{ "url": "https://www.linkedin.com/in/williamhgates", "status": "pending", "profile": null },
{ "url": "https://www.linkedin.com/in/satyanadella", "status": "pending", "profile": null }
]
}
Keep the id and poll GET https://api.profilehunt.dev/v1/profile/batches/<id> until status is completed. The GET has no body, only the key header. Polling, credits and result statuses are covered in the batch LinkedIn profile API guide.

Header sets that work
Each of these is a complete, working header set for either POST endpoint:
| Header set | Lines |
|---|---|
| Bearer token | Authorization: Bearer $PROFILEHUNT_KEY and Content-Type: application/json |
| API key header | x-api-key: $PROFILEHUNT_KEY and Content-Type: application/json |
The x-api-key form is handy in tools that have a "header name / header value" field but no Bearer option. A missing or wrong key gets 401 with {"error":"unauthorized"}. Send the key in one of these headers, never in the body or the query string. More on keys in the authentication docs, and on choosing between the two headers in how to authenticate with an API key.
URL variants that work in the body
You don't have to clean URLs to a perfect form before sending them. The API reads the profile name after /in/ and looks that up. Every body in this table gets the same 200 ok response for Bill Gates shown above:
url in the body | Profile looked up |
|---|---|
https://www.linkedin.com/in/williamhgates | williamhgates |
www.linkedin.com/in/williamhgates | williamhgates |
linkedin.com/in/williamhgates/ | williamhgates |
https://linkedin.com/in/williamhgates?trk=abc | williamhgates |
https://uk.linkedin.com/in/williamhgates | williamhgates |
https://www.linkedin.com/in/williamhgates/details/experience/ | williamhgates |
These bodies don't: they get 422 with {"error":"invalid_url"} and cost nothing.
url in the body | Why it's refused |
|---|---|
williamhgates | A username alone is not a URL. |
https://www.linkedin.com/company/microsoft | A company page, not a person. |
https://evillinkedin.com/in/williamhgates | Not a linkedin.com host. |
The rules, with a validator you can run before calling, are in how to validate LinkedIn profile URL input. How to write names with accents or from spreadsheet cells is in how to format a LinkedIn profile URL in an API payload.
One batch, three outcomes at creation
A batch body never fails as a whole because of one bad URL. Invalid and repeated URLs are marked in the response straight away, and neither is charged:
{
"urls": [
"www.linkedin.com/in/williamhgates/",
"https://uk.linkedin.com/in/williamhgates?trk=x",
"https://example.com/jane"
]
}
The 202 response marks them at once: pending for the first, duplicate for the second (same profile name), invalid_url for the third. One credit is held, for the first only. Each result echoes the URL exactly as you sent it, so you can match results back to your rows.
What Most Guides Get Wrong About Request Bodies
They add parameters that do nothing. Bodies with "fields", "include_posts" or "country" are copied around from other APIs. ProfileHunt's request has one field, url (or urls), and every response carries the full profile object anyway.
They send the URL as a form field. curl -d "url=https://www.linkedin.com/in/williamhgates" sends url=... as form data, which isn't JSON. Send the JSON object, with Content-Type: application/json.
They use GET with a query string. GET /v1/profile?url=... is not part of the API. Profile lookups are POST with a JSON body.
Myth vs Reality
| Myth | Reality |
|---|---|
You must strip https://, www. and query strings first. | The API accepts them and looks up the name after /in/. |
| A single bad URL fails a whole batch. | Only a malformed urls array fails the batch (422 invalid_batch). A bad URL inside it is just marked invalid_url. |
| You can choose which fields come back. | There is no field selector. Every response has every key, null when the profile doesn't show it. |
| Duplicate URLs in a batch cost twice. | Repeats are marked duplicate, never queued and never charged. |
Content-Type is optional, so leave it out. | Send it. It is the documented contract, and HTTP clients and proxies rely on it. |

Advanced: Generating Request Bodies at Scale
Hand-written bodies are fine for a test. In a pipeline, build them from data, and three habits keep them correct.
Serialize, never concatenate. '{"url": "' + url + '"}' breaks the first time a cell contains a quote or a line break. Use JSON.stringify, json.dumps or jq:
jq -n --arg u "https://www.linkedin.com/in/williamhgates" '{url: $u}' |
curl -X POST https://api.profilehunt.dev/v1/profile \
-H "Authorization: Bearer $PROFILEHUNT_KEY" \
-H "Content-Type: application/json" \
--data-binary @-
Chunk to 100 before you build the batch body. A urls array of 101 gets 422 invalid_batch and nothing is queued. Split the list first, one body per 100; submitting URLs in bulk covers chunking, dedupe and mapping results back to rows.
Check the whole batch can be paid for. Credits for every valid URL are held when the batch is created. If the workspace can't cover the batch, it gets 402 and nothing is held, so size batches to your balance or top up first.
Where ProfileHunt Fits
ProfileHunt is a LinkedIn Profile API: public LinkedIn profile URL in, JSON out. The bodies on this page are the whole interface. There is no SDK to install and no options to learn, so any HTTP client, script or no-code tool can call it.
You pay only for profiles found: $1 buys 2,000 credits, which is $0.50 per 1,000 profiles. gone, unavailable, invalid and duplicate URLs cost nothing. The data is the public view of a profile, read live on every call, 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 to get an API key and 100 free credits with a work email, paste the single body above into the playground, then run the cURL version from your terminal. The quickstart has the same call in Python and Node.js. For the bigger picture, go back to what a LinkedIn profile API is.
Frequently asked questions
What does the request body look like for a LinkedIn profile API?
With ProfileHunt it is { "url": "https://www.linkedin.com/in/<name>" }, sent as JSON in a POST to https://api.profilehunt.dev/v1/profile. For up to 100 profiles, send { "urls": [...] } to /v1/profile/batches.
Can I send a LinkedIn profile URL without https or www?
Yes. linkedin.com/in/williamhgates and www.linkedin.com/in/williamhgates/ both work. The API accepts the URL with or without them and looks up the name after /in/.
Why does my LinkedIn profile API request return 422?
The url isn't a linkedin.com /in/ profile URL. Company pages and bare usernames get 422 invalid_url, and nothing is charged. Also check that the body is JSON with a url string, not form data. See the validation guide.
How do I send multiple LinkedIn URLs in one API request?
Use the batch endpoint with { "urls": [...] } and 1 to 100 URLs. It answers 202 with a batch id you poll until status is completed. The batch API guide walks through it.
Can I choose which profile fields the API returns?
No. ProfileHunt always returns the full profile object with the same keys. Pick the fields you need from the response in your own code.


