Search API Connector Documentation
Import LinkedIn Pages Data to Google Sheets
In this guide, we will pull data from the LinkedIn Organization (aka Pages) API directly into Google Sheets, using the API Connector add-on for Sheets.
With this connection you should be able to retrieve most of the metrics available to you when you click the Analytics tab while logged into the admin section of your LinkedIn company account. You can also access limited public data about other organizations.
- Before You Begin
- Part 1: Connect to the LinkedIn Pages API
- Part 2: Get your Organization ID
- Part 3: Pull Data from LinkedIn Pages to Sheets
- Part 4: Handle Dates
- Part 5: Create a Custom Request
- Part 6: API Documentation
Before You Begin
Click here to install the API Connector add-on from the Google Marketplace.
Part 1: Connect to the LinkedIn Pages API
The easiest way to get started with the LinkedIn Pages API is through API Connector’s built-in integration.
- Select LinkedIn Pages from the drop-down list of applications
- Under Authorization, click Connect to LinkedIn Pages
- You will be directed to LinkedIn and asked to authorize the connection. Click Allow.
- You’ll now be returned to your Google Sheet, and can verify that your LinkedIn API connection is active.
Part 2: Get your Organization ID
Get your organization ID by looking in the URL while logged into your LinkedIn company page.
Note this ID as we'll need it for our requests.
Part 3: Pull Data from LinkedIn Pages to Sheets
Now that we’re connected, let’s pull some data into Sheets.
- Under Endpoint, choose
/organizationPageStatistics?q=organization. This will return pageview stats about your organization's LinkedIn page.
- The first required parameter is
organization. Enter your organization ID using this exact syntax:
- The other required parameter is
timeIntervals. Choose a start and end date, as well as a time breakdown (day or month).
- Select a destination sheet, name your request, and click Run. A moment later you’ll see a lot of information about your LinkedIn page populate your sheet. This report contains pageviews broken down by multiple facets (device, industry, etc).
- To filter for just the fields you need, click Edit Fields to open API Connector's visual field editor. There you can filter out all the columns you don't want to see in this report.
Part 4: Handle Dates
The LinkedIn Pages API uses UNIX timestamps. Here's how to see "standard" dates in your sheet instead.
- Set your destination cell to B1. This will give us space in column A for a formula
- Add this formula into empty cell A2 (just change BR to whichever column contains elements.timeRange.start):
- You should now see your data broken down by human-readable dates (use Sheets' built-in date format picker to select the exact format you want).
Part 5: Create a Custom Request
Alternatively, you can create a custom request instead of using API Connector’s built-in integration, using any of the endpoints and parameters shown in the documentation. Here's an example request setup. Substitute in your own organization ID where it reads
- Request URL:
Part 6: API Documentation
To view or manage the API Connector connection on LinkedIn's side, click this link: https://www.linkedin.com/psettings/permitted-services