Batch API: Up to 100 Profiles per Request

Create a batch of up to 100 LinkedIn profile URLs, poll it until it completes, and read results in order. How batch credits are held and refunded.

Last updated

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_KEY

Poll 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"

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.

statusMeaningCredit
okProfile found.1
goneNo public profile at this URL.0
unavailableLinkedIn didn't serve it. Send it again later, in a new batch or a single call.0
failedIt couldn't be read after several tries.0
pendingNot done yet.Held
invalid_urlNot a linkedin.com/in/ URL. Never queued.0
duplicateThe 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 402 and 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 GET returns 404. Store what you need.
  • A batch can only be read with a key from the workspace that created it; other workspaces get 404.

Errors

HTTPerrorWhen
401unauthorizedMissing or invalid key.
402insufficient_creditsNot enough credits for every URL in the batch. The message says how many it needs.
404not_foundUnknown batch id, or one from another workspace.
422invalid_batchurls is missing, empty, longer than 100, or has something other than strings.
429rate_limitedOver the rate limit when creating. Wait for Retry-After.
503temporarily_unavailableThe batch couldn't be queued. Nothing is held; retry after Retry-After.