ScavioScavio
ProductPricingDocs
Sign InGet Started
  1. Home
  2. Tutorials
  3. How to Scrape LinkedIn Posts in n8n
Tutorial

How to Scrape LinkedIn Posts in n8n

Discover LinkedIn posts without login by combining Google SERP site operator with n8n HTTP Request nodes and Scavio.

Get Free API KeyAPI Docs

LinkedIn blocks direct scraping. The safe 2026 pattern uses Google's site:linkedin.com operator to surface public posts and fetches them through Scavio in n8n HTTP Request nodes. No LinkedIn cookies, no account risk.

Prerequisites

  • n8n Cloud or self-hosted
  • A Scavio API key
  • A target keyword or competitor name

Walkthrough

Step 1: Add an n8n Schedule trigger

Run every 30 minutes for fresh signal.

Text
// Schedule Trigger
Interval: 30 minutes

Step 2: Add an HTTP Request node to Scavio

Call Scavio with a site:linkedin.com/posts query.

Text
// HTTP Request node
Method: POST
URL: https://api.scavio.dev/api/v1/search
Headers: x-api-key: {{$env.SCAVIO_API_KEY}}
Body: {
  "query": "site:linkedin.com/posts {{$json.keyword}}",
  "num_results": 20
}

Step 3: Parse organic_results

Each post returns with title (author + snippet) and URL.

JavaScript
// n8n Code node
return items[0].json.organic_results.map(r => ({
  json: { author: r.title.split('|')[0], url: r.link, snippet: r.snippet }
}));

Step 4: Deduplicate against prior runs

Store seen URLs in an n8n Data Table to skip duplicates.

Text
// Data Table node
Action: Upsert
Key: url
Table: linkedin_posts_seen

Step 5: Route new posts downstream

Pipe to Slack, Airtable, or a second workflow for enrichment.

Text
// Slack node
Message: New LinkedIn post by {{$json.author}}: {{$json.url}}

Python Example

Python
import os, requests
API_KEY = os.environ['SCAVIO_API_KEY']

def linkedin_posts(keyword):
    r = requests.post('https://api.scavio.dev/api/v1/search',
        headers={'x-api-key': API_KEY},
        json={'query': f'site:linkedin.com/posts {keyword}', 'num_results': 20})
    return r.json().get('organic_results', [])

for p in linkedin_posts('AI agents gtm'):
    print(p['link'])

JavaScript Example

JavaScript
const API_KEY = process.env.SCAVIO_API_KEY;
export async function linkedinPosts(keyword) {
  const r = await fetch('https://api.scavio.dev/api/v1/search', {
    method: 'POST',
    headers: { 'x-api-key': API_KEY, 'Content-Type': 'application/json' },
    body: JSON.stringify({ query: `site:linkedin.com/posts ${keyword}`, num_results: 20 })
  });
  return (await r.json()).organic_results || [];
}

Expected Output

JSON
List of public LinkedIn posts matching the keyword with author, URL, and snippet. Runs every 30 minutes, new posts only.

Related Tutorials

  • How to Research Etsy Keywords with Scavio

Frequently Asked Questions

Most developers complete this tutorial in 15 to 30 minutes. You will need a Scavio API key (free tier works) and a working Python or JavaScript environment.

n8n Cloud or self-hosted. A Scavio API key. A target keyword or competitor name. A Scavio API key gives you 50 free credits on signup.

Yes. The free tier includes 50 credits on signup, which is more than enough to complete this tutorial and prototype a working solution.

Scavio has a native LangChain package (langchain-scavio), an MCP server, and a plain REST API that works with any HTTP client. This tutorial uses the raw REST API, but you can adapt to your framework of choice.

Related Resources

Best Of

Best LinkedIn Post Scraper for n8n in 2026

Read more
Workflow

LinkedIn Post Monitoring in n8n

Read more
Best Of

Best LinkedIn Data API in 2026

Read more
Comparison

Web Scraping in n8n (HTTP Request + HTML Extract) vs Search API in n8n (HTTP Request to search API)

Read more
Use Case

n8n Search Enrichment Workflow

Read more
Solution

Replace n8n Scraping with Structured API

Read more

Start Building

Discover LinkedIn posts without login by combining Google SERP site operator with n8n HTTP Request nodes and Scavio.

Get Free API KeyRead the Docs
ScavioScavio

Real-time search API for AI agents. Search every platform, not just Google.

Product

  • Features
  • Pricing
  • Dashboard
  • Affiliates

Developers

  • Documentation
  • API Reference
  • Quickstart
  • MCP Integration
  • Python SDK

Alternatives

  • Tavily Alternative
  • SerpAPI Alternative
  • Firecrawl Alternative
  • Exa Alternative

Tools

  • JSON Formatter
  • cURL to Code
  • Token Counter
  • All Tools

© 2026 Scavio. All rights reserved.

Featured on TAAFT
Terms of ServicePrivacy Policy