Apinoa Docs

Ads

Search the LinkedIn Ad Library, or list every ad one company runs.

View raw .mdx
GET | POST /v1/linkedin-ads/ads

Send parameters as a query string with GET, or as a JSON body with POST. Both are equivalent.

Request

curl "https://gateway.apinoa.com/v1/linkedin-ads/ads?advertiser=1035" \
  -H "x-api-key: $APINOA_API_KEY"

What to Pass

PassReadsNotes
queryAds matching the keywords
advertiserEvery ad one company runsIts numeric LinkedIn company id, as an ad's advertiser.id gives it
companyEvery ad one company runsA vanity name (microsoft), the company URL, or its numeric company id
advertiserNameAds from advertisers whose name matchesLinkedIn matches names loosely: Microsoft also finds Microsoft Azure and partners. For one company exactly, use advertiser or company
payerAds paid for by this payerThe name as an ad's paidBy states it

Pass one of them. The filters work with any: country (ISO 3166-1 alpha-2 codes, comma-separated), dateOption (last-30-days, current-month, current-year, last-year) or startDate with endDate (YYYY-MM-DD), and sort (newest, the default, or oldest). The filters carry to later pages in the cursor.

Parameters

ParameterTypeRequiredNotes
advertiserstringEvery ad one company runs, by its numeric LinkedIn company id (an ad's advertiser.id).
advertiserNamestringAds from advertisers whose name matches this one (LinkedIn matches loosely: "Microsoft" also finds "Microsoft Azure"). For one company exactly, use advertiser or company.
companystringEvery ad one company runs: its vanity name (e.g. microsoft), its company URL, or its numeric LinkedIn company id.
countrystring listOnly ads shown in these countries: ISO 3166-1 alpha-2 codes, comma-separated (e.g. DE,FR). Default: every country.
cursorstringOpaque cursor from the previous page's cursor. Pass it alone for the next page.
dateOptionenumOnly ads shown in this window: last-30-days, current-month, current-year or last-year. Default: the last twelve months. last-30-days current-month current-year last-year
endDatestringWith startDate: only ads shown up to this day (YYYY-MM-DD).
payerstringAds paid for by this payer, as an ad's paidBy names it.
querystringKeywords to search the Ad Library for.
sortenumnewest first (default) or oldest first. newest oldest
startDatestringWith endDate: only ads shown from this day (YYYY-MM-DD), at most twelve months back.

The same parameters, and every response type, are in the OpenAPI document.

Response

Returns AdPage in data. A real response, shortened: arrays keep their first entries and long text is cut.

{
  "success": true,
  "data": {
    "library": "linkedin-ads",
    "items": [
      {
        "library": "linkedin-ads",
        "id": "1698885096",
        "url": "https://www.linkedin.com/ad-library/detail/1698885096",
        "advertiser": {
          "name": "Microsoft",
          "avatarUrl": "https://media.licdn.com/dms/image/v2/D560BAQH32RJQCl3dDQ/company-logo_…"
        },
        "format": "Carousel Ad",
        "text": "Explore the latest developments across AI, cloud and security from Mic…",
        "images": [],
        "videos": [],
        "cards": [
          {
            "title": "See what’s next for your organisation",
            "image": {
              "url": "https://media.licdn.com/dms/image/v2/D5610AQFlopy4Rm-itQ/image-shrink_…"
            }
          }
        ],
        "ext": {
          "creativeType": "SPONSORED_UPDATE_CAROUSEL",
          "textTruncated": true
        }
      }
    ],
    "cursor": "5wraO2u_AhBuSF7ObPceqP2vGsnCEsdUSPpXXSrhyVVGTCnfWXD1ZI1B3AgdnJwqF2b8jv…",
    "total": 11538
  }
}

Errors

StatusCodeMeaning
400INVALID_CURSORThe cursor is not one this operation returned. Start again without it.
400INVALID_PARAMSA parameter is missing, unknown or out of range. The message names it.
401UNAUTHORIZEDThe x-api-key header is missing, or the key is revoked or unknown.
402INSUFFICIENT_CREDITSYour credits do not cover this call. Choose a plan or top up in the dashboard.
404NOT_FOUNDThe company does not exist on LinkedIn.
429MARKETPLACE_SATURATEDToo many concurrent calls. Retry after the Retry-After seconds.
502UPSTREAM_ERRORThe library answered with something unusable. Retry with backoff.

Every code is listed in Errors. Failed calls are not billed.

Pricing

Price 1 credit per call. Plans and credits.

Notes

  • Every record follows the shared Ads API schema. What only LinkedIn states is in ext: creativeType (LinkedIn's own format code), textTruncated, poster, document, event, message, links and targeting.
  • A page holds up to 24 ads. total is how many ads match, as the Ad Library states it; it comes with the first page.
  • A search result carries the ad's text as LinkedIn previews it, shortened (ext.textTruncated: true), and the creative's pictures and video cover. ad returns the whole ad: full text, video files, the call to action, links, who paid and, when LinkedIn discloses them, the run dates, impressions and targeting.
  • The Ad Library covers the last twelve months. A startDate further back is refused.
  • company costs 1 unit whether it is a name, a URL or an id, and so does every later page.
  • For the next page, pass cursor alone.

On this page