Ads

LinkedIn API

Also known as领英

7 endpoints read LinkedIn: posts, companies, ad library. From $0.0020 a call. No LinkedIn login and no cookie; a failed call is free.

Endpoints7 endpointsin 3 groups, one response shape
PriceFrom $0.0020per call. Failed calls are free
30-day availability100% Live · the share of time the endpoints were serving calls
DataFetched liveat the moment of the call

The 7 endpoints for LinkedIn, and what each returns

  • LinkedIn ad detail: Get one ad of the LinkedIn Ad Library by its ID or link: advertiser, text, headline, images and videos, landing page, first and last day shown, bracket of impressions, the languages and locations targeted.
  • LinkedIn Ad Library search: Search the ads of the LinkedIn Ad Library by keyword or by the company that advertises: advertiser, text, headline, images and videos, landing page, first and last day shown, bracket of impressions, the languages and locations targeted; can be limited to a country.
  • LinkedIn company page: Get a LinkedIn company page by handle or link: name, description, employee count, industry, size, kind of company, headquarters, website.
  • LinkedIn company posts: Get the latest posts a LinkedIn company page shows publicly (up to 10), by handle or link: ID, link, text, time. No author and no counts, which the post capability gives; this page only, with no older page.
  • LinkedIn post detail: Get one LinkedIn post by its activity ID or link: text, author, time, reaction count, comment count, images.
  • LinkedIn post search: Find public LinkedIn posts by search terms: text, author, time, reaction count, comment count; can be limited to a recent period. Results come from a web search engine's index of LinkedIn, not LinkedIn's own search, and are not complete.
  • LinkedIn video transcript: Get what is said in the video of a LinkedIn post by its activity ID or link, as one text. Only where LinkedIn itself publishes a transcript with the video; most videos have none.

One call, as it came back

A recorded call, fields already tidied up: ready for an AI or a spreadsheet.
Recorded
GET/v1/linkedin/posts/search$0.0020
FieldValue
published_at2025-07-06 15:55 UTC
author.followers237,136
metrics.likes404
metrics.comments74

The first 4 rows of a response recorded 2026-10-12 19:00 UTC.

Run it in the Playground · $0.0020
Recorded response
{
  "code": "ok",
  "request_id": "31e7c390-8677-479d-9789-e894edffebc5",
  "data": {
    "items": [
      {
        "id": "7746367938891236722",
        "url": "https://www.linkedin.com/feed/update/urn:li:activity:7746367938891236722",
        "text": "My honest take on ai agents, a month in.",
        "published_at": "2025-07-06T15:55:27.089Z",
        "author": {
          "username": "fieldnotes_studio",
          "name": "Field Notes Studio",
          "avatar_url": "https://media.licdn.com/dms/image/v2/nhOgVxi5Ro8e7Q5e/profile-displayphoto-shrink_100_100/0/",
          "followers": 237136
        },
        "metrics": { "likes": 404, "comments": 74 },
        "images": [
          "https://media.licdn.com/dms/image/v2/TxgG00Xt_GhfRtT1/feedshare-shrink_800/0/",
          "https://media.licdn.com/dms/image/v2/KeBZgF4hgJnZo2l9/feedshare-shrink_800/0/",
          // … 11 more
        ]
      },
      // … 9 more
    ]
  },
  "page": {
    "next_cursor": "c1.uZZ4-Kat5BWrnBm-xU1hzA6XluT7DQag81tXGfc4",
    "cursor_expires_at": "2026-10-12T20:00:44.000Z",
    "has_more": true,
    "returned": 10
  },
  "warnings": [],
  "meta": {
    "capability": "linkedin.posts.search",
    "result_status": "complete",
    "fetched_at": "2026-10-12T19:00:44.000Z",
    "cached": false,
    "replayed": false,
    "unavailable": {
      "type": "capability",
      "title": "capability",
      "lang": "capability",
      "author.id": "capability",
      "author.verified": "capability",
      "metrics.shares": "capability",
      "metrics.favorites": "platform",
      "metrics.views": "capability",
      "metrics.reposts": "capability",
      "hashtags": "capability",
      "mentions": "capability",
      "is_pinned": "capability",
      "post_id": "platform",
      "parent_id": "platform",
      "root_id": "platform"
    },
    "billing": {
      "amount": "0.002",
      "currency": "USD",
      "balance_after": "9.998"
    }
  }
}

