ScavioScavio
ToolsPricingDocs
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/v2/google
Headers: Authorization: Bearer {{$env.SCAVIO_API_KEY}}
Body: {
  "query": "site:linkedin.com/posts {{$json.keyword}}"
}

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/v2/google',
        headers={'Authorization': f'Bearer {API_KEY}'},
        json={'query': f'site:linkedin.com/posts {keyword}'})
    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/v2/google', {
    method: 'POST',
    headers: { 'Authorization': `Bearer ${API_KEY}`, 'Content-Type': 'application/json' },
    body: JSON.stringify({ query: `site:linkedin.com/posts ${keyword}` })
  });
  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

    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

    One scraper API for every social, search and ecommerce platform. Built for AI agents.

    Product

    • Features
    • Pricing
    • Dashboard
    • Affiliates

    Developers

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

    Alternatives

    • Tavily Alternative
    • SerpAPI Alternative
    • Firecrawl Alternative
    • Exa Alternative
    • Serper Alternative
    • Tavily vs Scavio
    • SerpAPI vs Scavio
    • All alternatives
    • Compare Scavio vs alternatives

    Search APIs

    • Google Search API
    • Amazon Product API
    • YouTube API
    • Reddit API
    • Walmart Product API
    • TikTok API
    • Instagram API

    Tools

    • All Tools

    © 2026 Scavio. All rights reserved.

    Featured on TAAFT
    Terms of ServicePrivacy Policy