Blog

Searching LinkedIn posts by keyword, and the empty result that still bills you

A keyword that matches nothing does not come back as an empty page. The source falls back to unrelated recent posts, and that page is billed like any other.

The Triguna team 9 October 2026

Ask GET /v1/posts/search for a phrase that appears nowhere on LinkedIn and you do not get an empty page. You get total: 189, fifty recent posts about something else entirely, and a bill for one credit.

HTTP/1.1 200 OK
X-Credits-Charged: 1
X-Data-Source: live

A 200. A charge. No signal anywhere in the envelope that your keyword was the problem. That is the one behaviour to design around before you put post search behind a monitoring job, and it is the reason the rest of this post is mostly about how to narrow a query rather than how to send one.

What the endpoint searches, and what it does not

One correction first, because it sets the boundary. This is the only search path on the API, and it searches posts. Not people, not companies.

You cannot hand it “VP of Engineering at a Series B fintech in Berlin” and get a person back. Every other path on the API is a keyed lookup: you already hold a slug, a urn or a numeric id, and you are asking what is behind it. Post search is the one place you can start from a phrase instead of an identifier, and what it finds is posts that contain the phrase. The people are a by-product of whoever wrote them.

That distinction is worth stating plainly because it decides whether this endpoint is in your architecture at all. Prospecting from a description of a person is not something the surface does, and the about page explains why the surface stays this small rather than growing a search endpoint per entity.

The parameters that matter

keyword is required and caps at 200 characters. Everything else narrows.

ParameterValuesNotes
sortrelevance, date_postedDefaults to relevance
date_postedpast_24_hours, past_week, past_monthOmit it and you get the source’s default window
content_typevideo, image, job, live_video, document, collaborative_articleOne kind of media per call
from_person, mentions_personComma-separated bare ACo... urnsPosts by, or posts mentioning
from_company, mentions_company, author_companyComma-separated numeric company idsNumeric id, not the slug
author_industryComma-separated industry codesA fixed enum, BANKING and the like
author_titleComma-separated free text, 100 characters eachMatches the author’s title
page0 to 1000, zero-basedWalk until has_more is false
count1 to 50, default 10Every page costs one credit, so ask for 50

The author filters take the same identifiers as the rest of the API, which means the bare ACo... form for people and the numeric id for companies. A urn:li: prefixed urn is rejected, and a company’s display name is not an id at all. Those two mistakes account for most 400s across the whole surface, and they are catalogued in why your enrichment lookup returns 404.

Detecting the fallback, since the response will not tell you

Here is the shape you get back. total is the source’s own match count, and on a fallback page it is a real number describing posts you did not ask for:

{
  "page": 0,
  "count": 50,
  "total": 189,
  "has_more": true,
  "posts": [
    {
      "activity_urn": "urn:li:activity:7376356221991178240",
      "share_urn": "urn:li:ugcPost:7376356221513150464",
      "commentary": "In 2020 our p99 was 900ms. Today it is under 80ms.",
      "created_at_ms": 1758660369394,
      "engagement": { "comments": 42, "reactions": 318, "shares": 0 }
    }
  ]
}

Nothing in page, count, total or has_more distinguishes a good page from a fallback page. So check the text yourself, on every page, and treat a page with no on-topic hits as evidence that the keyword is wrong rather than evidence that nobody posted:

const url = new URL('https://api.triguna.ai/v1/posts/search');
url.search = new URLSearchParams({
  keyword: 'switching off Proxycurl',
  date_posted: 'past_week',
  sort: 'date_posted',
  count: 50,
});

