curl --request GET \
--url https://api.aisa.one/apis/v1/ads/library \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/ads/library"
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/ads/library', 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/ads/library",
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/ads/library"
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/ads/library")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/ads/library")
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": [
{}
],
"paging": {
"after": "<string>",
"total": 123
},
"platform": "meta"
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"retryHint": "<string>",
"retryable": true,
"type": "<string>"
}
}Search the public Ad Library
curl --request GET \
--url https://api.aisa.one/apis/v1/ads/library \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/ads/library"
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/ads/library', 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/ads/library",
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/ads/library"
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/ads/library")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/ads/library")
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": [
{}
],
"paging": {
"after": "<string>",
"total": 123
},
"platform": "meta"
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"retryHint": "<string>",
"retryable": true,
"type": "<string>"
}
}请求规范
- 方法与路径: GET /apis/v1/ads/library
- 可用状态: enabled
- 请求 URL 模板:
https://api.aisa.one/apis/v1/ads/library - connectionId: query; 必填
- platform: query; 可选
- q: query; 可选
- pageIds: query; 可选
- advertiser: query; 可选
- countries: query; 可选
- adType: query; 可选
- status: query; 可选
- platforms: query; 可选
- mediaType: query; 可选
- languages: query; 可选
- since: query; 可选
- until: query; 可选
- searchType: query; 可选
- fields: query; 可选
- limit: query; 可选
- after: query; 可选
- Runtime 事实版本: fe60122939c67dc98a3a6ac6b97bd5c326b526105150c8959304dd2160d4dd09
{
"operationId": "get_aisa_ads_apis_v1_ads_library",
"method": "GET",
"path": "/apis/v1/ads/library",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [
{
"description": "The ads connection (adc_...) the request runs on: one of yours, from GET /apis/v1/ads/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
"in": "query",
"name": "connectionId",
"required": true,
"schema": {
"pattern": "^adc_[0-9A-Za-z]+$",
"type": "string"
}
},
{
"description": "Which archive to search. `meta` needs no connectionId. Required unless connectionId is given.",
"in": "query",
"name": "platform",
"required": false,
"schema": {
"enum": [
"meta",
"linkedin"
],
"type": "string"
}
},
{
"description": "Keyword search. Meta does not translate it, so write it in the ads' language. Required unless pageIds (Meta) or advertiser (LinkedIn) is given.",
"in": "query",
"name": "q",
"required": false,
"schema": {
"maxLength": 100,
"type": "string"
}
},
{
"description": "Meta only. Comma-separated Facebook Page ids (max 10) whose ads to list.",
"in": "query",
"name": "pageIds",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "LinkedIn only. Advertiser (Page) name to search.",
"in": "query",
"name": "advertiser",
"required": false,
"schema": {
"maxLength": 100,
"type": "string"
}
},
{
"description": "Comma-separated ISO 3166-1 alpha-2 codes the ads reached. Meta defaults to ALL (an explicit ALL is Meta-only); LinkedIn searches every market when omitted.",
"in": "query",
"name": "countries",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "Meta only.",
"in": "query",
"name": "adType",
"required": false,
"schema": {
"default": "ALL",
"enum": [
"ALL",
"POLITICAL_AND_ISSUE_ADS",
"HOUSING_ADS",
"EMPLOYMENT_ADS",
"FINANCIAL_PRODUCTS_AND_SERVICES_ADS"
],
"type": "string"
}
},
{
"description": "Meta only. ACTIVE = eligible for delivery right now.",
"in": "query",
"name": "status",
"required": false,
"schema": {
"default": "ACTIVE",
"enum": [
"ACTIVE",
"INACTIVE",
"ALL"
],
"type": "string"
}
},
{
"description": "Meta only. Comma-separated publisher platforms: FACEBOOK, INSTAGRAM, AUDIENCE_NETWORK, MESSENGER, WHATSAPP, OCULUS, THREADS, STREAMING_SERVICES.",
"in": "query",
"name": "platforms",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "Meta only.",
"in": "query",
"name": "mediaType",
"required": false,
"schema": {
"enum": [
"ALL",
"IMAGE",
"MEME",
"VIDEO",
"NONE"
],
"type": "string"
}
},
{
"description": "Meta only. Comma-separated ISO 639-1 codes of the ad text.",
"in": "query",
"name": "languages",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "Meta only. Earliest delivery date (YYYY-MM-DD). LinkedIn's archive does not filter by date, so it is a 400 there: filter on details.adStatistics.firstImpressionAt / latestImpressionAt instead (EU-delivered ads only).",
"in": "query",
"name": "since",
"required": false,
"schema": {
"format": "date",
"type": "string"
}
},
{
"description": "Meta only. Latest delivery date (YYYY-MM-DD); a 400 on LinkedIn, see since.",
"in": "query",
"name": "until",
"required": false,
"schema": {
"format": "date",
"type": "string"
}
},
{
"description": "Meta only. Whether q matches words in any order or as an exact phrase (comma-separate phrases to match all of them).",
"in": "query",
"name": "searchType",
"required": false,
"schema": {
"default": "KEYWORD_UNORDERED",
"enum": [
"KEYWORD_UNORDERED",
"KEYWORD_EXACT_PHRASE"
],
"type": "string"
}
},
{
"description": "Meta only. Comma-separated Graph field override.",
"in": "query",
"name": "fields",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "Rows per page. LinkedIn accepts at most 25.",
"in": "query",
"name": "limit",
"required": false,
"schema": {
"default": 25,
"maximum": 100,
"minimum": 1,
"type": "integer"
}
},
{
"description": "paging.after of the previous page.",
"in": "query",
"name": "after",
"required": false,
"schema": {
"type": "string"
}
}
],
"security": [
{
"bearerAuth": []
}
],
"x-aisa-status": "enabled",
"x-aisa-pricing": {
"description": "Ads operations are free. Ad spend is billed by the ad platform to the connected ad account, never by AIsa.",
"kind": "no_customer_charge"
},
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
费用与请求规则
当前未提供请求参考价格;请使用接口支持的报价功能确认费用。 最终费用以账户适用价格及实际结算为准。 公开参考值不是你的账户报价或最终扣费。对于支持 X-AISA-Cost-Mode: quote 的接口,执行前请针对完整请求获取免费报价;执行后通过响应费用元数据和 Usage Logs 核对结算费用。1 USD 等于 1,000,000 个整数 micro-USD。授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
查询参数
The ads connection (adc_...) the request runs on: one of yours, from GET /apis/v1/ads/connections. On a request with a JSON body it may be sent as a top-level body member instead.
^adc_[0-9A-Za-z]+$Which archive to search. meta needs no connectionId. Required unless connectionId is given.
meta, linkedin Keyword search. Meta does not translate it, so write it in the ads' language. Required unless pageIds (Meta) or advertiser (LinkedIn) is given.
100Meta only. Comma-separated Facebook Page ids (max 10) whose ads to list.
LinkedIn only. Advertiser (Page) name to search.
100Comma-separated ISO 3166-1 alpha-2 codes the ads reached. Meta defaults to ALL (an explicit ALL is Meta-only); LinkedIn searches every market when omitted.
Meta only.
ALL, POLITICAL_AND_ISSUE_ADS, HOUSING_ADS, EMPLOYMENT_ADS, FINANCIAL_PRODUCTS_AND_SERVICES_ADS Meta only. ACTIVE = eligible for delivery right now.
ACTIVE, INACTIVE, ALL Meta only. Comma-separated publisher platforms: FACEBOOK, INSTAGRAM, AUDIENCE_NETWORK, MESSENGER, WHATSAPP, OCULUS, THREADS, STREAMING_SERVICES.
Meta only.
ALL, IMAGE, MEME, VIDEO, NONE Meta only. Comma-separated ISO 639-1 codes of the ad text.
Meta only. Earliest delivery date (YYYY-MM-DD). LinkedIn's archive does not filter by date, so it is a 400 there: filter on details.adStatistics.firstImpressionAt / latestImpressionAt instead (EU-delivered ads only).
Meta only. Latest delivery date (YYYY-MM-DD); a 400 on LinkedIn, see since.
Meta only. Whether q matches words in any order or as an exact phrase (comma-separate phrases to match all of them).
KEYWORD_UNORDERED, KEYWORD_EXACT_PHRASE Meta only. Comma-separated Graph field override.
Rows per page. LinkedIn accepts at most 25.
1 <= x <= 100paging.after of the previous page.