curl --request GET \
--url https://api.aisa.one/apis/v1/foreplay/brand/getBrandsByDomain \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/foreplay/brand/getBrandsByDomain"
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/brand/getBrandsByDomain', 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/brand/getBrandsByDomain",
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/brand/getBrandsByDomain"
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/brand/getBrandsByDomain")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/foreplay/brand/getBrandsByDomain")
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{
"metadata": {
"success": true,
"status_code": 200,
"count": 1,
"cursor": null
},
"data": [
{
"brand_id": "bYeKOahyGopmGKMHiWit",
"ad_library_id": "15087023444",
"name": "Nike"
}
],
"error": null
}Get Brands by Domain
Discover brands advertising from a given domain; returns brand_id and ad_library_id for downstream calls.
curl --request GET \
--url https://api.aisa.one/apis/v1/foreplay/brand/getBrandsByDomain \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/foreplay/brand/getBrandsByDomain"
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/brand/getBrandsByDomain', 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/brand/getBrandsByDomain",
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/brand/getBrandsByDomain"
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/brand/getBrandsByDomain")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/foreplay/brand/getBrandsByDomain")
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{
"metadata": {
"success": true,
"status_code": 200,
"count": 1,
"cursor": null
},
"data": [
{
"brand_id": "bYeKOahyGopmGKMHiWit",
"ad_library_id": "15087023444",
"name": "Nike"
}
],
"error": null
}domain. This is a discovery lookup — you do not need to already track the brands. Each brand record in data[] includes the Foreplay brand_id and the ad_library_id (page_id). Feed brand_id into get_foreplay-getadsbybrandid and ad_library_id into get_foreplay-brand-analytics. limit max is 10.
Example: GET /foreplay/brand/getBrandsByDomain?domain=nike.com returns Nike with brand_id: "bYeKOahyGopmGKMHiWit" and ad_library_id: "15087023444".
Billing: $0.02625 per item returned in data[]; empty results and errors are not charged. One credit per brand returned.
Related: get_foreplay-getadsbybrandid, get_foreplay-brand-analytics, get_foreplay-discovery-ads.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Domain name to search for. This can be a full URL (e.g., 'https://example.com') or just the domain (e.g., 'example.com'). The system will automatically format and clean the domain. This endpoint looks up candidate brands based on the provided domain. The returned brands are potential matches and are not guaranteed to be definitively associated with the domain.
Pagination limit (max 10). Controls the number of brands returned per request.
x <= 10Order of results: 'most_ranked' (default) or 'least_ranked'. Sorts brands by relevance ranking.
Response
JSON envelope with metadata and a data[] array of brand objects (each includes brand_id and ad_library_id). Each brand in data[] counts as one billed item.
The response is of type object.