limitinteger
Number of results (1-20). Each returned item is billed at about $0.0175, so this caps the cost of one call.
Domyślnie: 10
https://api.sandbase.ai/v1/api/foreplay/ad-searchSearch the Foreplay library of live and past social ads from Facebook, Instagram, TikTok, YouTube and more by keyword, format, platform, niche, language and run time, with creative, copy and landing page.
Twój wynik pojawi się tutaj
Uzupełnij dane wejściowe, a następnie kliknij Uruchom.
Search the Foreplay library of live and past social ads from Facebook, Instagram, TikTok, YouTube and more by keyword, format, platform, niche, language and run time, with creative, copy and landing page.
curl -X POST "https://api.sandbase.ai/v1/api/foreplay/ad-search" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "running shoes", "limit": 3}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
limit | integer | No | Pagination limit (max 250). Controls the number of ads returned per request. |
query | string | No | Search text for ad name or description. Leave empty to search all ads with filters only. |
cursor | string | No | Cursor for pagination. Use the cursor value from the previous response's metadata to get the next page of results. |
display_format | string | No | 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 | string | No | 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 |
languages | string | No | Filter by languages. Accepts various language formats: 'french', 'FR', 'romanian', 'ro', 'english', 'en', etc. Example: ?languages=en&languages=fr |
live | string | No | Filter ads by live status. true means currently active ads, false means inactive ads. Leave empty to include both. |
market_target | string | No | Filter by market target. Available targets: b2b (business-to-business), b2c (business-to-consumer) Example: ?market_target=b2b |
niches | string | No | Filter by one or more niches. Available niches: accessories, app/software, beauty, business/professional, education, entertainment, fashion, food/drink, health/wellness, home/garden, jewelry/watches, other, parenting, pe |
order | string | No | 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. |
publisher_platform | string | No | 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=ins |
running_duration_max_days | string | No | Filter ads by maximum running duration in days. Must be a positive integer. |
running_duration_min_days | string | No | Filter ads by minimum running duration in days. Must be a positive integer. |
start_date | string | No | 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 spec |
video_duration_max | string | No | Filter ads by maximum video duration in seconds. Only applies to video ads. |
video_duration_min | string | No | Filter ads by minimum video duration in seconds. Only applies to video ads. |
Billed at the actual upstream cost of each call (about $0.0525 for the request above). Failed calls are not charged.
Zacznij tworzyć
Punkt końcowy API platformy z jednolitym uwierzytelnianiem i śledzeniem użycia.
curl -X POST "https://api.sandbase.ai/v1/api/foreplay/ad-search" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"limit": 3,
"order": "newest",
"query": "running shoes"
}'Ustaw klucz API SandBase w środowisku serwera. Żądania używają uwierzytelniania Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Przechowuj klucz na serwerze. Nie ujawniaj go w kodzie przeglądarkowym.
limitintegerNumber of results (1-20). Each returned item is billed at about $0.0175, so this caps the cost of one call.
Domyślnie: 10
querystringSearch text for ad name or description. Leave empty to search all ads with filters only.
cursorstringCursor for pagination. Use the cursor value from the previous response's metadata to get the next page of results.
display_formatstringFilter 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`
Możliwe wartości: carousel, dco, dpa, event, image, multi_images, multi_medias, multi_videos, page_like, text, video
end_datestringEnd 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.
languagesstringFilter by languages. Accepts various language formats: 'french', 'FR', 'romanian', 'ro', 'english', 'en', etc. Example: `?languages=en&languages=fr`
livestringFilter ads by live status. `true` means currently active ads, `false` means inactive ads. Leave empty to include both.
market_targetstringFilter by market target. Available targets: b2b (business-to-business), b2c (business-to-consumer) Example: `?market_target=b2b`
nichesstringFilter by one or more niches. Available niches: accessories, app/software, beauty, business/professional, education, entertainment, fashion, food/drink, health/wellness, home/garden, jewelry/watches, other, parenting, pets, real estate, service business, medical, charity/nfp, kids/baby Example: `?niches=travel&niches=fashion`
orderstringOrder of results: 'newest' (default), 'oldest', 'longest_running', or 'most_relevant'. Sorts ads by creation date, longest running duration, or relevance to the search query.
Domyślnie: "newest"
Możliwe wartości: newest, oldest, longest_running, most_relevant
publisher_platformstringFilter 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`
Możliwe wartości: facebook, instagram, audience_network, messenger, tiktok, youtube, linkedin, threads, whatsapp
running_duration_max_daysstringFilter ads by maximum running duration in days. Must be a positive integer.
running_duration_min_daysstringFilter ads by minimum running duration in days. Must be a positive integer.
start_datestringStart 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.
video_duration_maxstringFilter ads by maximum video duration in seconds. Only applies to video ads.
video_duration_minstringFilter ads by minimum video duration in seconds. Only applies to video ads.
Zapisany przykładowy response dla tego API; podczas wyświetlania nie jest wykonywane żadne żądanie na żywo.
Nie opublikowano zapisanego response. Uruchom API w Playground, aby sprawdzić jego odpowiedź.
Odkryj więcej
| API | Cena | Odpowiedź |
|---|---|---|
Foreplay Ad SearchTo API Foreplay | Od $0.0525 za wywołanie | JSON |
Foreplay | Od $0.0525 za wywołanie | JSON |
Foreplay | Od $0.1225 za wywołanie | JSON |
Foreplay | Od $0.0175 za wywołanie | JSON |
Pytania
Wyślij żądanie POST do https://api.sandbase.ai/v1/api/foreplay/ad-search z kluczem API SandBase w nagłówku Authorization (Bearer) oraz parametrami w treści JSON. Możesz też wypróbować je w Playground na tej stronie bez pisania kodu.
Od $0.0525 za wywołanie, rozliczane z salda SandBase. Płacisz tylko za wykonane wywołania; nie ma subskrypcji.
Nie są wymagane żadne parametry. Opcjonalne: limit (integer), query (string), cursor (string), display_format (jedna z opcji: carousel, dco, dpa, event, image, multi_images, multi_medias, multi_videos, page_like, text, video), end_date (string) i languages (string) i jeszcze 10. Tabela Parameters oraz Playground na tej stronie zawierają wszystkie pola.
Odpowiedź JSON zwrócona w tym samym żądaniu HTTP (synchronicznie).
Nie. Foreplay Ad Search działa przez SandBase, więc jeden klucz API SandBase obejmuje ten endpoint i każde inne API oraz model w katalogu. Nie musisz osobno ubiegać się o dostęp do API Foreplay.