TryzenAPI

Importing leads from LinkedIn

Fill a list from a LinkedIn people search, a company search, the people who reacted to a post, or a HubSpot list.

An import fills a list from LinkedIn. You hand Tryzen a LinkedIn URL and one of your connected senders; that sender's account reads the results, page by page, at a slow human pace, and every person (or company) lands in the list you named. People already in your workspace are matched, never duplicated.

Imports need a key with leads: manage (leads: view is enough to follow one).

ImportRouteFillsUp to
People searchPOST /v1/imports/linkedin-searcha people list1,000 people
Company searchPOST /v1/imports/linkedin-company-searcha company list1,000 companies
Post reactorsPOST /v1/imports/linkedin-post-reactorsa people list10,000 people
Event attendeesPOST /v1/imports/linkedin-event-attendeesa people list10,000 people
Recruiter searchPOST /v1/imports/linkedin-recruiter-searcha people list1,000 people
HubSpot listPOST /v1/imports/hubspot-lista people list10,000 contacts

All of them answer 201 with the import at once, then work in the background. An import can take hours or days: see Pacing.

Pick a sender

curl -s "$TRYZEN_API/v1/imports/linkedin-search/senders" -H "x-api-key: $TRYZEN_KEY"

This lists the connected senders that can run an import, for all three kinds. Results are what that sender sees (its connections, its network degree), so pick the account whose view you want. browserSearch: true means the sender has a browser set up, which only some people searches need (below).

The target list

Every import takes the same target:

  • { "kind": "new", "name": "Q1 founders" } creates the list, or
  • { "kind": "existing", "listId": "…" } adds to a list that isn't being filled by another import.

A people search and a post reactors import fill a people list; a company search fills a company list. Picking the wrong kind of existing list is a 409 (company_list or people_list).

Paste the URL of a LinkedIn people search (https://www.linkedin.com/search/results/people/?…) exactly as your browser shows it:

curl -s -X POST "$TRYZEN_API/v1/imports/linkedin-search" \
  -H "x-api-key: $TRYZEN_KEY" -H "content-type: application/json" \
  -d '{
    "url": "https://www.linkedin.com/search/results/people/?keywords=founder&network=%5B%22S%22%5D",
    "senderId": "…",
    "target": { "kind": "new", "name": "Founders, 2nd degree" },
    "maxResults": 500
  }'
FieldTypeNotes
urlstring, ≤ 4,096A LinkedIn people search URL
senderIdstringA connected sender of this workspace
targetobjectSee The target list
maxResultsinteger 1–1,000Optional, default 1,000

With keywords and only Connections, Locations, Current company, School or Services, the results are read directly, 12 per page. Any other filter (Industry, Past company, Title, …) is read in the sender's own browser, 10 per page, so it is slower and the sender needs browserSearch: true; otherwise the answer is 422 search_url_invalid with one browser_required problem per such filter. Sales Navigator URLs aren't supported.

Paste the URL of a LinkedIn company search (https://www.linkedin.com/search/results/companies/?…):

curl -s -X POST "$TRYZEN_API/v1/imports/linkedin-company-search" \
  -H "x-api-key: $TRYZEN_KEY" -H "content-type: application/json" \
  -d '{
    "url": "https://www.linkedin.com/search/results/companies/?keywords=fintech",
    "senderId": "…",
    "target": { "kind": "new", "name": "Fintech companies" }
  }'

The body has the same four fields as the people search (maxResults 1–1,000, default 1,000). Only keywords and five filters are allowed: Headquarters location, Industry, Company size, Job listings and Connections. Any other filter is refused (422 search_url_invalid), because LinkedIn would ignore it and the import would be bigger than the search you saw. Any connected sender works, no browser needed. Each company comes with its website, size and logo when LinkedIn has them. In the import's counts, the numbers are companies.

Post reactors

Paste the URL of a LinkedIn post. Everyone who reacted to it becomes a lead; pick one reaction type to import only those people.

curl -s -X POST "$TRYZEN_API/v1/imports/linkedin-post-reactors" \
  -H "x-api-key: $TRYZEN_KEY" -H "content-type: application/json" \
  -d '{
    "url": "https://www.linkedin.com/posts/jane-doe_launch-day-activity-7000000000000000000-AbCd",
    "reactionType": "PRAISE",
    "senderId": "…",
    "target": { "kind": "new", "name": "Launch post, Celebrate" }
  }'
