A single LinkedIn profile lookup endpoint is a synchronous API call: your app sends one profile URL and gets that profile back as JSON in the same HTTP response. ProfileHunt's is POST https://api.profilehunt.dev/v1/profile. It holds the connection open while the profile is read live, usually a few seconds, so building a feature on it comes down to four decisions: where the call runs, what the user sees while it waits, how long you keep the result, and when a list should go to the batch API instead.
For how a profile API works in general, start with what a LinkedIn profile API is. This post is about designing an app feature around the single endpoint.
Key takeaways
- Call it from your backend, never the browser. The key would be exposed, and browsers can only call the API from the ProfileHunt dashboard.
- Design for seconds, not milliseconds. Each call is a live read, so the UI needs a real loading state and the client a generous timeout.
- Cache in your own store, keyed by profile, dated by
scraped_at. ProfileHunt reads live on every call and charges each found profile, so repeat views should hit your cache. - Lists belong in the batch API. One user waiting on one profile is a single call; an import, a refresh job or anything above 60 a minute is a batch.
How the single endpoint behaves inside an app
The single endpoint's contract shapes every design choice that follows:
| Property | What it means for your app |
|---|---|
| Synchronous | The answer arrives in the same response, usually after a few seconds. No polling, no webhook. |
| Live read | Nothing is cached on ProfileHunt's side. Every call reads the profile again and uses a credit if it's found. |
| Outcome in the body | HTTP 200 with status of ok, gone or unavailable. Only ok carries a profile and costs a credit. |
| Fixed keys | Every key is always present; missing data is null or []. Your rendering code never checks for absent keys. |
| 60 requests a minute per key | Every counted call returns X-RateLimit-Limit and X-RateLimit-Remaining headers. |
| Priority over batches | Single calls are served before batch items, so a running batch never slows an interactive lookup. |
The architecture that follows is short: the browser sends the URL to your backend, which checks its cache, calls ProfileHunt if needed, stores the result and returns it. The key lives only on the server, and the authentication docs recommend one key per app.

Timeouts and loading states
A lookup usually takes a few seconds. One that runs too long ends on ProfileHunt's side with 504 timeout, and it isn't charged. Set an explicit timeout on your HTTP client and make it generous, so that the API's own 504 reaches you instead of your client abandoning a request mid-read.
Then map every outcome to something the user can act on:
| Outcome | What the user sees | What your code does |
|---|---|---|
| Waiting | A skeleton card: "Reading public profile…" | Disable the submit button |
200, ok | The profile | Store it with scraped_at |
200, gone | "No public LinkedIn profile at that URL." | Store the miss; don't retry |
200, unavailable | "LinkedIn didn't return it just now. Try again in a minute." | Don't cache; allow a retry later |
422 invalid_url | Inline form error: "Use a linkedin.com/in/ link." | Validate before calling next time |
429, 503 | Keep the loading state | Wait for Retry-After seconds, then retry |
500, 502, 504 | Keep the loading state, then "Try again" | Retry with back-off |
401, 402 | "Lookup is unavailable right now." | Alert your team: bad key or out of credits |
Disabling the button matters: a double-click that fires two calls pays twice for the same found profile. A backend handler with a timeout, in Node.js 18 or later:
export async function lookupProfile(url) {
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 }),
signal: AbortSignal.timeout(120_000),
});
if (res.status === 200) return res.json(); // { status, profile }
const { error } = await res.json();
throw Object.assign(new Error(error), {
httpStatus: res.status,
retryAfter: Number(res.headers.get("Retry-After")) || null,
});
}
The errors reference lists every code with whether it is safe to retry.
Caching by scraped_at
Cache found profiles in your own database. ProfileHunt reads live, which keeps the data current, so the same profile requested twice is two reads and two credits. Your app decides how fresh is fresh enough.
- Key the cache by the profile name.
public_idis the decoded name from the URL you sent (the part after/in/), so normalizing incoming URLs to that name gives every variant of the same link one cache entry. - Store
scraped_atwith every record. It is the ISO 8601 time ProfileHunt read the profile, so freshness rules ("re-read if older than 30 days") become a simple comparison. - Set freshness per feature, not per app. A profile card on a CRM record can be weeks old. A pre-call research view should re-read on demand. A job-change check is only useful if it reads live.
- Cache misses briefly. A
goneresult can be kept so the same dead link isn't re-sent on every page view; give it a shorter life than a found profile. Never cacheunavailable; it means "not right now".
const FRESH_MS = 30 * 24 * 3600 * 1000; // pick per feature
export async function getProfile(slug, url) {
const cached = await db.profiles.get(slug); // your store
if (cached && Date.now() - Date.parse(cached.scraped_at) < FRESH_MS) return cached;
const { status, profile } = await lookupProfile(url);
if (status === "ok") await db.profiles.put(slug, profile);
if (status === "gone") await db.profiles.delete(slug);
if (status === "unavailable") return cached ?? null; // stale beats nothing
return profile; // the profile, or null when gone
}
Returning the stale copy when a refresh comes back unavailable keeps the UI useful while the next attempt waits. A gone result is different: it also covers members who asked for their profile not to be returned, so drop your copy rather than keep showing it. The table design and refresh policy for a larger system are in integrating a profile API with a custom backend.

