To send a LinkedIn profile URL to a profile enrichment API, take the URL from wherever it lives (a form field, a CRM property, a spreadsheet cell or a webhook payload), put it in a JSON body as url, and POST it from a server or an automation tool that holds your API key. Every source ends in the same request:
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" }'
What changes is the glue around it: where the key is kept, how the URL is picked out, and where the result goes. This post covers that glue for the four usual sources. For what the API returns and why, see what a LinkedIn profile API is.
Key takeaways
- The key never travels with the URL's source. Forms, sheets and webhooks hand the URL to something that holds the key: your backend, a script's property store, or a no-code tool's credential.
- Send the URL as the user wrote it. The API accepts
https://or not,www.or not, country subdomains, trailing slashes and query strings. - Write back
status, not just fields.ok,goneandunavailableeach need a different next step, and onlyokcosts a credit. - A list is a batch. One URL at a time suits forms, CRM triggers and webhooks; a whole sheet or export belongs in the batch API.
From a web form
A URL typed into a web form goes to your backend first, and your backend calls the API. Never call the enrichment API from the page itself: a key in front-end code is readable by anyone, and ProfileHunt only accepts browser requests from its own dashboard.
A server route that takes the form's URL and returns the profile, in any runtime with the standard Request and Response objects (Next.js route handlers, Bun, Deno, Cloudflare Workers):
// POST /api/enrich — runs on the server; the browser never sees the key
export async function POST(req) {
const { url } = await req.json();
if (!/linkedin\.com\/in\/[^/?#]+/i.test(url ?? "")) {
return Response.json({ error: "Enter a linkedin.com/in/ profile link." }, { status: 400 });
}
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 }),
});
return Response.json(await res.json(), { status: res.status });
}
The pattern check gives the user an instant message; the API itself answers non-profile links with 422 invalid_url, free of charge. A fuller validator, in JavaScript and Python, is in how to validate profile URL input. In the form, disable the submit button while the request runs; a lookup usually takes a few seconds, and a double submit of a found profile uses two credits. For timeouts, loading states and caching, see the guide to the single LinkedIn profile lookup endpoint.
From a CRM field
A LinkedIn URL stored on a CRM contact is sent by an automation that fires when the field is filled in, then writes the result back to the same record. There are two common ways to wire it.
With a no-code tool. Zapier, Make and n8n all have a generic HTTP step that can call the API, triggered by "new or updated contact" in your CRM:
| Tool | HTTP step | Where the URL goes |
|---|---|---|
| Zapier | Webhooks by Zapier, POST | Data row with key url, mapped from the contact's LinkedIn field |
| Make | HTTP, Make a request | Raw JSON body, with the LinkedIn field mapped into url |
| n8n | HTTP Request node | JSON body as an expression, such as {{ $json.linkedin_url }} |
Each tool keeps the key in its own credential or header setting, so the CRM never sees it. Add a filter after the HTTP step that continues only when status is ok, then map fields such as profile.headline, profile.location and the current role from profile.experience into CRM properties. The Zapier, Make and n8n pages have the exact settings for each.
With the CRM's own webhook. Most CRMs can call a URL when a property changes. Point that webhook at your backend and handle it as in the webhook section below; your backend then calls the API and updates the record through the CRM's API.
Either way, guard against loops. Writing enrichment results back counts as "contact updated" in many CRMs, which can fire the same automation again and look the profile up a second time. Trigger on a change to the LinkedIn URL field only, or skip records that already have an enriched_at value.

From a spreadsheet column
A column of LinkedIn URLs in Google Sheets can be sent one row at a time by a short Apps Script that reads each URL, calls the API and writes the status and fields into the next columns. Keep the key in the script's properties (Project Settings, Script properties) rather than in a cell.
// Column A: LinkedIn URL · B: status · C: headline · D: scraped_at
function enrichRows() {
const key = PropertiesService.getScriptProperties().getProperty("PROFILEHUNT_KEY");
const sheet = SpreadsheetApp.getActiveSheet();
const rows = sheet.getRange(2, 1, sheet.getLastRow() - 1, 2).getValues();
rows.forEach(([url, done], i) => {
if (!url || done) return; // skip empty rows and rows already looked up
const res = UrlFetchApp.fetch("https://api.profilehunt.dev/v1/profile", {
method: "post",
contentType: "application/json",
headers: { Authorization: "Bearer " + key },
payload: JSON.stringify({ url }),
muteHttpExceptions: true,
});
const data = JSON.parse(res.getContentText());
const p = data.profile || {};
sheet.getRange(i + 2, 2, 1, 3).setValues([[data.status || data.error, p.headline || "", p.scraped_at || ""]]);
});
}
function onOpen() {
SpreadsheetApp.getUi().createMenu("ProfileHunt").addItem("Enrich rows", "enrichRows").addToUi();
}
Run it from the menu rather than as a custom cell formula such as =PROFILE(A2). A formula can re-run when the sheet recalculates, and every re-run of a found profile is a new credit. A menu action runs once, on purpose. Because the script skips rows that already have a status, you can run it again after a time limit or a rate_limited row and it picks up where it stopped.
Before the first run, paste the column into the free LinkedIn URL cleaner to drop duplicates and links that aren't profiles. If the column holds thousands of rows, the batch API is the better tool: up to 100 URLs per request, results in your order. No-code users can do the same in Clay with an HTTP API column.

