Apinoa Docs

Ads

Meta 광고 라이브러리를 검색하거나, 한 광고주가 Facebook, Instagram, Messenger, Audience Network에 집행하는 모든 광고를 가져옵니다.

원본 .mdx 보기
GET | POST /v1/meta-ads/ads

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

요청

curl "https://gateway.apinoa.com/v1/meta-ads/ads?advertiser=15087023444&status=all" \
  -H "x-api-key: $APINOA_API_KEY"

넘길 값

넘기는 값읽는 것비고
query키워드에 맞는 광고exact는 구절 전체가 맞는 것만
advertiser한 광고주가 집행하는 모든 광고광고주의 id. advertisers나 광고의 advertiser.id에서 얻습니다
query + advertiser키워드에 맞는 광고 중 이 광고주들의 것만id 최대 10개, 쉼표로 구분

query나 advertiser, 또는 둘 다 넘기세요. 필터(country, status, adType, mediaType, platforms, languages, startDate, endDate, sort)는 어느 쪽과도 함께 쓸 수 있습니다.

파라미터

파라미터타입필수설명
adTypeenumall (default), or one special category: political (social issues, elections or politics), housing, employment, credit. all political housing employment credit
advertiserstring listThe advertiser's id, as advertisers returns it (or an ad's advertiser.id): every ad it runs. With query, up to 10 ids, comma-separated, narrow the keyword search to those advertisers.
countrystringWhere the ads ran: an ISO 3166-1 alpha-2 code, or ALL (default).
cursorstringOpaque cursor from the previous page's cursor. Pass it alone for the next page.
endDatestringOnly ads that started running on or before this day (YYYY-MM-DD).
exactbooleanquery: match the exact phrase instead of any of its words.
languagesstring listOnly ads in these languages (ISO 639-1).
mediaTypeenumall (default), image, video, meme, image_and_meme, none. all image video meme image_and_meme none
platformsstring listOnly ads that ran on these platforms.
querystringKeywords to search the Ad Library for.
sortenumrelevance (default), or impressions (highest first; Facebook states impressions for political ads). relevance impressions
startDatestringOnly ads that started running on or after this day (YYYY-MM-DD).
statusenumactive (default), inactive or all. active inactive all

같은 파라미터와 모든 응답 타입은 OpenAPI 문서에도 있습니다.

응답

data에 AdPage를 돌려줍니다. 실제 응답을 줄인 것입니다. 배열은 앞쪽 항목만 남기고 긴 텍스트는 잘랐습니다.

