Advertising6 min readBy Purrkey teamUpdated

How to search LinkedIn ads by company or keyword

Search the LinkedIn Ad Library by company or keyword and get a table of matching ads with advertiser, headline, creative text, format, CTA, run dates and pagination

On this page

You need to review 25 Microsoft ads and 25 ads for the keyword cloud in the LinkedIn Ad Library before you pitch a competitor campaign. anyapi.linkedin.ads_search searches the Ad Library by company or keyword and returns matching ads with advertiser, headline, creative text, format, CTA and run dates, with pagination for the rest of the list

The deliverable is a nine-column table per search: Advertiser, Headline, Description, Ad Type, CTA, Start Date, End Date, Total Impressions and Ad URL. The formats, CTAs and run dates in those rows feed your next creative brief. No run has been executed for this article, so the values below are a design

Example input and worksheet design

Example, and you replace it with your own: a company search for microsoft and a keyword search for cloud

SearchFieldValue
Companycompanymicrosoft
Keywordkeywordcloud

Values here are placeholders showing the shape:

AdvertiserHeadlineDescriptionAd TypeCTAStart DateEnd DateTotal ImpressionsAd URL
(advertiser string)(headline)(creative text, one or two lines)(adType)(cta)(YYYY-MM-DD)(YYYY-MM-DD)(string value)(canonical Ad Library URL)

Keep the two searches in separate blocks and carry data.totalAds above each one, so a thin result reads differently from a page you have not finished

Step 1: run the company search inside the date window

Send company with the advertiser name, or companyId if you already hold a LinkedIn company identifier. Add countries as a comma-separated list of two-letter codes when the pitch is regional. No input property is marked required, so a call carrying company alone is valid

Dates carry a limit that shapes this step. LinkedIn accepts dates from one year ago through yesterday in UTC. A startDate earlier than that is moved up to one year ago, and an endDate of today or later is moved back to yesterday, but only when your range overlaps the accepted window; the response hint names the adjusted dates. Reversed ranges and ranges with no accepted day are rejected before the search, so check the order of startDate and endDate before you call

Send startDate without endDate and the search ends yesterday in UTC, the latest day LinkedIn accepts. For a pitch about creative that is running now, that default is the one to use

The first call omits cursor. The response carries data.nextCursor; send that string back in cursor to fetch the next page, and stop when nextCursor is null or when the block reaches 25 rows. paginationToken is a deprecated alias that does the same job, so leave it out and use cursor

Each page is a separate call, which is why the cost section prices a first page and a three-page review apart

Reading the output fields that drive the decision

found tells you whether the search landed. data.ads is the array you map into the table, with data.totalAds and data.nextCursor beside it. When found is false, reason explains it and the only value the contract lists is not_found. The contract calls a found: false answer a successful call, not an error, and costUsd is what it actually cost

Each ad carries the columns you need: advertiser, headline, description, adType, cta, startDate, endDate, totalImpressions, url, plus destinationUrl and id. url is the canonical LinkedIn Ad Library URL for the ad, which is what belongs in the Ad URL column, and destinationUrl is the landing page the ad points at. totalImpressions is typed as a string, so record it as text in the worksheet

adType and cta are the two fields the brief leans on. Group the 25 company rows and the 25 keyword rows by adType first, then by cta, and read startDate and endDate to see which creative is still running during your pitch window. If the brief also needs the people behind the ads, LinkedIn profile data for a list covers a different tool

The agent prompt

Agent prompt
Set up https://purrkey.app/SKILL.md, then use Purrkey to review LinkedIn
Ad Library ads for two searches: company "microsoft" and keyword "cloud".
Check the current inputs and price of anyapi.linkedin.ads_search before
running anything. Run one call per search for the first page, then follow
data.nextCursor with the cursor field until you have 25 ads for that
search or nextCursor is null. Keep startDate and endDate inside the
window LinkedIn accepts, one year ago through yesterday in UTC, and
report any adjusted dates the response hint names. Return one table with
advertiser, headline, description, ad type, CTA, start date, end date,
total impressions and ad URL, in two blocks, with data.totalAds above
each block. Do not invent ads or fill empty fields with guesses.

Estimated tool cost

The catalog lists anyapi.linkedin.ads_search at up to $0.0012 per call, unit max_call, which it defines as "Maximum per call. Successful runs settle at the actual AnyAPI charge". The totals below are ceilings, not settled charges

StepFormulaUnit pricePlanned quantityTotal
First page, company searchcalls x max price$0.0012 per call1$0.0012
First page, keyword searchcalls x max price$0.0012 per call1$0.0012
First-page plan2$0.0024
Three-page review, each searchcalls x max price$0.0012 per call3$0.0036
Three-page review, both searches6$0.0072

The first-page scenario is one call per search, at most $0.0024. The three-page review is three calls per search, six in total, at most $0.0072. Model fees for the agent are not counted. The endpoint behind the tool id is called through POST /v1/runs with toolId anyapi.linkedin.ads_search, read from the catalog on November 12, 2026 under price revision anyapi-catalog-2026-11-05

Open the LinkedIn ads search tool, send the company search for microsoft as a single first-page call, and read data.totalAds before you plan the keyword search

Get started by giving this to your agent

  • Claude Code
  • Codex
  • Gemini CLI
  • Cursor
  • GitHub Copilot
Set up https://purrkey.app/SKILL.md, then use Purrkey to show me what I can do with LinkedIn.
Explore LinkedIn tools and pricing

FAQ

How do I search the LinkedIn Ad Library by company?

Send the company name in the company field of the LinkedIn ads search tool, or a LinkedIn company identifier in the companyId field if you have one. The response lists matching ads with advertiser, headline, description, ad type, CTA and run dates.

Can I search LinkedIn ads by keyword instead of company?

Yes. Send the term in the keyword field. No input property is marked required, so a call can carry company, keyword, both, or optional filters such as countries and a date range.

What date range does the LinkedIn ad search accept?

LinkedIn accepts dates from one year ago through yesterday in UTC. Dates outside that window are adjusted only when your range overlaps it, and the response hint names the adjusted dates. Reversed ranges and ranges with no accepted day are rejected before the search.

How do I get more than the first page of ads?

Read data.nextCursor from the response and send it back in the cursor field. Omit cursor for the first page. paginationToken is a deprecated alias for the same job.

What do the output fields mean?

found says whether the search produced a result and data.ads holds the ad list, with totalAds and nextCursor beside it. When found is false, reason says why, and the not found reason means the source states the target does not exist or returned nothing for it.

How much does a LinkedIn ad search cost?

Up to $0.0012 per call, listed as the maximum per call unit, with successful runs settling at the actual AnyAPI charge. A first-page review of one company search and one keyword search is at most $0.0024 for two calls.

Is a found: false response an error?

No. The contract calls it a successful call, not an error, and costUsd is what it actually cost. reason is present only when found is false, and the only value it lists is the not found reason.

Next step

Try this with LinkedIn

The tool directory lists every endpoint with its current price. Inspect the inputs there, then let your agent run a small batch before scaling up.

See LinkedIn tools

Share this article