curl --request GET \
--url https://api.aisa.one/apis/v1/foreplay/discovery/ads \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/foreplay/discovery/ads"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/foreplay/discovery/ads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/foreplay/discovery/ads",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/foreplay/discovery/ads"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aisa.one/apis/v1/foreplay/discovery/ads")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/foreplay/discovery/ads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"brand_id": "bYeKOahyGopmGKMHiWit",
"brand_name": "Nike",
"display_format": "video",
"id": "abc123",
"live": true,
"publisher_platform": "facebook"
}
],
"error": null,
"metadata": {
"count": 1,
"cursor": null,
"status_code": 200,
"success": true
}
}Discovery Ads
Search across the Foreplay ad index (100M+ ads) with a text query plus filters. Each result in data[] is a full ad object (image/video URLs, transcription, brand metadata, targeting, and more).
empty results and 4xx/5xx errors are not charged.
curl --request GET \
--url https://api.aisa.one/apis/v1/foreplay/discovery/ads \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/foreplay/discovery/ads"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/foreplay/discovery/ads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/foreplay/discovery/ads",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/foreplay/discovery/ads"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aisa.one/apis/v1/foreplay/discovery/ads")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/foreplay/discovery/ads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"brand_id": "bYeKOahyGopmGKMHiWit",
"brand_name": "Nike",
"display_format": "video",
"id": "abc123",
"live": true,
"publisher_platform": "facebook"
}
],
"error": null,
"metadata": {
"count": 1,
"cursor": null,
"status_code": 200,
"success": true
}
}请求规范
- 方法与路径: GET /apis/v1/foreplay/discovery/ads
- 可用状态: enabled
- 请求 URL 模板:
https://api.aisa.one/apis/v1/foreplay/discovery/ads - cursor: query; 可选
- display_format: query; 可选
- end_date: query; 可选
- languages: query; 可选
- limit: query; 可选
- live: query; 可选
- market_target: query; 可选
- niches: query; 可选
- order: query; 可选
- publisher_platform: query; 可选
- query: query; 可选
- running_duration_max_days: query; 可选
- running_duration_min_days: query; 可选
- start_date: query; 可选
- video_duration_max: query; 可选
- video_duration_min: query; 可选
{
"operationId": "search_discovery_ads",
"method": "GET",
"path": "/apis/v1/foreplay/discovery/ads",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [
{
"description": "Cursor for pagination. Use the cursor value from the previous response's metadata to get the next page of results.",
"in": "query",
"name": "cursor",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "Filter by one or more display formats.\nAvailable formats (11): carousel, dco, dpa, event, image, multi_images, multi_medias, multi_videos, page_like, text, video\nExample: `?display_format=video&display_format=carousel`\n\n",
"in": "query",
"name": "display_format",
"required": false,
"schema": {
"enum": [
"carousel",
"dco",
"dpa",
"event",
"image",
"multi_images",
"multi_medias",
"multi_videos",
"page_like",
"text",
"video"
],
"type": "string"
}
},
{
"description": "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.",
"in": "query",
"name": "end_date",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "Filter by languages.\nAccepts various language formats: 'french', 'FR', 'romanian', 'ro', 'english', 'en', etc.\nExample: `?languages=en&languages=fr`\n\n",
"in": "query",
"name": "languages",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "Pagination limit (max 250). Controls the number of ads returned per request.",
"in": "query",
"name": "limit",
"required": false,
"schema": {
"default": 10,
"maximum": 250,
"type": "integer"
}
},
{
"description": "Filter ads by live status. `true` means currently active ads, `false` means inactive ads. Leave empty to include both.",
"in": "query",
"name": "live",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "Filter by market target.\nAvailable targets: b2b (business-to-business), b2c (business-to-consumer)\nExample: `?market_target=b2b`\n\n",
"in": "query",
"name": "market_target",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "Filter by one or more niches.\nAvailable 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\nExample: `?niches=travel&niches=fashion`\n\n",
"in": "query",
"name": "niches",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "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.",
"in": "query",
"name": "order",
"required": false,
"schema": {
"default": "newest",
"enum": [
"newest",
"oldest",
"longest_running",
"most_relevant"
],
"type": "string"
}
},
{
"description": "Filter by one or more publisher platforms.\nAvailable platforms: facebook, instagram, audience_network, messenger, tiktok, youtube, linkedin, threads, whatsapp\nExample: `?publisher_platform=facebook&publisher_platform=instagram`\n\n",
"in": "query",
"name": "publisher_platform",
"required": false,
"schema": {
"enum": [
"facebook",
"instagram",
"audience_network",
"messenger",
"tiktok",
"youtube",
"linkedin",
"threads",
"whatsapp"
],
"type": "string"
}
},
{
"description": "Search text for ad name or description. Leave empty to search all ads with filters only.",
"in": "query",
"name": "query",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "Filter ads by maximum running duration in days. Must be a positive integer.",
"in": "query",
"name": "running_duration_max_days",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "Filter ads by minimum running duration in days. Must be a positive integer.",
"in": "query",
"name": "running_duration_min_days",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "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.",
"in": "query",
"name": "start_date",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "Filter ads by maximum video duration in seconds. Only applies to video ads.",
"in": "query",
"name": "video_duration_max",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "Filter ads by minimum video duration in seconds. Only applies to video ads.",
"in": "query",
"name": "video_duration_min",
"required": false,
"schema": {
"type": "string"
}
}
],
"security": [
{
"bearerAuth": []
}
],
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
费用与请求规则
按实际计费结果数量收费。 默认请求预估费用:$0.875 USD。 最终费用以实际用量为准。 账户适用价格可能不同;支持报价的接口可按实际请求获取报价。授权
查询参数
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
carousel, dco, dpa, event, image, multi_images, multi_medias, multi_videos, page_like, text, video 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 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
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
facebook, instagram, audience_network, messenger, tiktok, youtube, linkedin, threads, whatsapp 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.
响应
JSON envelope with metadata and a data[] array of ad objects. Each ad in data[] counts as one billed item.
The response is of type object.