{
  "success": true,
  "data": {
    "library": "meta-ads",
    "items": [
      {
        "library": "meta-ads",
        "id": "1702938977100376",
        "url": "https://www.facebook.com/ads/library/?id=1702938977100376",
        "advertiser": {
          "id": "15087023444",
          "name": "Nike",
          "url": "https://www.facebook.com/nike/",
          "avatarUrl": "https://scontent-bos5-1.xx.fbcdn.net/v/t39.35426-6/431756959_71287105437…",
          "ext": {
            "likes": 39488420,
            "categories": [
              "Sportswear",
              "Product/service"
            ]
          }
        },
        "format": "DPA",
        "title": "{{product.name}}",
        "text": "Bring sports more fully into your day with the Nike App.",
        "linkUrl": "http://itunes.apple.com/app/id1095459556",
        "ctaText": "Install now",
        "images": [],
        "videos": [],
        "cards": [
          {
            "title": "Nike Run Swift 3 Women's Road Running Shoes",
            "text": "Bring sports more fully into your day with the Nike App.",
            "linkUrl": "https://www.nike.com/ph/t/run-swift-3-road-running-shoes-2fHbzp/DR2698-0…",
            "ctaText": "Install Now",
            "image": {
              "url": "https://scontent-bos5-1.xx.fbcdn.net/v/t39.35426-6/431679131_94921416663…",
              "ext": {
                "resizedUrl": "https://scontent-bos5-1.xx.fbcdn.net/v/t39.35426-6/431679131_94921416663…"
              }
            },
            "ext": {
              "caption": "itunes.apple.com",
              "linkDescription": "₱3,995",
              "ctaType": "INSTALL_MOBILE_APP"
            }
          },
          {
            "title": "Nike Invincible 3 Women's Road Running Shoes",
            "text": "Bring sports more fully into your day with the Nike App.",
            "linkUrl": "https://www.nike.com/ph/t/invincible-3-road-running-shoes-LL61DX/DR2660-…",
            "ctaText": "Install Now",
            "image": {
              "url": "https://scontent-bos5-1.xx.fbcdn.net/v/t39.35426-6/431631323_92872743202…",
              "ext": {
                "resizedUrl": "https://scontent-bos5-1.xx.fbcdn.net/v/t39.35426-6/431631323_92872743202…"
              }
            },
            "ext": {
              "caption": "itunes.apple.com",
              "linkDescription": "₱9,895",
              "ctaType": "INSTALL_MOBILE_APP"
            }
          }
        ],
        "firstShownAt": "2025-04-07T07:00:00.000Z",
        "lastShownAt": "2026-11-07T08:00:00.000Z",
        "ext": {
          "active": true,
          "platforms": [
            "facebook",
            "instagram"
          ],
          "caption": "itunes.apple.com",
          "ctaType": "INSTALL_MOBILE_APP",
          "has_user_reported": false,
          "gated_type": "ELIGIBLE",
          "is_aaa_eligible": false,
          "regional_regulation_data": {
            "finserv": {
              "is_deemed_finserv": false,
              "is_limited_delivery": false
            },
            "tw_anti_scam": {
              "is_limited_delivery": false
            }
          },
          "hide_data_status": "NONE",
          "snapshot": {
            "is_reshared": false
          }
        }
      }
    ],
    "cursor": "FBe_2wsngLShai3Nb8Z3btwLqnQCPM5mfHmg_xoJDSWCYQpot_7Bie7WzcRR96xHrpnClTN0…",
    "total": 15646,
    "ext": {
      "searchType": "page",
      "countries": [
        "ALL"
      ],
      "status": "all",
      "adType": "all",
      "mediaType": "all",
      "advertiser": "15087023444"
    }
  }
}

에러

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

모든 코드는 Errors에 있습니다. 실패한 호출은 과금되지 않습니다.

가격

가격 호출당 1 크레딧. 플랜과 크레딧

참고

  • total은 맞는 광고 수를 광고 라이브러리가 밝힌 그대로 담습니다. 50,000을 넘으면 그 이상이라고만 밝히므로, 대신 totalRange({"lower": 50000})가 옵니다.
  • 사회 문제·선거·정치 광고(adType=political)에는 범위({text, lower, upper})로 된 spend, impressions, reach와 currency, 광고비를 낸 주체(paidBy)도 있습니다.
  • country는 ISO 3166-1 alpha-2 코드 하나, 또는 ALL(기본값)입니다. startDate와 endDate는 광고가 집행을 시작한 날을 제한합니다.
  • 각 광고의 ext에는 Meta만 밝히는 값이 있습니다: active, platforms(집행된 곳), adId, activeSeconds, 크리에이티브의 caption, linkDescription, ctaType, 광고비 주체 공시의 나머지(disclaimer: 라벨, Meta가 주체를 확인한 방법, 연락처), collationId와 collationCount(Meta가 한 크리에이티브로 묶은 광고), sensitive, 그리고 광고 라이브러리가 보내는 다른 모든 필드를 그 이름 그대로. 광고주의 ext에는 likes, categories, 광고에 쓰인 이름(nameInAd), deleted가 있고, 이미지와 동영상은 Meta의 다른 사본(resizedUrl, watermarkedUrl, sdUrl 등)을 각자의 ext에 둡니다.
  • 응답의 ext는 광고 라이브러리가 실제로 적용한 검색 조건입니다.
  • 다음 페이지는 cursor만 넘기면 됩니다.

이 페이지 내용