Pagination on next url Linkedin API

Describe the problem/error/question

I’m having trouble with adding pagination on the HTML node. It works fine with my setup before adding so I know the URL is correct and if I manually call the URL: https://api.linkedin.com/rest/posts?q=author&author=urn%3Ali%3Aorganization%3A84301908&count=100&start=100" to get the next page/group the data comes back fine. So I believe the issue is how I have the pagination option is setup in the HTTP call.

The error I’m getting is “The resource you are requesting could not be found”

Returned from first call:

  {
    "paging": {
      "start": 0,
      "count": 100,
      "links": [
        {
          "type": "application/json",
          "rel": "next",
          "href": "/rest/posts?q=author&author=urn%3Ali%3Aorganization%3A84301908&count=100&start=100"
        }
      ],
      "total": 176
    },
    "elements": []
  }
]

What is the error message (if any)?

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 1.42.1
  • Database (default: SQLite): n/a
  • n8n EXECUTIONS_PROCESS setting (default: own, main): n/a
  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
  • **Operating system:**n/a

So if any one runs into this issue. Using the option for response contains the url. Only input the href directory do not try to rebuilt the initially called domain. So essentially in my flow the page was trying to go to https://api.linkedin.com/rest/posthttps://api.linkedin.com/rest/post/rest/posts?q=author&author=urn%3Ali%3Aorganization%3A84301908&count=100&start=100

1 Like

Hi @Philip_Wiggins ,

Thank you for sharing your solution!

If I may I’ll also add, in case it helps other users further, linkedin API is now on v2 and they suggest the version be called in the request url: https://api.linkedin.com/v2/{service}

A little off topic, but can’t find much help searching. Sounds like you know the LinkedIn APIs. Is there a better way to get all post that I have made as a company getting the text of the post and then also getting the summary of shares, comments, likes,etc for each post?

I’m running into issues right now that I can’t find any help on. To get all this data I have to make multiple calls as it limits responses but then I’m being limited to 10 calls per around 12 hour period.

This is my full flow. I call make a call to get all my post and their text. Then I make a call to get the share or ugcPost granular data.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.