Sand AISand AI MAGI-2MAGI-2 artık SandBase'de: yerel sesli 1080p videoŞimdi deneyin

Facebook Ad Search

API dokümanları
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.

Fiyat
Başlangıç fiyatı $0.0011USD / çağrı
Yöntem
POST
Yanıt
JSON
Parametreler
1 gerekli · 10 isteğe bağlı

Oynatma Alanı

Girdi
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.
ÇıktıHazır

Çıktınız burada görünecek

Girdileri tamamlayın, ardından Çalıştır'a tıklayın.

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.

Daha fazlasını keşfedin

İlgili APIs

Tüm APIs
APIFiyatYanıt
FacebookKullanım başına $0.0011'den itibarenJSON
FacebookKullanım başına $0.0012'den itibarenJSON
FacebookKullanım başına $0.00462'den itibarenJSON
FacebookKullanım başına $0.0012'den itibarenJSON
FacebookKullanım başına $0.0011'den itibarenJSON
FacebookKullanım başına $0.0012'den itibarenJSON

Kılavuzlar:Best Facebook API in 2026: Pricing Compared

Sorular

SSS

Facebook Ad Search API'sini nasıl kullanırım?

SandBase API anahtarınızı Authorization başlığında (Bearer) ve parametreleri JSON gövdesi olarak ile https://api.sandbase.ai/v1/api/facebook/ads-search adresine bir POST isteği gönderin. Ayrıca bu sayfadaki Playground’da kod yazmadan da deneyebilirsiniz.

Facebook Ad Search API'sinin fiyatı nedir?

çağrı başına $0.0011'dan başlayan, SandBase bakiyenizden tahsil edilir. Yalnızca yaptığınız çağrılar için ücretlendirilirsiniz; abonelik yoktur.

Facebook Ad Search API'si hangi parametreleri kabul eder?

Gerekli: query (string). İsteğe bağlı: adType (all, political_and_issue_ads arasından biri), cursor (string), sortBy (impressions, recent arasından biri), status (ALL, ACTIVE, INACTIVE arasından biri), country (string) ve endDate (string) ve 4 tane daha. Parametreler tablosu ve bu sayfadaki Playground, tüm alanları listeler.

Facebook Ad Search API'si ne döndürür?

Aynı HTTP isteğinde döndürülen bir JSON yanıtı (senkron). Bu sayfadaki README'de örnek bir yanıt yer alır.

Bir Facebook geliştirici hesabına veya API anahtarına ihtiyacım var mı?

Hayır. Facebook Ad Search, SandBase üzerinden çalışır; bu nedenle tek bir SandBase API anahtarı bu uç noktayı ve katalogdaki diğer tüm API'leri ve modelleri kapsar. Facebook API erişimi için ayrıca başvuru yapmanız gerekmez.