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>"
}
}Insights
Search the public Ad Library
Ad Library. Read only. Searches Meta’s or LinkedIn’s public Ad Library to see what ads other advertisers run, for competitor and market research. ### Which library is searched LinkedIn’s Ad Library (GET /rest/adLibrary) runs on a connected linkedin / linkedinads account, passed as connectionId. Passing a Meta account as connectionId also selects Meta. Rows are returned in the platform’s raw shape under data.
GET
https://api.aisa.one
/
apis
/
v1
/
ads
/
library
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>"
}
}Request contract
- Method and path: GET /apis/v1/ads/library
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/ads/library - connectionId: query; required
- platform: query; optional
- q: query; optional
- pageIds: query; optional
- advertiser: query; optional
- countries: query; optional
- adType: query; optional
- status: query; optional
- platforms: query; optional
- mediaType: query; optional
- languages: query; optional
- since: query; optional
- until: query; optional
- searchType: query; optional
- fields: query; optional
- limit: query; optional
- after: query; optional
{
"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",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}