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

Foreplay Brand Ads

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

List the social ads a brand has run by Foreplay brand ID, with creative, copy, platforms, run dates and landing page, filtered by format, platform and run time.

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

प्लेग्राउंड

इनपुट
Brand ID(s) to search for. Can be a single ID or multiple IDs separated by commas.
Number of results (1-20). Each returned item is billed at about $0.0175, so this caps the cost of one call. अधिकतम: 20.
Best-effort live fallback. If the cached results are empty and `collect=true`, the API translates each brand id to its Meta page id (`adlibraryid`), kicks off a live fetch through our Spyder pipeline, and polls for ~30 seconds. Returns whatever is available at the end of the window — may still be empty if a brand has no Meta page on file, the page is restricted, deleted, or simply isn't running ads. Not perfect — use it as a fallback when the regular response is empty, not as a default.
Cursor for pagination. Use the cursor value from the previous response's metadata to get the next page of results.
Filter by one or more display formats. Available formats (11): carousel, dco, dpa, event, image, multi_images, multi_medias, multi_videos, page_like, text, video Example: `?display_format=video&display_format=carousel`
End date (inclusive). Format: 'YYYY-MM-DD', 'YYYY-MM-DDTHH:MM:SS', or 'YYYY-MM-DD HH:MM:SS'. If you provide only the date (e.g. '2024-11-12'), it will be interpreted as '2024-11-12 00:00:00'. To include all results for a given day, set end_date to 'YYYY-MM-DD 23:59:59' or to the next day at '00:00:00'. Examples: start_date=2024-11-12 00:00:00, end_date=2024-11-12 23:59:59.
Filter by languages. Accepts various language formats: 'french', 'FR', 'romanian', 'ro', 'english', 'en', etc. Example: `?languages=en&languages=fr`
Filter ads by live status. `true` means currently active ads, `false` means inactive ads. Leave empty to include both.
Filter by market target. Available targets: b2b (business-to-business), b2c (business-to-consumer) Example: `?market_target=b2b`
Filter by one or more niches. Available niches: travel, food, fashion, beauty, health, technology, automotive, finance, education, entertainment, sports, home, pets, business, other Example: `?niches=travel&niches=fashion`
Order of results: 'newest' (default), 'oldest', 'longest_running', or 'most_relevant'. Sorts ads by creation date, longest running duration, or relevance to the search query.
Filter by one or more publisher platforms. Available platforms: facebook, instagram, audience_network, messenger, tiktok, youtube, linkedin, threads, whatsapp Example: `?publisher_platform=facebook&publisher_platform=instagram`
Filter ads by maximum running duration in days. Must be a positive integer.
Filter ads by minimum running duration in days. Must be a positive integer.
Start date (inclusive). Format: 'YYYY-MM-DD', 'YYYY-MM-DDTHH:MM:SS', or 'YYYY-MM-DD HH:MM:SS'. If you provide only the date (e.g. '2024-11-12'), it will be interpreted as '2024-11-12 00:00:00'. To get all ads from a specific day, set end_date to 'YYYY-MM-DD 23:59:59' or to the next day at '00:00:00'. Examples: start_date=2024-11-12 00:00:00, end_date=2024-11-12 23:59:59.
Filter ads by maximum video duration in seconds. Only applies to video ads.
Filter ads by minimum video duration in seconds. Only applies to video ads.
आउटपुटतैयार

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

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

API README

Foreplay Brand Ads

List the social ads a brand has run by Foreplay brand ID, with creative, copy, platforms, run dates and landing page, filtered by format, platform and run time.

Request

curl -X POST "https://api.sandbase.ai/v1/api/foreplay/brand-ads" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"brand_ids": ["3YfFtyvZ3viTAbbLaWLV"], "limit": 3}'

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

Parameters

NameTypeRequiredDescription
brand_idsarrayYesBrand ID(s) to search for. Can be a single ID or multiple IDs separated by commas.
limitintegerNoPagination limit (max 250). Controls the number of ads returned per request.
collectstringNoBest-effort live fallback. If the cached results are empty and collect=true, the API translates each brand id to its Meta page id (adlibraryid), kicks off a live fetch through our Spyder pipeline, and polls for ~30 s
cursorstringNoCursor for pagination. Use the cursor value from the previous response's metadata to get the next page of results.
display_formatstringNoFilter by one or more display formats. Available formats (11): carousel, dco, dpa, event, image, multi_images, multi_medias, multi_videos, page_like, text, video Example: ?display_format=video&display_format=carousel
end_datestringNoEnd date (inclusive). Format: 'YYYY-MM-DD', 'YYYY-MM-DDTHH:MM:SS', or 'YYYY-MM-DD HH:MM:SS'. If you provide only the date (e.g. '2024-11-12'), it will be interpreted as '2024-11-12 00:00:00'. To include all results for a
languagesstringNoFilter by languages. Accepts various language formats: 'french', 'FR', 'romanian', 'ro', 'english', 'en', etc. Example: ?languages=en&languages=fr
livestringNoFilter ads by live status. true means currently active ads, false means inactive ads. Leave empty to include both.
market_targetstringNoFilter by market target. Available targets: b2b (business-to-business), b2c (business-to-consumer) Example: ?market_target=b2b
nichesstringNoFilter by one or more niches. Available niches: travel, food, fashion, beauty, health, technology, automotive, finance, education, entertainment, sports, home, pets, business, other Example: `?niches=travel&niches=fashio
orderstringNoOrder of results: 'newest' (default), 'oldest', 'longest_running', or 'most_relevant'. Sorts ads by creation date, longest running duration, or relevance to the search query.
publisher_platformstringNoFilter by one or more publisher platforms. Available platforms: facebook, instagram, audience_network, messenger, tiktok, youtube, linkedin, threads, whatsapp Example: `?publisher_platform=facebook&publisher_platform=ins
running_duration_max_daysstringNoFilter ads by maximum running duration in days. Must be a positive integer.
running_duration_min_daysstringNoFilter ads by minimum running duration in days. Must be a positive integer.
start_datestringNoStart date (inclusive). Format: 'YYYY-MM-DD', 'YYYY-MM-DDTHH:MM:SS', or 'YYYY-MM-DD HH:MM:SS'. If you provide only the date (e.g. '2024-11-12'), it will be interpreted as '2024-11-12 00:00:00'. To get all ads from a spec
video_duration_maxstringNoFilter ads by maximum video duration in seconds. Only applies to video ads.
video_duration_minstringNoFilter ads by minimum video duration in seconds. Only applies to video ads.

Pricing

Billed at the actual upstream cost of each call (about $0.0525 for the request above). Failed calls are not charged.

और जानें

संबंधित APIs

सभी APIs
APIकीमतप्रतिक्रिया
Foreplay$0.0525 प्रति कॉल सेJSON
Foreplay$0.0525 प्रति कॉल सेJSON
Foreplay$0.1225 प्रति कॉल सेJSON
Foreplay$0.0175 प्रति कॉल सेJSON

प्रश्न

FAQ

Foreplay Brand Ads API का उपयोग कैसे करें?

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

Foreplay Brand Ads API की लागत कितनी है?

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

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

आवश्यक: brand_ids (array)। वैकल्पिक: limit (integer), collect (string), cursor (string), display_format (carousel, dco, dpa, event, image, multi_images, multi_medias, multi_videos, page_like, text, video में से एक), end_date (string) और languages (string) और 10 और। Parameters table और इस पेज का Playground हर field सूचीबद्ध करते हैं।

Foreplay Brand Ads API क्या लौटाती है?

एक JSON response जो उसी HTTP request में लौटाया जाता है (synchronous)।

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

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