Sand AISand AI MAGI-2MAGI-2 が SandBase に登場しました: ネイティブ音声付き 1080p 動画今すぐ試す

Facebook Ad Search

APIドキュメント
https://api.sandbase.ai/v1/api/facebook/ads-search

Search the Meta Ad Library by keyword and get matching ads (advertiser, creative text, CTA, platforms, and run dates) with cursor pagination.

料金
$0.0011 からUSD / 回
メソッド
POST
レスポンス
JSON
パラメータ
必須 1 件 · 任意 10 件

プレイグラウンド

入力
Keyword to search the Meta Ad Library for (e.g. "protein powder").
Restrict to all ads (default) or only political and issue ads.
Opaque pagination cursor from a previous response's nextCursor.
Sort order: impressions (highest first, the default) or recent (most recent).
Ad status filter.
Two-letter country code to scope results. Omit for all countries.
Filter to ads with impressions on or before this date, in YYYY-MM-DD format.
Creative media type filter.
Filter to ads with impressions on or after this date, in YYYY-MM-DD format.
Match mode for the query: loose keyword match (keyword_unordered, the default) or exact phrase (keyword_exact_phrase).
Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `totalResults`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on an ad that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge.
出力準備完了

出力はここに表示されます

入力を完了してから[実行]をクリックしてください。

API README

Facebook Ad Search API

Returns ads from the Meta Ad Library that match a keyword. Each ad includes the advertiser page, creative text, call to action, platforms, and start and end dates. The only required input is query.

Use cases

  • Track which creatives and offers a competitor runs for a brand name.
  • Collect ad copy and call-to-action types for a keyword to study how a niche advertises.
  • Find the advertiser pages that run ads for a product term, then check their page details.
  • Pull image links and landing page URLs for ads that mention a brand.

Request

curl -X POST "https://api.sandbase.ai/v1/api/facebook/ads-search" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "nike", "country": "US", "searchType": "keyword_exact_phrase"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
querystringYesKeyword to search the Meta Ad Library for (e.g. "protein powder").
adTypestringNoRestrict to all ads (default) or only political and issue ads.
countrystringNoTwo-letter country code to scope results. Omit for all countries.
cursorstringNoOpaque pagination cursor from a previous response's nextCursor.
endDatestringNoFilter to ads with impressions on or before this date, in YYYY-MM-DD format.
mediaTypestringNoCreative media type filter.
requireFieldsarrayNoOptional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example totalResults, and it is served only by a source that returns every o
searchTypestringNoMatch mode for the query: loose keyword match (keyword_unordered, the default) or exact phrase (keyword_exact_phrase).
sortBystringNoSort order: impressions (highest first, the default) or recent (most recent).
startDatestringNoFilter to ads with impressions on or after this date, in YYYY-MM-DD format.
statusstringNoAd status filter.

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "data": {
    "ads": [
      {
        "active": true,
        "adCount": null,
        "caption": "play.google.com",
        "categories": [
          "UNKNOWN"
        ],
        "creatives": [],
        "ctaText": "Install now",
        "ctaType": "INSTALL_MOBILE_APP",
        "displayFormat": "IMAGE",
        "endDate": 1793606400,
        "id": "1550534860016399",
        "isReshared": false,
        "linkDescription": ""
      }
    ],
    "nextCursor": "cur_I3725J-mWy22VxKd8YIRew",
    "totalResults": 19895
  },
  "found": true
}

Response fields

FieldMeaning
data.ads[].idID of the ad in the Meta Ad Library. sourceUrl links to the ad's library page.
data.ads[].pageName / pageId / pageUrlName, ID and Facebook URL of the advertiser page that runs the ad.
data.ads[].text / titleMain body text and headline of the ad.
data.ads[].ctaText / ctaTypeButton label shown on the ad (such as Shop now) and its type code (such as SHOP_NOW).
data.ads[].platformsList of platforms the ad runs on, such as FACEBOOK, INSTAGRAM, MESSENGER and AUDIENCE_NETWORK.
data.ads[].startDate / endDateStart and end of the ad run as Unix timestamps in seconds.
data.ads[].activetrue when the ad is currently active.
data.ads[].displayFormatCreative format, for example IMAGE or DPA. Ads in DPA format carry several items in creatives.
data.ads[].creatives[]Per-item creatives for multi-item ads. Each has title, body, image, linkUrl, ctaText and ctaType.
data.ads[].media[]Media files of the ad. Each has a type and a url.
data.totalResultsTotal number of ads that match the search.

Notes

  • Pass nextCursor from the response as cursor in the next request to get the next page.
  • Ad IDs are numeric strings. Use them with Facebook Ad Details to look up one ad.
  • To list ads for one advertiser instead of a keyword, use Facebook Company Ads.
  • adCount is null for the ads in this sample.

Pricing

Billed at the actual cost of each call, about $0.0011 for the request above. Failed calls are not charged.

さらに探索

関連 APIs

すべての APIs
API価格レスポンス
Facebook1回あたり $0.0011 からJSON
Facebook1回あたり $0.0012 からJSON
Facebook1回あたり $0.00462 からJSON
Facebook1回あたり $0.0012 からJSON
Facebook1回あたり $0.0011 からJSON
Facebook1回あたり $0.0012 からJSON

ガイド:Best Facebook API in 2026: Pricing Compared

質問

FAQ

Facebook Ad Search API はどのように使いますか?

Authorization ヘッダー(Bearer)に SandBase API key を指定し、パラメータを JSON ボディで送信して https://api.sandbase.ai/v1/api/facebook/ads-search に POST リクエストを送ります。このページの Playground で、コードを書かずに試すこともできます。

Facebook Ad Search API の料金はいくらですか?

1回あたり $0.0011 から、SandBase 残高から課金されます。課金対象はご利用分のみで、サブスクリプションはありません。

Facebook Ad Search API はどのパラメータを受け付けますか?

必須: query (string)。 任意: adType(all, political_and_issue_ads のいずれか), cursor (string), sortBy(impressions, recent のいずれか), status(ALL, ACTIVE, INACTIVE のいずれか), country (string) と endDate (string) と他 4 件。 このページの Parameters テーブルと Playground に、すべてのフィールドが一覧表示されています。

Facebook Ad Search API は何を返しますか?

同じ HTTP リクエスト内で返される JSON レスポンスです(同期)。 このページの README にサンプルレスポンスがあります。

Facebook の開発者アカウントまたは API key は必要ですか?

いいえ。Facebook Ad Search は SandBase 経由で動作するため、SandBase の API key 1つでこのエンドポイントと、カタログ内の他のすべての API とモデルを利用できます。Facebook の API アクセスを別途申請する必要はありません。