cursorstring
Opaque pagination cursor from a previous response's nextCursor.
https://api.sandbase.ai/v1/api/facebook/company-adsList the Meta Ad Library ads a company is running by page ID or company name (creative text, format, platforms, and run dates) with cursor pagination.
Çıktınız burada görünecek
Girdileri tamamlayın, ardından Çalıştır'a tıklayın.
Returns the Meta Ad Library ads a company runs, with ad text, display format, platforms, and start and end dates. You pass either a pageId or a companyName. Results come in pages with a cursor.
sortBy: recent.curl -X POST "https://api.sandbase.ai/v1/api/facebook/company-ads" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"pageId": "15087023444", "sortBy": "recent"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
companyName | string | No | Company name to search (e.g. "nike"). Exact-match and case-sensitive against the Meta Ad Library index; an advertiser with no indexed page returns found:false. |
country | string | No | Two-letter country code to scope results. Defaults to all countries. |
cursor | string | No | Opaque pagination cursor from a previous response's nextCursor. |
endDate | string | No | Filter to ads with impressions on or before this date, in YYYY-MM-DD format. |
language | string | No | Two-letter language code to filter ads (e.g. "EN", "ES", "FR"). |
mediaType | string | No | Creative media type filter. |
pageId | string | No | Company's Ad Library page ID. Provide either pageId or companyName. |
sortBy | string | No | Sort order: impressions (highest first, the default) or recent (most recent). |
startDate | string | No | Filter to ads with impressions on or after this date, in YYYY-MM-DD format. |
status | string | No | Ad status filter. Defaults to ACTIVE. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"ads": [
{
"active": true,
"adCount": 1,
"caption": "nike.in",
"categories": [
"UNKNOWN"
],
"creatives": [
{
"body": "Race the Night Away in The Nike After Dark Tour Collection",
"ctaText": "Shop Now",
"ctaType": "SHOP_NOW",
"image": "https://scontent-bos5-1.xx.fbcdn.net/v/t39.35426-6/867290372_1407183714905230_32…",
"linkUrl": "https://www.nike.in/styles-for-after-dark-tour/c/118363",
"title": "Step To The Starting Line."
}
],
"ctaText": "Shop now",
"ctaType": "SHOP_NOW",
"currency": "",
"displayFormat": "DCO",
"endDate": 1793606400,
"id": "2006384856715426",
"isReshared": false
}
],
"nextCursor": "cur_9-LwAOFGJDpFAVSYrocbjQ",
"totalResults": 3053
},
"found": true
}
| Field | Meaning |
|---|---|
data.ads[].id | ID of the ad in the Ad Library. |
data.ads[].text / data.ads[].title | Main body text and headline of the ad. |
data.ads[].displayFormat | Format of the ad, such as DCO or VIDEO. |
data.ads[].platforms | List of platforms the ad runs on, such as FACEBOOK, INSTAGRAM, WHATSAPP. |
data.ads[].startDate / data.ads[].endDate | Start and end of the ad run as Unix timestamps in seconds. |
data.ads[].active | true when the ad is currently active. |
data.ads[].ctaText / data.ads[].ctaType / data.ads[].linkUrl | Call-to-action button label, its type code (for example SHOP_NOW), and the landing page URL. |
data.ads[].creatives[] | Creative variants of the ad. Each has body, title, image, ctaText, and linkUrl. The list can be empty, as for video ads. |
data.ads[].media[] | Media files of the ad. Each has a type (photo or video) and a url. Video items also have videoUrl. |
data.ads[].pageId / data.ads[].pageName / data.ads[].pageLikes | ID, name, and like count of the advertiser's Facebook page. |
data.totalResults | Total number of ads matching the request. |
data.nextCursor as cursor in the next request to get the next page of ads.status defaults to ACTIVE. Set it to ALL or INACTIVE to see ended ads.companyName must match exactly and is case-sensitive. If no page matches, the response has found: false. Use Facebook Company Search to find a page ID.id.Billed at the actual cost of each call, about $0.0011 for the request above. Failed calls are not charged.
Geliştirmeye başlayın
Birleşik kimlik doğrulama ve kullanım takibi sunan Platform API uç noktası.
curl -X POST "https://api.sandbase.ai/v1/api/facebook/company-ads" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"pageId": "15087023444",
"sortBy": "recent"
}'SandBase API anahtarınızı sunucu ortamınıza ayarlayın. İstekler Bearer kimlik doğrulaması kullanır.
export SANDBASE_API_KEY="YOUR_API_KEY"Anahtarınızı sunucuda tutun. Tarayıcı kodunda açığa çıkarmayın.
cursorstringOpaque pagination cursor from a previous response's nextCursor.
pageIdstringCompany's Ad Library page ID. Provide either pageId or companyName.
sortBystringSort order: impressions (highest first, the default) or recent (most recent).
Olası değerler: impressions, recent
statusstringAd status filter. Defaults to ACTIVE.
Olası değerler: ALL, ACTIVE, INACTIVE
countrystringTwo-letter country code to scope results. Defaults to all countries.
endDatestringFilter to ads with impressions on or before this date, in YYYY-MM-DD format.
languagestringTwo-letter language code to filter ads (e.g. "EN", "ES", "FR").
mediaTypestringCreative media type filter.
Olası değerler: ALL, IMAGE, VIDEO, MEME, IMAGE_AND_MEME, NONE
startDatestringFilter to ads with impressions on or after this date, in YYYY-MM-DD format.
companyNamestringCompany name to search (e.g. "nike"). Exact-match and case-sensitive against the Meta Ad Library index; an advertiser with no indexed page returns found:false.
Bu API için kaydedilmiş örnek yanıt; görüntülerken canlı istek yapılmaz.
Yayınlanmış bir kaydedilmiş yanıt yok. Yanıtını incelemek için API'yi Playground'da çalıştırın.
Daha fazlasını keşfedin
| API | Fiyat | Yanıt |
|---|---|---|
Facebook Company AdsBu API Facebook | Kullanım başına $0.0011'den itibaren | JSON |
Facebook | Kullanım başına $0.0012'den itibaren | JSON |
Facebook | Kullanım başına $0.00462'den itibaren | JSON |
Facebook | Kullanım başına $0.0012'den itibaren | JSON |
Facebook | Kullanım başına $0.0011'den itibaren | JSON |
Facebook | Kullanım başına $0.0012'den itibaren | JSON |
Kılavuzlar:Best Facebook API in 2026: Pricing Compared
Sorular
SandBase API anahtarınızı Authorization başlığında (Bearer) ve parametreleri JSON gövdesi olarak ile https://api.sandbase.ai/v1/api/facebook/company-ads adresine bir POST isteği gönderin. Ayrıca bu sayfadaki Playground’da kod yazmadan da deneyebilirsiniz.
ç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.
Gerekli parametre yoktur. İsteğe bağlı: cursor (string), pageId (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.
Aynı HTTP isteğinde döndürülen bir JSON yanıtı (senkron). Bu sayfadaki README'de örnek bir yanıt yer alır.
Hayır. Facebook Company Ads, 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.