LinkedIn profiles, read as clean JSON
Send a profile URL, get 32 fields from one upstream 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
{
"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.
| list | returned | cap | state |
|---|---|---|---|
| Experience | 10 of 12 groups | 10 | truncated |
| Skills | 20 of 36 | 20 | truncated |
| Education | 8 of 8 | 20 | complete |
| Publications | 13 of 13 | 20 | complete |
| Honors | 8 of 8 | 20 | complete |
| Languages | 2 of 2 | 20 | complete |
| Certifications | 1 of 1 | 20 | complete |
| Volunteering | 1 of 1 | 20 | complete |
| Projects | 0 of 0 | 20 | complete |
| Courses | 0 of 0 | 20 | complete |
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.
finds the right person in 170 records
A response carries 11 Profile records. The obvious lookup returns record 100, someone else.
- the obvious lookup
included[]find($type === Profile)- record 100
- someone else
- the graph walk
data["*elements"][0]- record 104, the subject
*profilePositionGroupswalk(byUrn, jobs)
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.
| rule | why | in 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, |
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 |
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.