From a webhook
A webhook delivers the URL inside someone else's JSON payload, from a form builder, a sign-up flow or a CRM. Accept the event, answer at once, and do the lookup in the background. A lookup usually takes a few seconds, and many webhook senders expect a quick reply and retry on a slow one, which would send the same URL twice.
// POST /hooks/new-lead — acknowledge first, enrich afterwards
export async function POST(req) {
const event = await req.json();
const url = event.linkedin_url; // the field name your sender uses
if (url) await queue.add("enrich", { recordId: event.id, url }); // your job queue
return new Response(null, { status: 202 });
}
The worker that picks up the job sends the same request as the curl example at the top, then writes the result to the record named by recordId. Three habits keep a webhook flow clean:
- Verify the sender. Check the signature or shared secret your sender provides before queuing anything, so a stranger can't spend your credits.
- Make it idempotent. Use the event's ID, or the record ID plus the URL, as the job ID, so a redelivered event doesn't trigger a second lookup.
- Store the outcome. Write
statusandscraped_atback with the fields. Agonerecord needs a different follow-up than anunavailableone, which is worth retrying later.
What Most Guides Get Wrong About Sending LinkedIn URLs to an API
They clean the URL into one strict format before sending. Stripping query strings and country subdomains is useful for deduplication, but it isn't required for the request. ProfileHunt accepts the URL as people paste it, so the field can go straight into url.
They put the call where the URL is. The URL lives in a browser form or a spreadsheet; the key must not. The glue above exists to move the URL to where the key is.
They write back only the fields. If a row shows a blank headline, nobody can tell whether the profile is private, the lookup failed or it never ran. A status column answers that, and it tells you which rows to retry.
Myth vs Reality
| Myth | Reality |
|---|---|
| "You need a native ProfileHunt app in Zapier or Make." | The built-in HTTP steps do the job: one POST with the key in a header and the URL in the body. |
| "Each source needs its own API." | Every source ends in the same request. Only where the key lives and where the result goes change. |
| "A spreadsheet formula is the simplest way to enrich a column." | A formula can recalculate and look the same profile up again. A menu-run script or a batch runs once, on purpose. |
| "Bad URLs waste credits." | A URL that isn't a profile link gets 422 and costs nothing; so does a profile that comes back gone. |
Advanced: One Intake Path for Every Source
Teams that take URLs from several sources at once end up with the same problems: duplicates across sources, the same person looked up twice, and no record of where a URL came from. This is for readers already running more than one of the flows above.
- Funnel every source into one queue. Forms, CRM webhooks, sheet imports and no-code steps all push
{ url, source, record_id }into one job queue. One worker calls the API, so rate limits and retries are handled once. - Deduplicate on the profile name. Lowercase the part after
/in/and use it as the job key. Two sources sendinguk.linkedin.com/in/Jane-Doe/andhttps://www.linkedin.com/in/jane-doe?trk=xthen produce one lookup. - Route by volume. Interactive sources (a form, a single CRM change) go to the single endpoint; bulk sources (a sheet, an import) go to the batch API in chunks of 100. Single calls are served before batch items, so the bulk path never slows the interactive one.
- Respect the shared limit. All flows using one key share its 60 requests a minute. Give each flow its own key, or have the worker read
X-RateLimit-Remainingand slow down before it hits429. - Keep the source. Storing
sourcenext tostatusshows which channel sends the most dead links.
Where ProfileHunt Fits
ProfileHunt is a LinkedIn Profile API that takes a public profile URL from any of these sources and returns structured JSON: identity, headline, about, location, experience, education, followers, connections, recent posts, reactions and comments, read live. It works from your own code and from Clay, n8n, Make and Zapier with the same request. Found profiles cost one credit each, $0.50 per 1,000, and profiles that aren't found are refunded automatically.
The response is the public view of a profile: no email addresses or phone numbers, no titles for past roles, and connections capped at 500. Map the fields you write back with that in mind.
Getting Started
Sign in at /login for 100 free credits with a work email and create a key for each flow on the Keys page. The quickstart has the request in cURL, Python and Node.js. For a first call from scratch, follow how to retrieve one LinkedIn profile with an API request, and for the full background, read what a LinkedIn profile API is.
Frequently asked questions
How do I send a LinkedIn URL to an enrichment API?
POST it as JSON, { "url": "<LinkedIn profile URL>" }, to the API with your key in a header. With ProfileHunt that is https://api.profilehunt.dev/v1/profile and Authorization: Bearer <key>, from a server, a script or a no-code HTTP step.
Can I enrich LinkedIn URLs in Google Sheets?
Yes. A short Apps Script can read each URL, call the API with UrlFetchApp and write the status and fields into the next columns. Run it from a menu, not as a cell formula, so profiles aren't looked up again on every recalculation.
How do I enrich a HubSpot or Salesforce contact from a LinkedIn URL?
Trigger an automation when the contact's LinkedIn field changes, call the API with that URL through Zapier, Make, n8n or your own webhook handler, and write the fields back to the contact. Trigger on the URL field only, so the write-back doesn't fire the automation again.
Can I call a LinkedIn enrichment API from a web form without a backend?
No. The API key would be visible in the page, and ProfileHunt only accepts browser requests from its own dashboard. Send the form to a server route or a no-code webhook that holds the key.
Does the LinkedIn URL need to be in a specific format?
No. ProfileHunt accepts a linkedin.com/in/ link with or without https:// and www., on country subdomains, with trailing slashes or query strings. Company pages and bare usernames get 422 invalid_url and aren't charged.


