Skip to content
Docs

Lempile Direct

Unipile's LinkedIn API paths, fields and errors, served by Lempile from each account's own browser session, without a browser per call.

Lempile Direct is a LinkedIn API that answers Unipile's paths, fields, status codes and error types, at https://direct.lempile.com/api/v1, without opening a browser for each call.

A client written for Unipile points at Direct by changing two things: its base URL and its API key. Anything Direct doesn't do answers Unipile's own 501 errors/feature_not_implemented, so such a client can fall back to Unipile for that call.

Text
your app -> Direct (X-API-KEY) -> the account's own session and proxy -> LinkedIn's own API

How It Works#

  • Every LinkedIn account Direct serves is a Lempile account: a real browser on Lempile's browser server, signed in to LinkedIn, with its own proxy.
  • Direct reads that browser's LinkedIn session (cookies, user agent, client hints) through a signed internal route, keeps it encrypted for up to 6 hours, and reads it again when LinkedIn refuses it.
  • Each call goes to LinkedIn's own web API through the account's own proxy, with the connection fingerprint of the account's Chrome version. LinkedIn sees the same browser, the same address and the same session it always sees from that account.
  • Calls are paced per account: one at a time, 1.5 to 3 seconds apart, at most 1,500 a day, and a 15-minute rest when LinkedIn says "too many".
  • Answers are LinkedIn's data reshaped into Unipile's objects (UserProfile, Chat, Message, Post…). The test suite checks the read answers against Unipile's published response schemas.

60-Second Quickstart#

Shell
export DIRECT_API_KEY="your-api-key"

# The LinkedIn accounts your key can use.
curl -sS "https://direct.lempile.com/api/v1/accounts" \
  -H "X-API-KEY: $DIRECT_API_KEY"

# Who an account is on LinkedIn.
curl -sS "https://direct.lempile.com/api/v1/users/me?account_id=$ACCOUNT_ID" \
  -H "X-API-KEY: $DIRECT_API_KEY"

The Quick Start connects an account, sets up a webhook and tries a first write without sending it.

What It Covers#

Area Routes
Accounts list, retrieve, resync, delete; hosted auth link to connect or reconnect one
Webhooks create, list, delete; messaging (message_received), users (new_relation), account_status
Users and profiles the account's own profile, any profile with its sections, lookup by profile URL
Relations and invitations connections, sent invitations, invite, withdraw
Chats and messages chats, one chat, messages, one message, attendees; start a chat, send a message, files
Posts a member's or a company's posts, one post; create (text, mentions, images, a video), delete
Comments and reactions comments and replies, reactions; comment, reply, react, and Direct's own delete routes
Company search LinkedIn's classic company search, by keywords

The Unipile Compatibility page lists every Unipile route, what Direct does with it, and where it differs.

How It Differs From Unipile#

  • LinkedIn only. No email, calendar, WhatsApp or other providers. No Sales Navigator, Recruiter or group conversations.
  • Lempile accounts. An account id is a Lempile account id. Accounts connect through Lempile's own real-browser sign-in (the hosted auth link), and stay in Lempile's browsers.
  • Paced per account. Daily caps on calls and writes, and a rest after LinkedIn's "too many", answered as Unipile's 429 with retry_after. See Errors And Limits.
  • Messages in real time, relations by polling. Direct keeps LinkedIn's own live connection open for each account, so a message reaches your webhook within seconds, day and night; a read of the inbox now and then catches anything it missed. New relations come from reading them every 30 to 60 minutes.
  • Writes are off by default for each account, until Lempile turns them on for it.
  • Extras Unipile doesn't have: ?dry_run=true on every write (the exact LinkedIn call, not sent), an Idempotency-Key header that never writes twice, and routes to delete a comment and to remove a reaction.

When To Use It#

Use Direct when:

  • your LinkedIn accounts are (or can be) connected in Lempile;
  • you have a Unipile integration and want the same calls served from the account's own browser session and address;
  • you want to see a write's exact LinkedIn call before sending it, and retry writes safely.

Keep Unipile (or fall back to it on 501) when you need another provider, Sales Navigator or Recruiter, people, post or job search, group conversations, or webhook events within seconds.

Production Host#

Text
https://direct.lempile.com/api/v1

The OpenAPI document is public at https://direct.lempile.com/api/v1/openapi.json, and a reference page draws it at https://direct.lempile.com/docs.

Next#

Was this page helpful?