A batch takes up to 100 profile URLs in one request and works through them in the background. It suits lists: you send the URLs once, then check back until every result is in.
Create a batch
POST https://api.profilehunt.dev/v1/profile/batches
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{ "urls": ["https://www.linkedin.com/in/williamhgates", "https://www.linkedin.com/in/satyanadella"] }urls is an array of 1 to 100 strings. The answer comes at once, 202 with the batch in the shape shown below and every result pending. Keep its id.
Check on it
GET https://api.profilehunt.dev/v1/profile/batches/bat_…
Authorization: Bearer YOUR_API_KEYPoll every few seconds until status is completed.
{
"id": "bat_9f2c…",
"status": "completed",
"created_at": "2026-10-29T10:12:03.511Z",
"total": 3,
"credits_used": 1,
"counts": { "ok": 1, "gone": 1, "unavailable": 0, "failed": 0, "pending": 0, "invalid_url": 1, "duplicate": 0 },
"results": [
{ "url": "https://www.linkedin.com/in/williamhgates", "status": "ok", "profile": { ... } },
{ "url": "https://www.linkedin.com/in/no-such-person-123", "status": "gone", "profile": null },
{ "url": "https://example.com/jane", "status": "invalid_url", "profile": null }
]
}The same flow in code, checking every 5 seconds:
# 1. Create the batch. You get a batch id back at once.
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"]}'
# 2. Check on it until "status" is "completed". Checking is not rate limited.
curl https://api.profilehunt.dev/v1/profile/batches/bat_... \
-H "Authorization: Bearer $PROFILEHUNT_KEY"import os, time, requests
API = "https://api.profilehunt.dev"
headers = {"Authorization": f"Bearer {os.environ['PROFILEHUNT_KEY']}"}
batch = requests.post(f"{API}/v1/profile/batches", headers=headers, json={
"urls": [
"https://www.linkedin.com/in/williamhgates",
"https://www.linkedin.com/in/satyanadella",
],
}).json()
while batch["status"] == "processing":
time.sleep(5)
batch = requests.get(f"{API}/v1/profile/batches/{batch['id']}", headers=headers).json()
for r in batch["results"]:
print(r["status"], r["profile"]["full_name"] if r["profile"] else r["url"])const api = (path, init = {}) =>
fetch(`https://api.profilehunt.dev${path}`, {
...init,
headers: {
Authorization: `Bearer ${process.env.PROFILEHUNT_KEY}`,
"Content-Type": "application/json",
},
}).then(async r => {
if (!r.ok) throw new Error(`${r.status} ${await r.text()}`);
return r.json();
});
let batch = await api("/v1/profile/batches", {
method: "POST",
body: JSON.stringify({ urls: [
"https://www.linkedin.com/in/williamhgates",
"https://www.linkedin.com/in/satyanadella",
] }),
});
while (batch.status === "processing") {
await new Promise(r => setTimeout(r, 5000));
batch = await api(`/v1/profile/batches/${batch.id}`);
}
for (const r of batch.results) console.log(r.status, r.profile?.full_name ?? r.url);Results
results are in the order you sent the URLs, one per URL. Each has the URL as you sent it, a status, and the same profile object a single call returns.
| status | Meaning | Credit |
|---|---|---|
| ok | Profile found. | 1 |
| gone | No public profile at this URL. | 0 |
| unavailable | LinkedIn didn't serve it. Send it again later, in a new batch or a single call. | 0 |
| failed | It couldn't be read after several tries. | 0 |
| pending | Not done yet. | Held |
| invalid_url | Not a linkedin.com/in/ URL. Never queued. | 0 |
| duplicate | The same profile appeared earlier in this batch. Only the first is fetched. | 0 |
Credits
- When you create a batch, one credit is held for every URL that will be fetched (not invalid or duplicate ones).
- If the workspace can't cover all of them, the batch is refused with
402and nothing is held. - As each result comes in, a found profile keeps its credit and anything else is refunded.
Limits and timing
- Creating a batch counts as one request against the rate limit. Polling doesn't count.
- Single calls are served before batch items, so a running batch never slows your single calls down.
- A batch can be read for 30 days after it was created; after that
GETreturns404. Store what you need. - A batch can only be read with a key from the workspace that created it; other workspaces get
404.
Errors
| HTTP | error | When |
|---|---|---|
| 401 | unauthorized | Missing or invalid key. |
| 402 | insufficient_credits | Not enough credits for every URL in the batch. The message says how many it needs. |
| 404 | not_found | Unknown batch id, or one from another workspace. |
| 422 | invalid_batch | urls is missing, empty, longer than 100, or has something other than strings. |
| 429 | rate_limited | Over the rate limit when creating. Wait for Retry-After. |
| 503 | temporarily_unavailable | The batch couldn't be queued. Nothing is held; retry after Retry-After. |