Skip to main content
1

Description

First, this recipe reads a list of LinkedIn profile urls from a CSV file. Then, it builds a Bulk Person Enrichment API request from them and executes the query. Finally, it saves the output to a CSV file.
2

Initial Setup

If using the Python SDK, import the SDK library and initiate the client object. Otherwise, specify the Bulk Person Enrichment API endpoint.
3

Initialize Arrays

We initialize the array that will contain the list of LinkedIn profile URLs that we want to enrich. We also initialize the array that will contain the output from our query.
4

Set API Key

If using the Python SDK, we place our API key for authentication in the client class constructor.Otherwise, we place our API key for authentication in the header fields of our request. Alternatively, we could have added the API Key into the input parameters.
5

Read List of LinkedIn Profiles

We read a CSV file that contains a list of LinkedIn profiles and parse them.Example CSV file: https://drive.google.com/file/d/1CrNXR6lCDEVY_Vvpn2QAWbidxhxCe3dg/view?usp=sharing
6

Adds each row to the Requests Array

As we iterate through the list of LinkedIn profile URLs, we add the current URL to our requests array.
7

Execute Bulk Person Enrichment API Query

We execute our Bulk Person Enrichment API query from the requests array that we have built.
8

Iterate Through Query Responses

For each response returned by the Bulk Person Enrichment API, we add the results to our output array while checking for errors.
9

Output Results to a CSV File

Finally, using our output array, we write a set of fields to a CSV file for each person in our list.