From a response recorded 2026-10-12 19:00 UTC. Names, text and IDs are examples, and so are the links: none is the recorded one (the page shows no one's personal data); the figures are as recorded. Long lists are cut. The request ID, cursor and balance are made up.

What you can get

Each row is an endpoint: what it returns and what one call costs.

EndpointPathReturnsPrice
Posts3
LinkedIn post searchGET/v1/linkedin/posts/searchPost list$0.0020
LinkedIn post detailGET/v1/linkedin/posts/getPost$0.0020
LinkedIn video transcriptGET/v1/linkedin/posts/transcript/getTranscript$0.0020
Companies2
LinkedIn company pageGET/v1/linkedin/companies/getAccount$0.0020
LinkedIn company postsGET/v1/linkedin/companies/posts/listPost list$0.0020
Ad library2
LinkedIn Ad Library searchGET/v1/linkedin/ads/searchAd list$0.0020
LinkedIn ad detailGET/v1/linkedin/ads/getAd$0.0020
Prices are the prices in force. A call that fails, or whose result is uncertain, costs nothing.LinkedIn API pricing →LinkedIn data in your AI →See live status →

What people build with it

Ready-made tasks your AI can run on LinkedIn data. Each is a few calls under a spending cap.

Ask about LinkedIn right inside Claude or Cursor

Add the OneFeedAPI MCP server and the AI finds the LinkedIn endpoint it needs and calls it; answers link back to the source. You pay for the calls it makes.

LinkedIn MCP setup →
https://onefeedapi.com/mcp

Start in three steps

The call shown here is LinkedIn post search. Every other LinkedIn endpoint is called the same way and answers in the same envelope.

Get a key

Sign in with an emailed code or Google. Free trial, no card needed.

Call it, or let your AI call it

One GET from your code. Or paste this prompt into your agent with your key in it: it sets itself up, then finds and calls these endpoints by itself.

Read https://onefeedapi.com/agents.md and set up OneFeedAPI in this agent. My API key is dx_live_…; use it for every OneFeedAPI call.

Sign in to copy it with your key

Read the same shape every time

Items are in data.items (one object in data.item), the next page in page.next_cursor, the charge in meta.billing.amount. A failed call is not charged.

Read the quickstart →
curl -G "https://onefeedapi.com/v1/linkedin/posts/search" \
  --data-urlencode "query=ai agents" \
  -H "Authorization: Bearer $ONEFEED_API_KEY"
# pip install onefeedapi
from onefeedapi import OneFeedAPI

dx = OneFeedAPI()  # reads ONEFEED_API_KEY
result = dx.linkedin.posts.search(query="ai agents")
print(result["data"]["items"])
// npm i @onefeedapi/sdk
import { OneFeedAPI } from "@onefeedapi/sdk";

const dx = new OneFeedAPI(); // reads ONEFEED_API_KEY
const result = await dx.linkedin.posts.search({ query: "ai agents" });
console.log(result.data.items);
onefeedapi call linkedin.posts.search 'query=ai agents'
{
  "mcpServers": {
    "onefeedapi": {
      "type": "http",
      "url": "https://onefeedapi.com/mcp",
      "headers": {
        "Authorization": "Bearer ${ONEFEED_API_KEY}"
      }
    }
  }
}

Add this to your MCP client, then ask your agent to call linkedin.posts.search.

Edge cases

What the LinkedIn endpoints do at their edges, and what to check when a call does not return what you expected.

Page sizes
A list returns 10 to 24 items a page, depending on the endpoint. 2 of the 3 lists go on to a next page: page.next_cursor, passed back as cursor, each page a call of its own. The others return one page only.
Fields it cannot give
5 of the 7 endpoints cannot fill every field of the object they return. Each endpoint's page lists which, and every answer repeats them in meta.unavailable: a missing field is never a silent zero.
Preview structures
2 endpoints return a preview structure whose fields may still change; the others return a standard object, the same on every platform.
The post ID is the activity number
Links like linkedin.com/posts/…-activity-<ID>-… and /feed/update/urn:li:activity:<ID> both carry it, and both are taken.
Companies by handle
A company is named by the segment after /company/ in its link. Its follower count is not given.
Company posts: ten, without counts
A company's posts are the latest it shows publicly, up to 10, with no author, no counts and no older page. Read a post itself for its reactions and comments.
Post search is not complete
Post search comes from a web search engine's index of LinkedIn, not from LinkedIn's own search, so it misses posts. A search that finds nothing is not charged.
Most videos have no transcript
A transcript exists only where LinkedIn publishes one with the video; otherwise the answer is not found, not charged.

Questions about the LinkedIn API

Short answers. The details are on each endpoint's page.

What LinkedIn data can I get through the API?

7 endpoints: posts, companies, ad library. Each endpoint's page gives its parameters and fields, with a recorded response.

How do I call the LinkedIn API?

Sign up for a key, send it as Authorization: Bearer <key> and call the endpoint's address, for example GET https://onefeedapi.com/v1/linkedin/ads/get. Or connect OneFeedAPI to Claude, Cursor or ChatGPT (MCP) and ask in a sentence. The free trial needs no card.

How many tokens does a LinkedIn API response take in an AI?

Across 7 LinkedIn endpoints, one recorded real response each, the platform's own JSON comes to 37k tokens and what an AI reads through OneFeedAPI's MCP server to 8,290, 77% fewer; the JSON of a direct API call is 41% fewer (counted 2026-11-06). Every platform uses the same field names, and fields returns only the ones you name.

How is the LinkedIn API priced?

Per call, no subscription. All 7 endpoints cost $0.0020 a call. You are charged when data comes back; a failed call costs nothing.

Do I need a LinkedIn account or a cookie?

No. One OneFeedAPI key is all you hold: no LinkedIn login, no cookie, no device to keep alive. The endpoints return publicly visible data only.

Is the data live?

A call fetches from LinkedIn at that moment, and meta.fetched_at says when. A result is kept for 24 hours, so a retry with the same Idempotency-Key is not charged again.

What happens when LinkedIn changes something?

A call that fails is not charged, whatever the reason. An endpoint that is paused answers capability_paused, also free, and GET /v1/catalog/status says what is up right now.

Related

Call LinkedIn with one key.

Free trial on sign-up: up to 50 calls at $0.0020. No card. No LinkedIn login, no cookie, no subscription. A failed call is free.

Start free