const res = await fetch(url, { headers: { ApiKey: process.env.TRIGUNA_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const { total, has_more, posts } = await res.json();

// commentary is nullable while the key is always present, so coalesce before matching.
const terms = ['proxycurl'];
const onTopic = posts.filter((p) =>
  terms.some((t) => (p.commentary ?? '').toLowerCase().includes(t)),
);

if (posts.length > 0 && onTopic.length === 0) {
  // The credit is spent either way. Do not walk to page 1.
  throw new Error(`fallback page: ${total} matches, 0 on topic for "${terms.join(', ')}"`);
}

The ?? '' is not defensive padding. commentary is genuinely nullable, like most fields on this API, and a post that is only an image or a reshare has no text to match against. The general rule for payloads where every value may be null while every key is present is in handling partial enrichment records.

One credit a page, whatever the page holds

count defaults to 10 and maxes at 50, and both cost the same single credit. Leaving the default in place is a fivefold overpay for the same data, which is the cheapest bug on this list to fix.

At $0.005 a credit:

What you ask forPagesCreditsCost
One page of 5011$0.005
1,000 posts, 50 a page2020$0.10
One keyword daily for a year, 50 a page365365$1.83
One keyword as deep as it goes1,0011,001$5.01

That last row is the hard ceiling rather than a recommendation. page stops at 1000, so a single keyword bottoms out at 1,001 pages and roughly fifty thousand posts no matter how large total claims to be. If you need more than that from one phrase, the phrase is too broad and the fix is a filter, not a loop.

The daily row is the one worth internalising. Monitoring a keyword with date_posted=past_24_hours and count=50 is one credit a day. Ten keywords is $18.25 a year. Post search is cheap enough that the only real cost risk is the fallback page quietly multiplying your page count, which is why the detection above pays for itself.

Narrow with filters, never with rarer words

The intuitive way to get precision is a more specific phrase. On this endpoint that is exactly backwards: the rarer the term, the more likely you cross the threshold where the source gives up and hands you recent posts instead. Rare keywords are how you trigger the fallback.

Precision comes from the filters, which are hard constraints rather than relevance hints:

# Posts about hiring, by people at one company, in the last week.
curl -s -G "https://api.triguna.ai/v1/posts/search" \
  --data-urlencode "keyword=hiring" \
  --data-urlencode "from_company=1441" \
  --data-urlencode "date_posted=past_week" \
  --data-urlencode "count=50" \
  -H "ApiKey: $TRIGUNA_KEY" \
  | jq '{total, returned: (.posts | length)}'

A broad keyword plus from_company and date_posted returns less and means more than a long phrase with no filters. Resolve the numeric company_id once through the Company API and keep it, the same way you would keep any other identifier.

What a hit hands you, and what it costs to go further

Every result is the full post object, which is more than a search index usually gives you. Both urns are populated, engagement carries live comment and reaction counts with a reaction breakdown, and author arrives with a name, a headline and a stable entity_urn.

That matters for budgeting, because for a lot of jobs the search result is the finished answer. Ranking posts by engagement.reactions, or routing on the author’s headline, needs no further calls at all.

What search does not include is the comment and reaction lists. Those are separate paged calls per post, keyed by two different urns that cannot be derived from one another, and the full arithmetic for walking them is in who liked and commented on a LinkedIn post. Full career history for an author is one credit per profile through the Person API, and POST /v1/people/bulk takes up to fifty bare entity_urn values per call, which buys round trips and rate limit headroom rather than a discount.

So the pattern that keeps the bill flat is: search broadly, filter hard, rank on what the search response already told you, and only pay per entity for the handful you decided to act on.

Pace the walk. The published limit is 10 requests per second, and both 429 and 503 carry Retry-After. If search is one tool among several that an assistant can reach for, the contract to hand it, including the fact that there is no people search to fall back on, is in giving an agent an API contract.

The short version

  1. A no-match keyword returns a billed page of unrelated posts, not an empty page. Check the text of every page against your own terms and stop the run when nothing is on topic.
  2. It searches posts, not people. There is no path from a description of a person to that person, and planning around one is the expensive version of this mistake.
  3. Always send count=50. The default of 10 costs the same credit for a fifth of the data.
  4. Precision lives in the filters. Author, company, mention, industry, media type and date window are constraints; a rarer keyword just makes the fallback more likely.
  5. page stops at 1000. One keyword cannot yield more than about fifty thousand posts, so a query that needs more is a query that needs a filter.

Fifty free credits cover dozens of pages of real searching, which is enough to see a fallback page with your own eyes before you write the detection for it.

Next

linkedin-datapostssearchcost

Start with one request

Free credits on signup, no card required. Usage-based pricing after that.