Get one competitor ad and its video
curl --request GET \
--url https://api.creatorline.io/v1/competitor-ads/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.creatorline.io/v1/competitor-ads/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.creatorline.io/v1/competitor-ads/{id}', 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.creatorline.io/v1/competitor-ads/{id}",
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.creatorline.io/v1/competitor-ads/{id}"
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.creatorline.io/v1/competitor-ads/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.creatorline.io/v1/competitor-ads/{id}")
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{
"brand_id": "<string>",
"ad": {
"id": "<string>",
"competitor": "<string>",
"competitor_id": "<string>",
"platform": "meta",
"format": "video",
"days_running": 123,
"is_new": true,
"text": "<string>",
"title": "<string>",
"cta": "<string>",
"landing_url": "<string>",
"versions": 123,
"started_at": "2023-11-07T05:31:56Z",
"cover_url": "<string>",
"video_url": "<string>"
},
"download_url": "<string>",
"media_problem": "<string>"
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Missing or invalid API key."
},
"request_id": "req_8fQ2mRxK1pLd"
}{
"error": {
"type": "not_found_error",
"code": "resource_missing",
"message": "No such generation."
},
"request_id": "req_8fQ2mRxK1pLd"
}Competitors
Get one competitor ad and its video
One ad the plan shows, and for a video ad download_url: our kept copy of its video, made on the first ask when there is none (up to a minute). ?include_media=false reads it without copying anything. An ad past the plan’s cap is a 404.
GET
/
v1
/
competitor-ads
/
{id}
Get one competitor ad and its video
curl --request GET \
--url https://api.creatorline.io/v1/competitor-ads/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.creatorline.io/v1/competitor-ads/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.creatorline.io/v1/competitor-ads/{id}', 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.creatorline.io/v1/competitor-ads/{id}",
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.creatorline.io/v1/competitor-ads/{id}"
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.creatorline.io/v1/competitor-ads/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.creatorline.io/v1/competitor-ads/{id}")
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{
"brand_id": "<string>",
"ad": {
"id": "<string>",
"competitor": "<string>",
"competitor_id": "<string>",
"platform": "meta",
"format": "video",
"days_running": 123,
"is_new": true,
"text": "<string>",
"title": "<string>",
"cta": "<string>",
"landing_url": "<string>",
"versions": 123,
"started_at": "2023-11-07T05:31:56Z",
"cover_url": "<string>",
"video_url": "<string>"
},
"download_url": "<string>",
"media_problem": "<string>"
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Missing or invalid API key."
},
"request_id": "req_8fQ2mRxK1pLd"
}{
"error": {
"type": "not_found_error",
"code": "resource_missing",
"message": "No such generation."
},
"request_id": "req_8fQ2mRxK1pLd"
}Authorizations
bearerAuthapiKeyHeader