To enrich a list of LinkedIn profile URLs, send them all in one batch request instead of calling the API once per row. With ProfileHunt you POST up to 100 URLs to /v1/profile/batches, get a batch id back immediately, and poll that batch until its status is completed. Results come back in the order you sent them, and you only pay for profiles that were found.
If you're new to profile APIs, start with what a LinkedIn profile API is and come back here for lists.
Key takeaways
- One request, up to 100 URLs. The batch is processed in the background; you don't hold a connection open.
- Poll, don't wait. Check the batch every few seconds. Polling doesn't count against the rate limit.
- Order is kept.
results[i]belongs tourls[i], so you can write results straight back to your rows. - Credits are held, then settled. One credit per fetchable URL is held up front; everything that isn't found is refunded.
When to use a batch instead of single calls
Single calls (POST /v1/profile) are simplest when a person or a workflow needs one profile right now, for example a CRM record being opened or a form submission. A batch is better when you already have a list:
| Situation | Use |
|---|---|
| One profile, needed in the same request | Single call |
| A CSV or sheet of 10 to 10,000 URLs | Batches of 100 |
| A nightly job that refreshes a table | Batches of 100 |
| An automation tool that handles one row at a time | Single call per row |
Batch items are processed after single calls, so a large batch never slows down the single lookups your app makes at the same time. Creating a batch counts as one request against the rate limit of 60 requests per minute per key, which makes batches the practical way to go through thousands of profiles.
Step 1: Create the batch
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"] }'
urls is an array of 1 to 100 strings. The answer is 202 right away, with a batch id (it starts with bat_) and every result pending. Keep the id.

Step 2: Poll until it completes
curl https://api.profilehunt.dev/v1/profile/batches/bat_... \
-H "Authorization: Bearer $PROFILEHUNT_KEY"
Check every few seconds until status is completed. A finished batch looks like this:
{
"id": "bat_9f2c…",
"status": "completed",
"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": { "full_name": "Bill Gates" } },
{ "url": "https://www.linkedin.com/in/no-such-person-123", "status": "gone", "profile": null },
{ "url": "https://example.com/jane", "status": "invalid_url", "profile": null }
]
}
Here it is in Python, end to end:
import os, time, requests
BASE = "https://api.profilehunt.dev/v1/profile/batches"
HEADERS = {"Authorization": f"Bearer {os.environ['PROFILEHUNT_KEY']}"}
def enrich(urls):
batch = requests.post(BASE, headers=HEADERS, json={"urls": urls}).json()
while batch["status"] != "completed":
time.sleep(5)
batch = requests.get(f"{BASE}/{batch['id']}", headers=HEADERS).json()
return batch["results"] # same order as urls
For a list longer than 100, split it into chunks of 100 and create one batch per chunk.
Step 3: Read the results
Each result has the URL as you sent it, a status, and the same profile object a single call returns (or null):
| 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. | 0 |
failed | It couldn't be read after several tries. | 0 |
invalid_url | Not a linkedin.com/in/ URL. Never queued. | 0 |
duplicate | The same profile appeared earlier in this batch. | 0 |
A good habit is to write status back to your sheet next to the data. Rows marked unavailable or failed can go into the next batch; rows marked gone usually mean the URL is wrong or the profile was removed, and are worth checking by hand. The JSON schema guide covers mapping the profile fields to columns.

How credits work in a batch
- When you create a batch, one credit is held for every URL that will be fetched. Invalid and duplicate URLs are not counted.
- If the workspace can't cover all of them, the batch is refused with
402 insufficient_creditsand nothing is held. The error message says how many credits it needs. - As each result comes in, a found profile keeps its credit and anything else is refunded.
So a batch of 100 URLs where 92 profiles are found costs 92 credits, which is under 5 cents at $0.50 per 1,000 profiles.
Limits worth knowing
- A batch can be read for 30 days after it was created. After that,
GETreturns404, so store the results you need. - A batch can only be read with a key from the workspace that created it.
422 invalid_batchmeansurlsis missing, empty, longer than 100, or contains something other than strings.
The full reference, including every error code, is in the batch API docs.
No-code option
If you'd rather not write code, the dashboard has a batch playground: paste up to 100 URLs, run it, and download the results as CSV. The same credits apply.
Frequently asked questions
How many LinkedIn profiles can I look up at once?
Up to 100 URLs per batch. For more, create several batches; each creation counts as one request against the 60-per-minute limit.
How long does a batch take?
It depends on the size and current load. Profiles are read live, usually a few seconds each, and processed in parallel. Poll every few seconds rather than waiting a fixed time.
Am I charged for duplicate or invalid URLs?
No. Invalid URLs are never queued, and only the first copy of a repeated profile is fetched. Neither uses a credit.
Do results come back in the same order?
Yes. results has one entry per URL you sent, in the same order.


