---
title: "Ads"
description: "Search the LinkedIn Ad Library, or list every ad one company runs."
---

> Every apinoa docs page as markdown: https://apinoa.com/llms.txt (all in one file: https://apinoa.com/llms-full.txt; this API family in one file: https://apinoa.com/docs/ads/llms.txt)

```http
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

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

```js tab="JavaScript"
const params = new URLSearchParams({ advertiser: "1035" });
const res = await fetch(`https://gateway.apinoa.com/v1/linkedin-ads/ads?${params}`, {
  headers: { "x-api-key": process.env.APINOA_API_KEY },
});
const { success, data, error } = await res.json();
```

```python tab="Python"
import os

import requests

res = requests.get(
    "https://gateway.apinoa.com/v1/linkedin-ads/ads",
    params={"advertiser": "1035"},
    headers={"x-api-key": os.environ["APINOA_API_KEY"]},
)
body = res.json()
```

## What to Pass

| Pass | Reads | Notes |
|---|---|---|
| `query` | Ads matching the keywords |  |
| `advertiser` | Every ad one company runs | Its numeric LinkedIn company id, as an ad's `advertiser.id` gives it |
| `company` | Every ad one company runs | A vanity name (`microsoft`), the company URL, or its numeric company id |
| `advertiserName` | Ads from advertisers whose name matches | LinkedIn matches names loosely: `Microsoft` also finds `Microsoft Azure` and partners. For one company exactly, use `advertiser` or `company` |
| `payer` | Ads paid for by this payer | The 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

| Parameter | Type | Required | Notes |
|---|---|---|---|
| `advertiser` | string |  | Every ad one company runs, by its numeric LinkedIn company id (an ad's `advertiser.id`). |
| `advertiserName` | string |  | Ads from advertisers whose name matches this one (LinkedIn matches loosely: "Microsoft" also finds "Microsoft Azure"). For one company exactly, use `advertiser` or `company`. |
| `company` | string |  | Every ad one company runs: its vanity name (e.g. microsoft), its company URL, or its numeric LinkedIn company id. |
| `country` | string list |  | Only ads shown in these countries: ISO 3166-1 alpha-2 codes, comma-separated (e.g. DE,FR). Default: every country. |
| `cursor` | string |  | Opaque cursor from the previous page's `cursor`. Pass it alone for the next page. |
| `dateOption` | enum |  | Only 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` |
| `endDate` | string |  | With startDate: only ads shown up to this day (YYYY-MM-DD). |
| `payer` | string |  | Ads paid for by this payer, as an ad's `paidBy` names it. |
| `query` | string |  | Keywords to search the Ad Library for. |
| `sort` | enum |  | newest first (default) or oldest first. `newest` `oldest` |
| `startDate` | string |  | With 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: https://apinoa.com/openapi.json

## Response

Returns [`AdPage`](/docs/api-reference/ads/response-schema#adpage) in `data`. A real response, shortened: arrays keep their first entries and long text is cut.

```json
{
  "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

| Status | Code | Meaning |
|---|---|---|
| 400 | `INVALID_CURSOR` | The `cursor` is not one this operation returned. Start again without it. |
| 400 | `INVALID_PARAMS` | A parameter is missing, unknown or out of range. The message names it. |
| 401 | `UNAUTHORIZED` | The `x-api-key` header is missing, or the key is revoked or unknown. |
| 402 | `INSUFFICIENT_CREDITS` | Your credits do not cover this call. Choose a plan or top up in the dashboard. |
| 404 | `NOT_FOUND` | The company does not exist on LinkedIn. |
| 429 | `MARKETPLACE_SATURATED` | Too many concurrent calls. Retry after the `Retry-After` seconds. |
| 502 | `UPSTREAM_ERROR` | The library answered with something unusable. Retry with backoff. |

Every code is listed in [Errors](/docs/errors). Failed calls are not billed.

## Pricing

**Price** 1 credit per call. [Plans and credits](https://apinoa.com/en/pricing).

## Notes

- Every record follows the shared [Ads API schema](/docs/api-reference/ads/response-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`](/docs/api-reference/linkedin-ads/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.
