Sending your key
Every request needs an API key, in either of these headers:
Authorization: Bearer YOUR_API_KEY
x-api-key: YOUR_API_KEYcurl -X POST https://api.profilehunt.dev/v1/profile \
-H "x-api-key: $PROFILEHUNT_KEY" \
-H "Content-Type: application/json" \
-d '{ "url": "https://www.linkedin.com/in/williamhgates" }'A missing, wrong or revoked key gets 401 with {"error":"unauthorized"}.
Keys and workspaces
- Keys belong to a workspace. All keys in a workspace share its credits, and the Usage page shows which key made each request.
- Your first sign-in creates a workspace and a key named
Default. Create more on the Keys page, for example one per app, so you can revoke one without touching the others. - Invite teammates on the Members page. Only owners and admins can buy credits.
Keeping keys safe
- Call the API from your server, a script or a tool like n8n, not from a web page. Browsers can only call the API from the ProfileHunt dashboard, and a key in front-end code is readable by anyone.
- Keep keys out of source control; read them from an environment variable.
- If a key may have leaked, revoke it on the Keys page and create a new one. Anything done with a key is your responsibility under the Terms.