When to switch to the batch API
Switch to the batch API as soon as no user is waiting on a single profile. The batch endpoint takes up to 100 URLs in one request, returns a batch id at once, and fills in results in the order you sent them.
| Situation | Use |
|---|---|
| A user pastes one URL and waits | Single endpoint |
| An AI agent's tool call for one person | Single endpoint |
| A CSV import of 2,000 contacts | Batch API |
| A nightly refresh of stale records | Batch API |
| Sustained traffic above 60 lookups a minute | Batch API |
The rate limit is the hard line. It is 60 requests a minute per key, shared by every user of your feature, while creating a batch counts as one request however many URLs it holds, and polling it doesn't count at all. Because single calls are served before batch items, you can run imports in batches and keep interactive lookups on the single endpoint without one slowing the other. The batch API guide covers creating, polling and reading a batch.
What Most Guides Get Wrong About Single-Profile Lookup Endpoints
They treat it like a database read. A lookup is a live read measured in seconds, with a credit per found profile. Wiring it into a 50-row list view without a cache sends 50 slow calls on every page load.
They put the call in front-end code. A key in a web page or a mobile app is readable by anyone who opens the developer tools. ProfileHunt's API also answers browser requests only from its own dashboard, so a front-end call fails anyway. Every production design has a backend in the middle; the secure authentication pattern shows that proxy.
They loop the single endpoint for imports. A loop over 5,000 URLs hits the 60-per-minute limit in the first minute. One batch request per 100 URLs avoids that.
Myth vs Reality
| Myth | Reality |
|---|---|
| "Caching makes the data stale." | Caching with scraped_at makes staleness visible and controllable. You choose the age per feature. |
"unavailable means the profile doesn't exist." | It means LinkedIn didn't serve it just then. Retry later; it isn't charged. gone is the status for no public profile. |
| "A batch running in the background will slow my users down." | Single calls are served before batch items, so interactive lookups keep their place. |
Advanced: Single-Flight Lookups and Freshness Budgets
This section is for teams running the endpoint behind real traffic.
- Coalesce in-flight requests. When two users open the same record within seconds, both miss the cache and both call the API. Keep a map of in-flight lookups by profile name (or a short lock in Redis across instances) and let the second caller await the first call's promise. One read, one credit.
- Throttle on
X-RateLimit-Remaining. Every counted response tells you how many requests are left in the current minute. The window resets at the start of each clock minute, so a background worker can slow down as the number approaches zero instead of collecting429s. - Budget freshness by value. Re-read a profile when it matters: before an outreach sequence starts, when a deal changes stage, or when a recruiter opens a candidate, not on a timer for records nobody looks at.
- Log outcomes, not just errors. Record
status, HTTP code and duration per call. A rising share ofgonepoints at a bad URL source; a run ofunavailableis a reason to back off.
Where ProfileHunt Fits
ProfileHunt is a LinkedIn Profile API built for this pattern: a single synchronous endpoint for interactive lookups, a batch endpoint for lists, and the same JSON shape from both. Each call returns identity, headline, about, location, experience, education, followers, connections, recent posts, reactions and comments, read live with a scraped_at timestamp. Credits cost $0.50 per 1,000 profiles found, with no subscription, and profiles that aren't found are refunded automatically.
The data is the public view of a profile: no email addresses or phone numbers, no titles for past roles, and connections capped at 500.
Getting Started
Sign in at /login for 100 free credits with a work email and create a key per app on the Keys page. The profile endpoint reference has the full request and response, and the rate limit docs explain the per-minute window and headers. If you haven't made a first call yet, follow how to retrieve one LinkedIn profile with an API request. For the wider picture, read what a LinkedIn profile API is.
Frequently asked questions
Is the LinkedIn profile lookup API synchronous or asynchronous?
ProfileHunt's single endpoint, POST /v1/profile, is synchronous: it returns the profile in the same response, usually after a few seconds. The batch endpoint is asynchronous: it returns a batch id at once and you poll it for results.
Can I call a LinkedIn profile API directly from my frontend?
No. A key in front-end code is readable by anyone, and ProfileHunt only accepts browser requests from its own dashboard. Call it from your backend and send the result to the browser.
Should I cache LinkedIn profile API responses?
Yes, in your own store. ProfileHunt reads the profile live on every call and charges each found profile, so cache by profile name and use scraped_at to decide when a record is old enough to re-read.
What timeout should I set for a LinkedIn profile lookup?
Set an explicit timeout that is generous compared with a typical lookup of a few seconds, so the API's own 504 timeout reaches you first. A timed-out lookup is not charged and is safe to retry.
When should I use the batch API instead of single lookups?
Use the batch API when nobody is waiting on one specific profile: imports, scheduled refreshes, or anything above 60 lookups a minute. A batch takes up to 100 URLs and counts as one request against the rate limit.


