Documentation

Person Profile API (v3)

How the v3 Person Profile endpoint works — identifiers, choosing maxAgeSeconds, the 409 freshness conflict, response metadata, credits, errors, and migrating from v2.

The v3 Person Profile endpoint (GET https://api.enrichlayer.com/v3/person) looks up a person by one identifier and returns the v3 person profile. Where v2 combined three cache parameters, v3 takes one number: maxAgeSeconds, the oldest copy of the profile you are willing to accept. The API reference lists every response field.

Making a request

Send a GET request with your API key as a Bearer token in the Authorization header and one identifier:

ParameterDescription
profileA profile URL in the form https://linkedin.com/in/example-user/, or the username from it.
emailAn email address known for the person.
facebookA Facebook username or profile URL.
twitterA Twitter/X username or profile URL.
githubA GitHub username or profile URL.

A request without an identifier returns a 400. If you pass several, only the first in this order is used: github, email, profile, facebook, twitter.

curl -G \
  -H "Authorization: Bearer ${YOUR_API_KEY}" \
  'https://api.enrichlayer.com/v3/person' \
  --data-urlencode 'profile=https://linkedin.com/in/williamhgates/'
Shell

Choosing maxAgeSeconds

maxAgeSeconds is the oldest copy of the profile you accept, in seconds. The default is 2592000 (30 days), the minimum is 0, and there is no maximum.

  • If we hold a copy younger than maxAgeSeconds, we normally serve that copy without a live fetch.
  • If every copy we hold is older, or we hold none, we fetch the profile live from the source. A live fetch takes longer and adds a live-fetch charge (see How credits are charged).
You wantmaxAgeSeconds
Always fetch live0
No older than one day86400
No older than one week604800
No older than 30 days (the default)2592000, or omit the parameter
Any copy we already holdA large value, such as 946080000 (30 years)

A smaller value gets you fresher data at the cost of more live fetches. Start with the default and lower it only for the lookups where recency matters.

When no fresh copy can be fetched

If a live fetch fails or runs out of time and the only copy we hold is older than your maxAgeSeconds, the endpoint returns a 409 instead of quietly serving the older copy:

{
  "code": 409,
  "name": "Conflict",
  "description": "A fresh profile could not be fetched; a cached profile exists but is older than the requested maxAgeSeconds. Retry the request, or raise maxAgeSeconds to accept the cached profile.",
  "cachedProfileAgeSeconds": 5184000
}
json

cachedProfileAgeSeconds is the age of the copy we hold. You have two options:

  • Retry the same request later — the next live fetch may succeed.
  • Accept the copy we hold: repeat the request with maxAgeSeconds set to at least cachedProfileAgeSeconds.

A 409 is not charged.

Reading the response metadata

Every 200 response carries a meta object:

  • meta.updatedAt — when the record behind this response was last refreshed. A refresh that finds nothing new still moves this date forward.
  • meta.activityAt — when a change to this profile was last noticed. null if no change has been observed.
  • meta.experienceRestrictedOn — the work history has been hidden at least since this date: the first date we recorded it as hidden; the actual start can be earlier. null when the work history is visible or its visibility is unknown.
"meta": {
  "updatedAt": "2026-04-01T10:00:00.000Z",
  "activityAt": "2026-03-15T14:30:00.000Z",
  "experienceRestrictedOn": "2026-03-20"
}
json

Read the two dates together: a recent updatedAt with an older activityAt means the profile was checked recently and nothing had changed since activityAt.

Response headers

  • X-Request-Id — the identifier of this request. Include it when you report an issue.
  • X-EnrichLayer-Credit-Cost — the total credits charged for this call. 0 for an error.

Requesting optional data

Social links, phone numbers, personal and work emails, career insight, the developer profile, and recent posts are opt-in. Each has its own parameter that defaults to exclude: socialLink, phoneNumber, personalEmail, workEmail, careerInsight, developerProfile, and activities. Control optional person data shows which response fields each one adds.

How credits are charged

  • Most successful responses are charged a base cost.
  • Optional data adds a charge only when you request it and the response contains it. Phone numbers and email addresses are charged per item returned.
  • A profile fetched live carries an additional live-fetch charge. The charge applies only when the live fetch returns the profile; a copy served from our store never carries it.
  • Errors are not charged, including 404 and 409.

The X-EnrichLayer-Credit-Cost header reports exactly what each call cost.

Handling errors

Errors are returned as JSON with the HTTP status in code, its reason phrase in name, and a human-readable description:

{
  "code": 401,
  "name": "Unauthorized",
  "description": "Invalid API key"
}
json

Branch on the status code. description is meant for people reading logs.

StatusWhen
400The parameters are invalid — for example, no identifier, or a profile URL in the wrong format.
401The API key is missing or invalid.
403The account is suspended or deleted, has insufficient credits, or has reached its auto top-up limit.
404No person was found for the identifier, or the profile can't be accessed at the source.
409The live fetch failed, and the copy we hold is older than maxAgeSeconds. See When no fresh copy can be fetched.
429You exceeded the rate limit. See Rate limits.
500An internal error.
503A service the request depends on is temporarily unavailable.

429, 500, and 503 are temporary — retry with a backoff.

Migrating from v2

v3 replaces use_cache, fallback_to_cache, and live_fetch with maxAgeSeconds:

v2v3
live_fetch=forcemaxAgeSeconds=0
use_cache=if-recentmaxAgeSeconds=2505600
use_cache=if-presentmaxAgeSeconds=946080000
fallback_to_cache=on-errorNo equivalent
fallback_to_cache=neverThe default

Three differences to plan for:

  • if-recent was a best effort. v2 tried to return a profile no older than 29 days (2505600 seconds) and, with the default fallback_to_cache=on-error, returned an older one when it failed. v3 holds the limit: the profile you get has a meta.updatedAt within maxAgeSeconds, or you get a 409. The v3 default, 2592000 (30 days), is one day longer than if-recent.
  • if-present never fetched live while we held a copy. A large maxAgeSeconds does the same, but when we hold no copy at all, v3 fetches the profile live.
  • There is no silent fallback. v3 never serves an older copy in place of a failed live fetch. It returns a 409 with cachedProfileAgeSeconds; to accept the older copy, retry with maxAgeSeconds set to at least that value.