LinkedIn profiles, read as clean JSON

Send a profile URL, get 32 fields from one upstream request.

request
curl "$API/profile?url=linkedin.com/in/<slug>"
/profile
The profile as JSON
1 call
/schema
Every field and its source
0 calls
/budget
Requests spent today
0 calls
  • 1 upstream request
  • 197 KB from Voyager
  • 170 records walked
  • 13 positions, 8 schools, 13 publications
response
{
  "ok": true,
  "profile": { … 32 fields },
  "meta": {
    "state": "partial",
    "upstreamRequests": 1,
    "collections": {
      "experience": { "total": 12, "returned": 10,
                      "cap": 10, "state": "truncated" },
      "skills": { "total": 36, "returned": 20,
                  "cap": 20, "state": "truncated" }
    },
    "truncated": ["experience (10/12)", "skills (20/36)"]
  }
}

Experience holds 10 of 12 position groups, so the response says truncated instead of passing for complete.

The 13 lists of one profile response, with what arrived against LinkedIn’s total
listreturnedcapstate
Experience10 of 12 groups10truncated
Skills20 of 3620truncated
Education8 of 820complete
Publications13 of 1320complete
Honors8 of 820complete
Languages2 of 220complete
Certifications1 of 120complete
Volunteering1 of 120complete
Projects0 of 020complete
Courses0 of 020complete

every list carries its count

The console sends one request and lists all 13 collections with LinkedIn’s total, what arrived and the cap. Ten of them are here.

truncated

Experience and skills hit the cap. LinkedIn’s total says more exist upstream, so the list is marked, never passed off as whole.

complete

Returned equals total. Education, publications and honors arrived whole.

empty, and still complete

LinkedIn’s own total is 0, so an empty list is a fact. A null on its own proves nothing.

Read the field list

finds the right person in 170 records

A response carries 11 Profile records. The obvious lookup returns record 100, someone else.

  1. the obvious lookup
  2. included[]
  3. find($type === Profile)
  4. record 100
  5. someone else
  1. the graph walk
  2. data["*elements"][0]
  3. record 104, the subject
  4. *profilePositionGroups
  5. walk(byUrn, jobs)
profile-graph.mjs
export function parseProfile(json) {
  // not included.find($type === PROFILE)
  const urn = json.data["*elements"][0];
  const byUrn = indexIncluded(json.included);
  const subject = byUrn.get(urn);
  const jobs = subject["*profilePositionGroups"];
  return walk(byUrn, jobs);
}

Every list is walked from the subject, never from a $type filter.

four rules for each profile request

All four live in the Worker.

The four rules the Worker applies to every profile request
rulewhyin numbers

Sends one GET per profile

One decoration expands the whole profile graph. Asking per section over GraphQL takes 13 requests for the same data.1 request, not 13

Waits on a 429 instead of retrying

A 429 from LinkedIn starts a one-hour cooldown and a 999 six hours. Retrying is how a warning becomes a ban.429 1 hour cooldown
999 6 hours stopped

Reads the status before parsing

A 302, 410 or 999 never reaches the parser, so a failure never looks like an empty profile.{ "ok": false,
  "error": "RATE_LIMITED" }

Finds new query hashes offline

LinkedIn’s own web bundle names 933 queries. A script reads them with no cookies and no request.933 in the web bundle
481 in the APK

questions

About the account, the limits and what is still unfinished.

Read the operations notes

Does the API need my LinkedIn account?

No. The service holds its own session. Sending x-li-at and x-li-jsessionid headers spends your account instead.

Does LinkedIn allow this API?

No. It breaks section 8.2 of the User Agreement. It is read-only, paced, capped per day, and keeps captured profiles out of version control.

What does the API do with a cut-off list?

It is marked truncated with its total. Paging experience is verified; paging skills still returns HTTP 500.

Does the API refresh its session?

Not yet. LinkedIn renews li_at on page loads, never on API calls. A killed session is detected.

Can I run the API myself?

Yes. npm test runs 103 tests offline with no credentials, then wrangler dev serves it on port 8811.