FieldTypeNotes
urlstringA LinkedIn post URL (forms below)
reactionTypestringOptional; leave it out for every reaction
senderIdstringA connected sender of this workspace; no browser needed
targetobjectA people list, see The target list
maxResultsinteger 1–10,000Optional, default 10,000

The post URL can be any of these forms (on www.linkedin.com or a country subdomain; anything after ? or # is ignored):

  • https://www.linkedin.com/posts/<author>_<words>-activity-<id>-<code> (the post's Copy link)
  • https://www.linkedin.com/posts/<author>_<words>-ugcPost-<id>-<code>
  • https://www.linkedin.com/feed/update/urn:li:activity:<id>/
  • https://www.linkedin.com/feed/update/urn:li:ugcPost:<id>/ (also with the URN URL-encoded)

Anything else, including a urn:li:share: link for now, is 422 post_url_invalid before anything is read.

reactionTypeLinkedIn shows it as
LIKELike
PRAISECelebrate
EMPATHYLove
INTERESTInsightful
APPRECIATIONSupport
ENTERTAINMENTFunny

Reactors are read 10 per page. A company page that reacted is never a lead: it is counted in counts.invalid. progress.total is the post's reaction count (capped at maxResults), so it can be a little higher than the people you end up with. Comments aren't imported, only reactions.

Event attendees

Paste the URL of a LinkedIn event (any of its tabs: https://www.linkedin.com/events/<name><id>/). The people attending it become leads. LinkedIn shows the attendees only to people who attend, so pick a sender that is attending the event.

curl -s -X POST "$TRYZEN_API/v1/imports/linkedin-event-attendees" \
  -H "x-api-key: $TRYZEN_KEY" -H "content-type: application/json" \
  -d '{
    "url": "https://www.linkedin.com/events/launchday7000000000000000000/",
    "senderId": "…",
    "target": { "kind": "new", "name": "Launch day attendees" }
  }'

maxResults is 1–10,000 (default 10,000). Attendees are read 10 per page. A URL that isn't an event is 422 event_url_invalid.

Run a search in LinkedIn Recruiter (or Recruiter Lite) and paste the address bar of its results: https://www.linkedin.com/talent/hire/<project>/discover/recruiterSearch?searchHistoryId=<id>… or https://www.linkedin.com/talent/search?searchHistoryId=<id>…. The sender's LinkedIn account needs a Recruiter seat: GET /v1/imports/linkedin-recruiter/senders lists the connected senders, each with recruiter: true | false. The body has the same fields as the event import; maxResults is 1–1,000 (default 1,000), read 25 per page.

HubSpot list

Import the contacts of a HubSpot contact list, static or active (dynamic). This one doesn't read LinkedIn and needs no sender: Tryzen reads the list with the workspace's HubSpot connection, 100 contacts at a time, and each contact's LinkedIn profile URL comes from a contact property you pick. First name, last name, company, job title and email come along.

It needs HubSpot connected in Settings → Integrations with the list permissions. A connection made before list imports existed doesn't have them: the routes answer 409 hubspot_lists_not_granted and GET /v1/integrations shows hubspot.listImport: false; reconnect HubSpot once to fix it.

# The portal's contact lists (query = words in the name; page with nextCursor)
curl -s "$TRYZEN_API/v1/imports/hubspot-list/lists?query=q4" -H "x-api-key: $TRYZEN_KEY"
# Its text contact properties, the ones that say LinkedIn first
curl -s "$TRYZEN_API/v1/imports/hubspot-list/fields" -H "x-api-key: $TRYZEN_KEY"

curl -s -X POST "$TRYZEN_API/v1/imports/hubspot-list" \
  -H "x-api-key: $TRYZEN_KEY" -H "content-type: application/json" \
  -d '{
    "hubspotListId": "123",
    "linkedinUrlProperty": "linkedin_profile_url",
    "target": { "kind": "new", "name": "Q4 target accounts" }
  }'
