Get Raw Data Route Example
Learn how to use Magic Route
The Get raw data route (Magic route) is intended for advanced users who wish to use LinkedIn's features beyond our current capabilities. It enables you to create custom functionalities that are not yet supported by our platform, using connected accounts. To utilize this route, you will need to identify the specific endpoint containing the desired data using web developer tools on LinkedIn, and then copy the URL along with its parameters for implementation.
Identify Linkedin Enpoint
- Open your browser's Web Developer Tools and go to the 'Network' tab to capture all requests. Perform the action for which you want to collect data. Identify which request corresponds to the action on LinkedIn, then click on it to view the details.
- Copy the relevant value into our interactive documentation. For instance, if you're searching for people using LinkedIn's main Search:
- The output should resemble the first example provided below.
- Confirm that you have received the raw data you want by trying it with our interactive documentation.
- Finally, integrate this data into your code, adjusting the variables for keywords or pagination as necessary.
Extract List Search People
curl --request POST \
--url https://{YOUR_DSN}/api/v1/linkedin \
--header 'X-API-KEY: XXXX' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"query_params": {
"variables": "(start:0,origin:SWITCH_SEARCH_VERTICAL,query:(keywords:test,flagshipSearchIntent:SEARCH_SRP,queryParameters:List((key:resultType,value:List(PEOPLE))),includeFiltersInResponse:false))",
"queryId": "voyagerSearchDashClusters.a3ebd8258d1b429e3d95ff512f377687"
},
"account_id": "OZGxjR7sRpGO2fonFezxTg",
"method": "GET",
"request_url": "https://www.linkedin.com/voyager/api/graphql",
"encoding": false
}
'
Sales Navigator Search Export
curl --request POST \
--url https://{YOUR_DSN}/api/v1/linkedin \
--header 'X-API-KEY: XXXX' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"query_params": {
"q": "searchQuery",
"query": "(spellCorrectionEnabled:true,recentSearchParam:(id:3090334778,doLogHistory:true),keywords:developers)",
"start": "0",
"count": "25",
"decorationId": "com.linkedin.sales.deco.desktop.searchv2.LeadSearchResult-14"
},
"account_id": "OZGxjR7sRpGO2fonFezxTg",
"method": "GET",
"request_url": "https://www.linkedin.com/sales-api/salesApiLeadSearch",
"encoding": false
}
'
Recruiter Search
Be careful, "decoration" is fully encoded, while "query" and "requestParams" has partial encoding
curl --request POST \
--url https://{YOUR_DSN}/api/v1/linkedin \
--header 'X-API-KEY: XXXX' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"account_id": "XXXjR7sRpGO2fonFezxTg",
"method": "POST",
"request_url": "https://www.linkedin.com/talent/search/api/talentRecruiterSearchHits",
"encoding": false,
"headers": { "Content-Type": "application/x-www-form-urlencoded", "x-http-method-override": "GET" },
"body": {
"decoration": "%28entityUrn%2ClinkedInMemberProfileUrn~%28entityUrn%2CreferenceUrn%2Canonymized%2CunobfuscatedFirstName%2CunobfuscatedLastName%2CmemberPreferences%28openToNewOpportunities%29%2CcanSendInMail%2CcontactInfo%28primaryEmail%2CweChat%29%2CcurrentPositions%2A%28company~%2CcompanyName%2Ctitle%2CstartDateOn%2CendDateOn%2Cdescription%2Clocation%2CprofileResume%29%2Ceducations%2A%28school~%28entityUrn%2Cname%29%2CorganizationUrn~%2CschoolName%2CdegreeName%2CstartDateOn%2CendDateOn%29%2CfirstName%2CfullProfileNotVisible%2CfullProfileNotVisibleReason%2Cheadline%2CindustryName%2ClastName%2Clocation%28displayName%29%2CnetworkDistance%2CnumConnections%2CprivacySettings%28allowConnectionsBrowse%2CshowPremiumSubscriberIcon%29%2CcurrentResumePosition%2CprofilePicture%2CpublicProfileUrl%2Cunlinked%2CvectorProfilePicture%2CworkExperience%2A%28company~%28entityUrn%2Cindustries%2Cname%29%2CcompanyName%2Ctitle%2CstartDateOn%2CendDateOn%2CprofileResume%29%2ChasProfileVerifications%29%2CrecruitingProfile~%28entityUrn%2Ccandidate%2CcurrentHiringProjectCandidate%28created%2ClastModified%2CentityUrn%2ChiringProject~%28entityUrn%29%2CcandidateHiringState~%2CsourcingChannel~%28entityUrn%2CchannelType%29%29%2ChiddenCandidate%2ChiringContext%2Cnotes%2A%28candidate%2CchildNotes%2A%28candidate%2CchildNotes%2A%2Ccontent%2Ccreated%2CentityUrn%2ChiringContext%2ClastModified%2Cowner~%28entityUrn%2Cprofile~%28entityUrn%2CfirstName%2ClastName%2Cheadline%2CprofilePicture%2CvectorProfilePicture%2CpublicProfileUrl%2CfollowerCount%2CnetworkDistance%2CautomatedActionProfile%29%29%2Cproject%2CmessageModified%2Cmessage%2CparentNote%2Cvisibility%2CsourceType%29%2Ccontent%2Ccreated%2CentityUrn%2ChiringContext%2ClastModified%2Cowner~%28entityUrn%2Cprofile~%28entityUrn%2CfirstName%2ClastName%2Cheadline%2CprofilePicture%2CvectorProfilePicture%2CpublicProfileUrl%2CfollowerCount%2CnetworkDistance%2CautomatedActionProfile%29%29%2Cproject%2CmessageModified%2Cmessage%2CparentNote%2Cvisibility%2CsourceType%29%2CprofileUrl%2Cprospect%2Ctags%2A%29%2ChiringProjectRecruitingProfile~%3AhiringProjectRecruitingProfile%28entityUrn%2Ccandidate%2CcurrentHiringProjectCandidate%28entityUrn%2Ccreated%2ClastModified%2CaddedToPipeline%28time%2Cactor~%28profile~%28entityUrn%2CfirstName%2ClastName%2Cheadline%2CprofilePicture%2CvectorProfilePicture%2CpublicProfileUrl%2CfollowerCount%2CnetworkDistance%2CautomatedActionProfile%29%29%29%2ChiringProject~%28entityUrn%2ChiringProjectMetadata%28hiringPipelineEnabled%2Cstate%29%29%2CcandidateHiringState~%2CsourcingChannel~%28entityUrn%2CchannelType%29%29%2ChiddenCandidate%2ChiringContext%2ClastActivity~%28activityType%2Cperformed%28time%2Cactor~%28entityUrn%2CfirstName%2ClastName%2Cheadline%2CprofilePicture%2CvectorProfilePicture%2CpublicProfileUrl%2CfollowerCount%2CnetworkDistance%2CautomatedActionProfile%29%29%2CperformedByViewer%2ChiringActivityData%29%2CsourcingChannel%2CsourcingChannelCandidates%2A%2C~hiringProjectCandidatesCount%28paging%29%29%2CcandidateInsights%28candidateSearchInsightsUrn~%28positionsInsight%2CyearsOfExperience%2CentityUrn%29%29%2CtopFeatures%28interested%28interestLikelihood%2Cgroups%29%29%29",
"count": 25,
"q": "recruiterSearch",
"query": "(capSearchSortBy:RELEVANCE,titles:List((text:Python%20Developer,entity:urn%3Ali%3Ats_title%3A25169,negated:false,required:false,selected:true)),titleScope:CURRENT_OR_PAST,occupations:List((occupationName:Software%20Engineer,occupationTitle:urn%3Ali%3Ats_title%3A9,negated:false,required:false)),skills:List((text:Python%20%28Programming%20Language%29,entity:urn%3Ali%3Ats_skill%3A1346,negated:false,required:false,selected:true)),skillScope:ALL_PROFILE_SKILLS,facetSelections:List((type:BING_GEO_SWR,valuesWithSelections:List((text:Kochi%2C%20Kerala%2C%20India,value:100100512,selected:true,negated:false,required:false)))),facets:List(BING_GEO_SWR,TALENT_POOL))",
"requestParams": "(doFacetCounting:true,doFacetDecoration:true,uiOrigin:GLOBAL_SEARCH_HEADER,reset:List(TITLES,TITLE_SCOPE),resetProfileCustomFields:List())",
"start": 0
}
}
Updated 19 days ago