- Cost
- 1 credit
- Cached repeats
- 0 creditssend max_age_days, results kept 30 days
- Failed requests
- 0 credits
DuckDuckGo's results, not Google's, best effort and not a complete search (LinkedIn's own search needs a login). The cursor is the next results page and cannot go past 11. Each result is read like linkedin/post for the full text, author, date and counts (enrich, on by default; a post LinkedIn no longer shows is dropped). date_posted takes day, week, month or year. When the search provider asks for human verification on every try the call fails and can be retried.
You send query.
Part of the LinkedIn Scraper API: 8 LinkedIn endpoints on one key.
Request
Send your key in the x-api-key header.
1curl -G "https://api.socialscrape.dev/v1/linkedin/search/posts" \2 -H "x-api-key: $SOCIALSCRAPE_API_KEY" \3 --data-urlencode 'query=customer success playbook' \4 --data-urlencode 'enrich=false'1import os2import requests34params = {5 "query": "customer success playbook",6 "enrich": False,7}8res = requests.get(9 "https://api.socialscrape.dev/v1/linkedin/search/posts",10 headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},11 params=params,12 timeout=60,13)14body = res.json()1516if body["ok"]:17 print(body["data"])18else:19 print(body["error"]["code"], body["error"]["message"])1const url = new URL("https://api.socialscrape.dev/v1/linkedin/search/posts");2url.search = new URLSearchParams({3 query: "customer success playbook",4 enrich: "false",5}).toString();6const res = await fetch(url, {7 headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },8});9const body = await res.json();1011if (body.ok) {12 console.log(body.data);13} else {14 console.error(body.error.code, body.error.message);15}1{2 "nodes": [3 {4 "name": "SocialScrape LinkedIn post search",5 "type": "n8n-nodes-base.httpRequest",6 "typeVersion": 4.2,7 "position": [8 0,9 010 ],11 "parameters": {12 "method": "GET",13 "url": "https://api.socialscrape.dev/v1/linkedin/search/posts",14 "sendQuery": true,15 "queryParameters": {16 "parameters": [17 {18 "name": "query",19 "value": "customer success playbook"20 },21 {22 "name": "enrich",23 "value": "false"24 }25 ]26 },27 "sendHeaders": true,28 "headerParameters": {29 "parameters": [30 {31 "name": "x-api-key",32 "value": "={{ $env.SOCIALSCRAPE_API_KEY }}"33 }34 ]35 }36 }37 }38 ],39 "connections": {}40}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
query | string | yes | Keyword or phrase to look for in public LinkedIn posts. Also accepted as keyword, q. |
date_posted | string | Only posts found in this window. | |
enrich | boolean | Read each post for its full text, author, date and counts (on by default). Off returns only what the search result states, much cheaper and faster. | |
cursor | string | Opaque cursor from the previous page; pass it back unchanged. Also accepted as continuationToken, continuation_token, next_max_id, max_id, max_cursor, min_time, after, page_token, pageToken, paginationToken, next_page_id, page. |
Every request also accepts trim, raw and max_age_days.
Response
Sample from a recorded response, shortened. Values are examples, not your data.
1{2 "ok": true,3 "credits_charged": 1,4 "credits_remaining": 4999,5 "cached": false,6 "cached_at": null,7 "request_id": "req_d5c387b52d788e5519b2207e",8 "data": {9 "object": "list",10 "items": [11 {12 "object": "post",13 "platform": "linkedin",14 "id": "customer-success-playbooks-what-why-matter-how-build-one-ben-hong-agvwf",15 "url": "https://www.linkedin.com/pulse/customer-success-playbooks-what-why-matter-how-build-one-ben-hong-agvwf",16 "type": "link",17 "author": null,18 "title": "Customer Success Playbooks: What They Are, Why They Matter ... - LinkedIn",19 "text": "A Customer Success playbook is a structured, repeatable process that guides how your team engages with customers at critical points in the journey.",20 "published_at": null,21 "duration_seconds": null,22 "language": null,23 "hashtags": null,24 "mentions": null,25 "stats": {26 "views": null,27 "likes": null,28 "comments": null,29 "shares": null,30 "saves": null,31 "dislikes": null32 },33 "media": {34 "thumbnail_url": null,35 "video_url": null,36 "audio_url": null,37 "image_urls": null,38 "width": null,39 "height": null40 },41 "song": null,42 "location": null,43 "is_pinned": null,44 "is_sponsored": null,45 "extra": {46 "enriched": false,47 "search_position": 1,48 "source": "duckduckgo"49 }50 },51 {52 "object": "post",53 "platform": "linkedin",54 "id": "building-customer-success-playbook-from-scratch-anirudh-kumar-xxr9c",55 "url": "https://www.linkedin.com/pulse/building-customer-success-playbook-from-scratch-anirudh-kumar-xxr9c",56 "type": "link",57 "author": null,58 "title": "Building a Customer Success Playbook From Scratch",59 "text": "If you've ever been asked to \"build a Customer Success playbook,\" you probably did what every CSM, leader, or founder does: You opened a blank Google Doc. St...",60 "published_at": null,61 "duration_seconds": null,62 "language": null,63 "hashtags": null,64 "mentions": null,65 "stats": {66 "views": null,67 "likes": null,68 "comments": null,69 "shares": null,70 "saves": null,71 "dislikes": null72 },73 "media": {74 "thumbnail_url": null,75 "video_url": null,76 "audio_url": null,77 "image_urls": null,78 "width": null,79 "height": null80 },81 "song": null,82 "location": null,83 "is_pinned": null,84 "is_sponsored": null,85 "extra": {86 "enriched": false,87 "search_position": 2,88 "source": "duckduckgo"89 }90 }91 ],92 "cursor": "eyJwIjoyLCJmIjp7InEiOiIoc2l0ZTpsaW5rZWRpbi5jb20vcG9zdHMgT1Igc2l0ZTpsaW5rZWRpbi5jb20vZmVlZC91cGRhdGUgT1Igc2l0ZTpsaW5rZWRpbi5jb20vcHVsc2UpIGN1c3RvbWVyIHN1Y2Nlc...",93 "has_more": true,94 "parent": null95 },96 "cursor": "eyJwIjoyLCJmIjp7InEiOiIoc2l0ZTpsaW5rZWRpbi5jb20vcG9zdHMgT1Igc2l0ZTpsaW5rZWRpbi5jb20vZmVlZC91cGRhdGUgT1Igc2l0ZTpsaW5rZWRpbi5jb20vcHVsc2UpIGN1c3RvbWVyIHN1Y2Nlc...",97 "has_more": true98}Fields
A page of results. Each entry in items is a Post. cursor and has_more page through the rest.
A field the platform does not give is null, never made up. Extra platform details are in extra.
| Field | Type | Always | Notes |
|---|---|---|---|
object | "post" | ||
platform | Platform | yes | |
id | string | yes | |
url | string or null | ||
type | "video" or "short" or "reel" or "image" or "carousel" or "story" or "live" or "clip" or "text" or "link" or "tweet" or "pin" or "community_post" or "episode" or "unknown" | ||
author | Author or null | ||
title | string or null | ||
text | string or null | ||
published_at | string (ISO 8601 date-time) or null | ||
duration_seconds | number or null | ||
language | string or null | ||
hashtags | string[] or null | ||
mentions | string[] or null | ||
stats | Stats |
Show the other 6 fields
Full field list in the reference for this endpoint and the data models. Errors are listed under Errors.
Questions
Which errors can it return?
invalid_params (do not retry), not_found (do not retry), upstream_blocked (retry). Account and platform errors from the errors list can also happen. A failure always costs 0 credits.
How do I get more than one page?
Send the same request with cursor set to the cursor you received, until has_more is false. Each page costs its own price. See pagination.
Is there an SDK call for it?
The Python client has client.linkedin.search_posts(...) and the TypeScript client client.linkedin.searchPosts(). Both return the same envelope as the HTTP API. Install them from PyPI (socialscrape-sdk) or npm (socialscrape); plain HTTP works in any language.
Can an AI agent call it?
Yes. The MCP server, which you run on your own machine, reaches every built endpoint, with the same prices.