---
title: "Ads"
description: "LinkedIn 광고 라이브러리를 검색하거나, 한 회사가 집행하는 모든 광고를 가져옵니다."
---

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

파라미터는 `GET`의 쿼리 문자열로도, `POST`의 JSON 본문으로도 보낼 수 있습니다. 둘은 같습니다.

## 요청

```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()
```

## 넘길 값

| 넘기는 값 | 읽는 것 | 비고 |
|---|---|---|
| `query` | 키워드에 맞는 광고 |  |
| `advertiser` | 한 회사가 집행하는 모든 광고 | 숫자 LinkedIn 회사 id(광고의 `advertiser.id`) |
| `company` | 한 회사가 집행하는 모든 광고 | 배니티 이름(`microsoft`), 회사 URL, 또는 숫자 회사 id |
| `advertiserName` | 이름이 맞는 광고주의 광고 | LinkedIn은 이름을 느슨하게 맞춥니다. `Microsoft`는 `Microsoft Azure`와 파트너도 찾습니다. 한 회사만 정확히 보려면 `advertiser`나 `company`를 쓰세요 |
| `payer` | 이 지불 주체가 비용을 낸 광고 | 광고의 `paidBy`에 적힌 이름 그대로 |

이 중 하나를 넘기세요. 필터는 어느 것과도 함께 쓸 수 있습니다: `country`(ISO 3166-1 alpha-2 코드, 쉼표로 구분), `dateOption`(`last-30-days`, `current-month`, `current-year`, `last-year`) 또는 `startDate`와 `endDate`(YYYY-MM-DD), `sort`(기본값 `newest`, 또는 `oldest`). 필터는 `cursor`에 담겨 다음 페이지로 이어집니다.

## 파라미터

| 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

## 응답

`data`에 [`AdPage`](/docs/api-reference/ads/response-schema#adpage)를 돌려줍니다. 실제 응답을 줄인 것입니다. 배열은 앞쪽 항목만 남기고 긴 텍스트는 잘랐습니다.

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

## 에러

| 상태 | 코드 | 의미 |
|---|---|---|
| 400 | `INVALID_CURSOR` | 이 오퍼레이션이 돌려준 `cursor`가 아닙니다. `cursor` 없이 처음부터 다시 시작하세요. |
| 400 | `INVALID_PARAMS` | 파라미터가 없거나, 알 수 없거나, 범위를 벗어났습니다. 메시지에 이름이 나옵니다. |
| 401 | `UNAUTHORIZED` | `x-api-key` 헤더가 없거나, 폐기되었거나 알 수 없는 키입니다. |
| 402 | `INSUFFICIENT_CREDITS` | 크레딧이 이 호출 비용에 모자랍니다. 대시보드에서 플랜을 고르거나 충전하세요. |
| 404 | `NOT_FOUND` | LinkedIn에 그 회사가 없습니다. |
| 429 | `MARKETPLACE_SATURATED` | 동시 호출이 너무 많습니다. `Retry-After` 초만큼 기다린 뒤 다시 시도하세요. |
| 502 | `UPSTREAM_ERROR` | 라이브러리가 쓸 수 없는 응답을 보냈습니다. 간격을 두고 다시 시도하세요. |

모든 코드는 [Errors](/docs/errors)에 있습니다. 실패한 호출은 과금되지 않습니다.

## 가격

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

## 참고

- 모든 레코드는 공통 [Ads API 스키마](/docs/api-reference/ads/response-schema)를 따릅니다. LinkedIn만 밝히는 정보는 `ext`에 있습니다: `creativeType`(LinkedIn 자체 형식 코드), `textTruncated`, `poster`, `document`, `event`, `message`, `links`, `targeting`.
- 한 페이지에 광고가 최대 24개 있습니다. `total`은 맞는 광고 수를 광고 라이브러리가 밝힌 그대로 담으며, 첫 페이지에 옵니다.
- 검색 결과에는 LinkedIn이 미리보기로 줄인 광고 텍스트(`ext.textTruncated: true`)와 소재의 이미지·동영상 커버가 있습니다. [`ad`](/docs/api-reference/linkedin-ads/ad)는 광고 전체를 돌려줍니다: 전체 텍스트, 동영상 파일, 행동 유도 버튼, 링크, 비용을 낸 주체, 그리고 LinkedIn이 공개하는 경우 집행 기간·노출 수·타기팅.
- 광고 라이브러리는 최근 12개월을 다룹니다. 그보다 이전의 `startDate`는 거부됩니다.
- `company`는 이름·URL·id 어느 것이든 1단위이고, 다음 페이지도 모두 1단위입니다.
- 다음 페이지는 `cursor`만 넘기면 됩니다.
