• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
foxdark410

foxdark410

linkedin-mdp-api

Public
Like
linkedin-mdp-api
Home
Code
2
README.md
H
main.ts
Environment variables
3
Branches
1
Pull requests
Remixes
History
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
Code
/
Search
README.md

LinkedIn DMA → MAC / JSON Resume / RenderCV (Val Town HTTP val)

This project provides a single Val Town HTTP val that reads your LinkedIn DMA (Member Data Portability) snapshot and exports it into several developer‑friendly CV formats. It is designed as a stateless adapter: LinkedIn is the only data source, and all outputs are pure transformations of the exported snapshot.

Supported Formats & Capabilities

  • MAC (Manfred Awesomic CV): JSON format mapped to aboutMe, experience (jobs, volunteering, projects), and knowledge (skills, studies, certifications, publications, awards, languages). MAC format repository
  • JSON Resume: Standardized JSON schema for resumes. Fully populates basics, work, volunteer, education, awards, publications, skills, languages, projects, and certificates. JSON Resume schema
  • RenderCV: Generates a valid YAML structure compatible with the RenderCV CLI and forces a file download (rendercv.yaml). RenderCV documentation
  • Debug APIs: Endpoints to dump the raw LinkedIn memberSnapshotData arrays for inspection.

LinkedIn DMA / Portability API

This val uses LinkedIn’s Member Data Portability (DMA) APIs (memberSnapshotData endpoint).

  • Official Documentation: Microsoft Learn - Member Data Portability
  • Supported Domains List: Snapshot Domains

⚠️ Important API Limitations

  1. Geographic Eligibility: The DMA Member Data Portability APIs are designed to comply with the EU Digital Markets Act. They are available only to members located in the European Economic Area (EEA) and Switzerland.
  2. Monolingual Export: The API typically exports profile data in one primary language only. If you maintain multiple localized versions of your profile in the UI, only the primary language might appear in the snapshot.
  3. Structural Differences: The data returned does not replicate the LinkedIn UI exactly. Missing cross-domain relationships (e.g., skills linked to specific jobs) or empty sections might occur depending on your privacy settings.

Architecture Overview

The Val Town script acts as a single HTTP handler:

  1. Token Extraction: Expects an access token via the Authorization: Bearer <token> header, a ?token= query parameter, or a Val Town environment variable (token).
  2. Optimized Aggregation (LIFullProfile): To minimize HTTP calls, CV generation endpoints use a single, paginated API request without specifying a domain. This automatically fetches all available snapshot data at once, saving time and rate limits.
  3. Format Mappers: Transforms the aggregated model into MAC, JSON Resume, or RenderCV models without relying on third-party schemas for the internal state.

HTTP Endpoints (All GET)

GET /profile

Returns the aggregated LIFullProfile JSON object containing all fetched domains. Useful for quick diagnostics.

GET /mac

Returns a JSON object strictly mapped to the Manfred Awesomic CV format. Includes extracted profile images from RICH_MEDIA.

GET /jsonresume

Returns a JSON Resume compatible object.

GET /rendercv

Downloads a generated rendercv.yaml file. The output is converted from JSON to a valid YAML structure using the standard yaml package and is served with a Content-Disposition: attachment header.

GET /debug

Allows inspection of the raw, unmapped data structures returned by LinkedIn.

  • GET /debug: Returns an HTTP 400 error (requires a query parameter).
  • GET /debug?analyzeDomains: Scans your entire snapshot and returns a summary counting the number of items found inside each domain.
  • GET /debug?domains: Fetches all available domains for your account in a single optimized request and returns the full JSON.
  • GET /debug?domains=PROJECTS: Fetches exactly 1 domain using a direct domain=PROJECTS API call.
  • GET /debug?domains=PROJECTS,SKILLS: Fetches all data using the optimized single-request algorithm, then filters and returns only the requested domains locally.

Deployment on Val Town

  1. Create a new HTTP val on Val Town.
  2. Paste the provided TypeScript code.
  3. Add your LinkedIn DMA access token as a token environment variable in the Val settings (or pass it in your requests).
  4. Visit your val's URL with the desired endpoint appended (e.g., https://<your-val>.web.val.run/rendercv).
Code
README.md
H
main.ts
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
AboutAlternativesPricingBlogNewsletterCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2026 Val Town, Inc.