FieldTypeNotes
hubspotListIdstring of digitsFrom …/hubspot-list/lists
linkedinUrlPropertystringA property name from …/hubspot-list/fields
targetobjectA people list, see The target list
maxResultsinteger 1–10,000Optional, default 10,000
updateExistingbooleanOptional, default false: overwrite the profile fields of leads that already exist
  • A contact with nothing in that property, or something that isn't a LinkedIn profile URL, is skipped and counted in counts.invalid (the reason, by position in the list, in rejectedSample). linkedin.com/in/… without https:// is fine.
  • A list is read once. An active list is a snapshot of its members while the import runs, not a sync: run the import again to pick up people added later (people already in the list are matched, not added twice).
  • progress.total is HubSpot's member count (capped at maxResults) and becomes the exact number read at the end; source.crm names the HubSpot list.
  • When HubSpot is busy (429), the import waits and goes on. It ends failed with hubspot_list_not_found (the list was deleted), hubspot_unauthorized (reconnect HubSpot), hubspot_lists_not_granted or hubspot_not_connected.

Not live yet. Event attendees and Recruiter searches are new sources. Until we have checked LinkedIn's calls for them, an import starts, then ends failed with search_unavailable without anything being read or sent to LinkedIn. The routes, the target list and the progress work as for the other imports.

Follow an import

curl -s "$TRYZEN_API/v1/imports/$IMPORT_ID" -H "x-api-key: $TRYZEN_KEY"
  • status: pending, importing, then completed, failed or cancelled. An import that is waiting (between pages, for the sender's working hours or its daily budget) stays importing.
  • progress.offset out of progress.total: results read so far. total is null until the first page.
  • counts: created (new leads), existing (already in the workspace), addedToList, alreadyInList, invalid (results that can't be a lead: a hidden "LinkedIn Member", a company page that reacted).
  • error.code when it failed: for example sender_stopped (LinkedIn logged the account out or wants a check; reconnect it), search_unavailable (LinkedIn didn't answer the search as expected; nothing partial is imported from that page), proxy_unreachable, search_read_failed.

GET /v1/imports?listId=… lists a list's imports, newest first.

Stop an import with POST /v1/imports/{importId}/cancel. It answers 202 at once; the import turns cancelled when the job has stopped, and the leads it added leave the list (they stay in the workspace).

Pacing

Imports read LinkedIn through the sender's own account, so they follow the same rules as everything else it does (see Safety and pacing):

  • Reads share the sender's daily search budget and working hours. People search, company search and post reactor pages all count against one budget per sender per day, in the sender's time zone. When it is used up, the import waits for the next day.
  • Pages are read one at a time with human gaps between them and a longer break every few pages.
  • One sender per import. Two imports on the same sender take turns.

So a 10,000-reactor post takes days, not minutes. That is on purpose.

Errors when you start an import

CodeStatusWhat to do
search_url_invalid422The search URL can't be imported. error.problems lists every reason (code, parameter, message); fix them and send again
post_url_invalid422Not a post URL we can read (see the forms above). error.problems says why
event_url_invalid422Not a LinkedIn event URL. error.problems says why
recruiter_url_invalid422Not a Recruiter search's results URL. error.problems says why
recruiter_required409The sender's LinkedIn account has no Recruiter seat: pick one that has
sender_not_found404The senderId isn't in this workspace
sender_not_connected409The sender isn't connected (or can't search right now): reconnect it, or pick another
list_busy409Another import is filling that list: wait for it, or pick another list
company_list409People go into a people list; that one is a company list
people_list409Companies go into a company list; that one is a people list
list_not_found404The listId isn't in this workspace
jobs_unavailable503The import couldn't start; nothing was read and the list is free again. Retry shortly
hubspot_not_connected409HubSpot lists: connect HubSpot in Settings → Integrations first
hubspot_lists_not_granted409HubSpot lists: the connection can't read lists; reconnect HubSpot
hubspot_list_not_found404HubSpot lists: HubSpot has no list with that id
hubspot_unauthorized409HubSpot lists: HubSpot no longer accepts the connection; reconnect it
hubspot_rate_limited429HubSpot lists: HubSpot is busy; retry in a minute
hubspot_unavailable503HubSpot lists: this server has no HubSpot app set up

Problem messages name the parameter, never its value, so they are safe to show to your users.

On this page