Sand AISand AI MAGI-2MAGI-2 अब SandBase पर है: 1080p वीडियो, नेटीव ऑडियो के साथअभी आज़माएँ

Facebook Company Ads

API दस्तावेज़
https://api.sandbase.ai/v1/api/facebook/company-ads

List 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.

मूल्य
से $0.0011USD / कॉल
मेथड
POST
प्रतिक्रिया
JSON
पैरामीटर
0 आवश्यक · 10 वैकल्पिक

प्लेग्राउंड

इनपुट
Opaque pagination cursor from a previous response's nextCursor.
Company's Ad Library page ID. Provide either pageId or companyName.
Sort order: impressions (highest first, the default) or recent (most recent).
Ad status filter. Defaults to ACTIVE.
Two-letter country code to scope results. Defaults to all countries.
Filter to ads with impressions on or before this date, in YYYY-MM-DD format.
Two-letter language code to filter ads (e.g. "EN", "ES", "FR").
Creative media type filter.
Filter to ads with impressions on or after this date, in YYYY-MM-DD format.
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.
आउटपुटतैयार

आपका आउटपुट यहाँ दिखाई देगा

इनपुट पूरा करें, फिर Run पर क्लिक करें।

API README

Facebook Company Ads API

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.

Use cases

  • Track the newest ads a competitor launches by sorting with sortBy: recent.
  • Collect the headline, body text, and call-to-action wording a brand uses in its ads.
  • Check which platforms (Facebook, Instagram, WhatsApp) a brand targets with each ad.
  • Pull image and video URLs from a brand's ads to review its creative style.

Request

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.

Parameters

NameTypeRequiredDescription
companyNamestringNoCompany 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.
countrystringNoTwo-letter country code to scope results. Defaults to 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.
languagestringNoTwo-letter language code to filter ads (e.g. "EN", "ES", "FR").
mediaTypestringNoCreative media type filter.
pageIdstringNoCompany's Ad Library page ID. Provide either pageId or companyName.
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. Defaults to ACTIVE.

Example response

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
}

Response fields

FieldMeaning
data.ads[].idID of the ad in the Ad Library.
data.ads[].text / data.ads[].titleMain body text and headline of the ad.
data.ads[].displayFormatFormat of the ad, such as DCO or VIDEO.
data.ads[].platformsList of platforms the ad runs on, such as FACEBOOK, INSTAGRAM, WHATSAPP.
data.ads[].startDate / data.ads[].endDateStart and end of the ad run as Unix timestamps in seconds.
data.ads[].activetrue when the ad is currently active.
data.ads[].ctaText / data.ads[].ctaType / data.ads[].linkUrlCall-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[].pageLikesID, name, and like count of the advertiser's Facebook page.
data.totalResultsTotal number of ads matching the request.

Notes

  • Pass 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.
  • To inspect a single ad in more detail, call Facebook Ad Details with the ad id.

Pricing

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

और जानें

संबंधित APIs

सभी APIs
APIकीमतप्रतिक्रिया
Facebook$0.0011 प्रति कॉल सेJSON
Facebook$0.0012 प्रति कॉल सेJSON
Facebook$0.00462 प्रति कॉल सेJSON
Facebook$0.0012 प्रति कॉल सेJSON
Facebook$0.0011 प्रति कॉल सेJSON
Facebook$0.0012 प्रति कॉल सेJSON

गाइड्स:Best Facebook API in 2026: Pricing Compared

प्रश्न

FAQ

Facebook Company Ads API का उपयोग कैसे करें?

https://api.sandbase.ai/v1/api/facebook/company-ads पर Authorization header (Bearer) में अपनी SandBase API key और parameters को JSON body के रूप में भेजें। आप इस पेज के Playground में बिना code लिखे भी इसे आज़मा सकते हैं।

Facebook Company Ads API की लागत कितनी है?

$0.0011 से प्रति call, आपकी SandBase balance से बिल किया जाएगा। आपसे केवल आपके किए गए calls के लिए शुल्क लिया जाता है; कोई subscription नहीं है।

Facebook Company Ads API कौन-से parameters स्वीकार करती है?

कोई parameters आवश्यक नहीं हैं। वैकल्पिक: cursor (string), pageId (string), sortBy (impressions, recent में से एक), status (ALL, ACTIVE, INACTIVE में से एक), country (string) और endDate (string) और 4 और। Parameters table और इस पेज का Playground हर field सूचीबद्ध करते हैं।

Facebook Company Ads API क्या लौटाती है?

एक JSON response जो उसी HTTP request में लौटाया जाता है (synchronous)। इस पेज का README एक sample response शामिल करता है।

क्या मुझे एक Facebook developer account या API key चाहिए?

नहीं। Facebook Company Ads SandBase के माध्यम से चलता है, इसलिए एक SandBase API key इस endpoint और catalog के हर अन्य API और model को कवर करती है। आपको अलग से Facebook API access के लिए आवेदन करने की आवश्यकता नहीं है।