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.
// Schedule Trigger
Interval: 30 minutesStep 2: Add an HTTP Request node to Scavio
Call Scavio with a site:linkedin.com/posts query.
// 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.
// 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.
// Data Table node
Action: Upsert
Key: url
Table: linkedin_posts_seenStep 5: Route new posts downstream
Pipe to Slack, Airtable, or a second workflow for enrichment.
// Slack node
Message: New LinkedIn post by {{$json.author}}: {{$json.url}}Python Example
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
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
List of public LinkedIn posts matching the keyword with author, URL, and snippet. Runs every 30 minutes, new posts only.