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

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.

  1. Select LinkedIn Pages from the drop-down list of applications
  2. Under Authorization, click Connect to LinkedIn (if you haven't already).
  3. You will be directed to LinkedIn and asked to authorize the connection. Click Allow.
  4. 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.

  1. Under Endpoint, choose /organizationPageStatistics?q=organization. This will return pageview stats about your organization's LinkedIn page.
  2. In the Request parameters section, click the organization parameter and select your organization ID from the dropdown menu.
  3. The other required parameter is timeIntervals. Choose a start and end date, as well as a time breakdown (day or month).
  4. 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).
  5. 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.

  1. Set your destination cell to B1. This will give us space in column A for a formula
  2. Add this formula into empty cell A2 (just change BR to whichever column contains elements.timeRange.start): =arrayformula(if(BR2:BR<>"",(BR2:BR/1000)/86400+date(1970,1,1),""))
  3. 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 1111111.

  • ApplicationCustom
  • MethodGET
  • Request URL,end:1658414640000,timeGranularityType:MONTH))
  • OAuthLinkedIn Pages
  • Headers
    • X-Restli-Protocol-Version: 2.0.0

Part 6: API Documentation

Official API documentation:

To view or manage the API Connector connection on LinkedIn's side, click this link:

8 thoughts on “Import LinkedIn Pages Data to Google Sheets”

  1. Hello Ana,

    I'd like to create triggers for LinkedIn Pages requests to run daily. Is there a way to set a dynamic date range (always yesterday) for these requests? And if so, is it necessary to create a custom request or can it be done directly in LinkedIn Pages?

    Greetings and thanks.

    • Hey Luis, for now you need to do this as a custom request. I think the easiest way will be to set up your request using the LinkedIn Pages preset connection, then tick the "Add request URL" option under Output options > More options before you run it. That way you can see your whole request URL and copy/paste it into a custom request. Then instead of hard-coding in the dates, reference cells containing dynamic dates as described here. That article has an example of how to include dynamic dates in your request.
      Update: you can now reference dynamic date cells through the preset integration too, not just through custom requests.

    • Good question. Unfortunately the LinkedIn API is really lacking in functionality (and documentation). You can get a list of posts using a request URL like this: However that list doesn't come back with any useful engagement data, and their documentation doesn't seem to indicate that this data is available. I'll update this post if I find anything different.

  2. Hello I have followed your tutorial in July 2023 but I have an error, do you know where It can come from ? There is the message : Completed with errors
    - We received an error from (403) show response
    {"status":403,"serviceErrorCode":100,"code":"ACCESS_DENIED","message":"Field Value validation failed in PARAMETER: Data Processing Exception while processing fields [/organization]"}

    • I can replicate this error message when I enter an incorrect value to the organizationalEntity parameter. Can you please click the refresh icon next to that field and select one of the values that appears in the dropdown list (rather than entering your own value)? Let me know if you continue to see this error after that.


Leave a Reply to Ana Cancel reply

Jump To