Listar vigilâncias de anúncios
Liste suas vigilâncias de anúncios com o número de anúncios e a próxima execução.
GET
/
v1
/
ad-watches
List ad watches
curl --request GET \
--url https://api.querying.ai/v1/ad-watches \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.querying.ai/v1/ad-watches"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.querying.ai/v1/ad-watches', 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.querying.ai/v1/ad-watches",
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.querying.ai/v1/ad-watches"
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.querying.ai/v1/ad-watches")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.querying.ai/v1/ad-watches")
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{
"success": true,
"data": {
"watches": [
{
"id": "<string>",
"name": "<string>",
"platform": "meta_ad_library",
"search": {
"pageId": "123456789012345",
"country": "US"
},
"maxAds": 500,
"intervalHours": 24,
"stopAfterRuns": 5,
"archiveMedia": true,
"enabled": true,
"disabledReason": "<string>",
"webhookUrl": "<string>",
"nextRunAt": "2023-11-07T05:31:56Z",
"lastRunAt": "2023-11-07T05:31:56Z",
"lastRunStatus": "RUNNING",
"runCount": 123,
"activeAdCount": 123,
"stoppedAdCount": 123,
"estimatedCreditsPerRun": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"nextCursor": "<string>"
}
}
Parâmetros de consulta
⌘I
List ad watches
curl --request GET \
--url https://api.querying.ai/v1/ad-watches \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.querying.ai/v1/ad-watches"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.querying.ai/v1/ad-watches', 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.querying.ai/v1/ad-watches",
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.querying.ai/v1/ad-watches"
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.querying.ai/v1/ad-watches")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.querying.ai/v1/ad-watches")
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{
"success": true,
"data": {
"watches": [
{
"id": "<string>",
"name": "<string>",
"platform": "meta_ad_library",
"search": {
"pageId": "123456789012345",
"country": "US"
},
"maxAds": 500,
"intervalHours": 24,
"stopAfterRuns": 5,
"archiveMedia": true,
"enabled": true,
"disabledReason": "<string>",
"webhookUrl": "<string>",
"nextRunAt": "2023-11-07T05:31:56Z",
"lastRunAt": "2023-11-07T05:31:56Z",
"lastRunStatus": "RUNNING",
"runCount": 123,
"activeAdCount": 123,
"stoppedAdCount": 123,
"estimatedCreditsPerRun": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"nextCursor": "<string>"
}
}