import Whop from '@whop/sdk';
const client = new Whop({
apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});
const reachEstimate = await client.adGroups.estimateReach({ platform: 'meta' });
console.log(reachEstimate.users_lower_bound);curl --request POST \
--url https://api.whop.com/api/v1/ad_groups/estimate_reach \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"platform": "meta",
"account_id": "<string>",
"audiences": {
"exclude": [
"<string>"
],
"include": [
"<string>"
]
},
"demographics": {
"automatic": true,
"maximum_age": 123,
"minimum_age": 123
},
"detailed_targeting": {
"behaviors": [
{
"id": "<string>",
"name": "<string>"
}
],
"demographics": [
{
"id": "<string>",
"name": "<string>"
}
],
"interests": [
{
"id": "<string>",
"name": "<string>"
}
]
},
"devices": {
"operating_systems": [
{
"minimum_version": "<string>"
}
],
"platforms": []
},
"languages": [
"<string>"
],
"regions": {
"exclude": {
"cities": [
{
"key": "<string>",
"name": "<string>"
}
],
"countries": [
"<string>"
],
"country_groups": [
"<string>"
],
"custom_locations": [
{
"latitude": 123,
"longitude": 123,
"radius": 123,
"name": "<string>"
}
],
"regions": [
"<string>"
],
"zips": [
"<string>"
]
},
"include": {
"cities": [
{
"key": "<string>",
"name": "<string>"
}
],
"countries": [
"<string>"
],
"country_groups": [
"<string>"
],
"custom_locations": [
{
"latitude": 123,
"longitude": 123,
"radius": 123,
"name": "<string>"
}
],
"regions": [
"<string>"
],
"zips": [
"<string>"
]
}
}
}
'import requests
url = "https://api.whop.com/api/v1/ad_groups/estimate_reach"
payload = {
"platform": "meta",
"account_id": "<string>",
"audiences": {
"exclude": ["<string>"],
"include": ["<string>"]
},
"demographics": {
"automatic": True,
"maximum_age": 123,
"minimum_age": 123
},
"detailed_targeting": {
"behaviors": [
{
"id": "<string>",
"name": "<string>"
}
],
"demographics": [
{
"id": "<string>",
"name": "<string>"
}
],
"interests": [
{
"id": "<string>",
"name": "<string>"
}
]
},
"devices": {
"operating_systems": [{ "minimum_version": "<string>" }],
"platforms": []
},
"languages": ["<string>"],
"regions": {
"exclude": {
"cities": [
{
"key": "<string>",
"name": "<string>"
}
],
"countries": ["<string>"],
"country_groups": ["<string>"],
"custom_locations": [
{
"latitude": 123,
"longitude": 123,
"radius": 123,
"name": "<string>"
}
],
"regions": ["<string>"],
"zips": ["<string>"]
},
"include": {
"cities": [
{
"key": "<string>",
"name": "<string>"
}
],
"countries": ["<string>"],
"country_groups": ["<string>"],
"custom_locations": [
{
"latitude": 123,
"longitude": 123,
"radius": 123,
"name": "<string>"
}
],
"regions": ["<string>"],
"zips": ["<string>"]
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.whop.com/api/v1/ad_groups/estimate_reach",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'platform' => 'meta',
'account_id' => '<string>',
'audiences' => [
'exclude' => [
'<string>'
],
'include' => [
'<string>'
]
],
'demographics' => [
'automatic' => true,
'maximum_age' => 123,
'minimum_age' => 123
],
'detailed_targeting' => [
'behaviors' => [
[
'id' => '<string>',
'name' => '<string>'
]
],
'demographics' => [
[
'id' => '<string>',
'name' => '<string>'
]
],
'interests' => [
[
'id' => '<string>',
'name' => '<string>'
]
]
],
'devices' => [
'operating_systems' => [
[
'minimum_version' => '<string>'
]
],
'platforms' => [
]
],
'languages' => [
'<string>'
],
'regions' => [
'exclude' => [
'cities' => [
[
'key' => '<string>',
'name' => '<string>'
]
],
'countries' => [
'<string>'
],
'country_groups' => [
'<string>'
],
'custom_locations' => [
[
'latitude' => 123,
'longitude' => 123,
'radius' => 123,
'name' => '<string>'
]
],
'regions' => [
'<string>'
],
'zips' => [
'<string>'
]
],
'include' => [
'cities' => [
[
'key' => '<string>',
'name' => '<string>'
]
],
'countries' => [
'<string>'
],
'country_groups' => [
'<string>'
],
'custom_locations' => [
[
'latitude' => 123,
'longitude' => 123,
'radius' => 123,
'name' => '<string>'
]
],
'regions' => [
'<string>'
],
'zips' => [
'<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.whop.com/api/v1/ad_groups/estimate_reach"
payload := strings.NewReader("{\n \"platform\": \"meta\",\n \"account_id\": \"<string>\",\n \"audiences\": {\n \"exclude\": [\n \"<string>\"\n ],\n \"include\": [\n \"<string>\"\n ]\n },\n \"demographics\": {\n \"automatic\": true,\n \"maximum_age\": 123,\n \"minimum_age\": 123\n },\n \"detailed_targeting\": {\n \"behaviors\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"demographics\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"interests\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n ]\n },\n \"devices\": {\n \"operating_systems\": [\n {\n \"minimum_version\": \"<string>\"\n }\n ],\n \"platforms\": []\n },\n \"languages\": [\n \"<string>\"\n ],\n \"regions\": {\n \"exclude\": {\n \"cities\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"countries\": [\n \"<string>\"\n ],\n \"country_groups\": [\n \"<string>\"\n ],\n \"custom_locations\": [\n {\n \"latitude\": 123,\n \"longitude\": 123,\n \"radius\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"regions\": [\n \"<string>\"\n ],\n \"zips\": [\n \"<string>\"\n ]\n },\n \"include\": {\n \"cities\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"countries\": [\n \"<string>\"\n ],\n \"country_groups\": [\n \"<string>\"\n ],\n \"custom_locations\": [\n {\n \"latitude\": 123,\n \"longitude\": 123,\n \"radius\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"regions\": [\n \"<string>\"\n ],\n \"zips\": [\n \"<string>\"\n ]\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.whop.com/api/v1/ad_groups/estimate_reach")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"platform\": \"meta\",\n \"account_id\": \"<string>\",\n \"audiences\": {\n \"exclude\": [\n \"<string>\"\n ],\n \"include\": [\n \"<string>\"\n ]\n },\n \"demographics\": {\n \"automatic\": true,\n \"maximum_age\": 123,\n \"minimum_age\": 123\n },\n \"detailed_targeting\": {\n \"behaviors\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"demographics\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"interests\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n ]\n },\n \"devices\": {\n \"operating_systems\": [\n {\n \"minimum_version\": \"<string>\"\n }\n ],\n \"platforms\": []\n },\n \"languages\": [\n \"<string>\"\n ],\n \"regions\": {\n \"exclude\": {\n \"cities\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"countries\": [\n \"<string>\"\n ],\n \"country_groups\": [\n \"<string>\"\n ],\n \"custom_locations\": [\n {\n \"latitude\": 123,\n \"longitude\": 123,\n \"radius\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"regions\": [\n \"<string>\"\n ],\n \"zips\": [\n \"<string>\"\n ]\n },\n \"include\": {\n \"cities\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"countries\": [\n \"<string>\"\n ],\n \"country_groups\": [\n \"<string>\"\n ],\n \"custom_locations\": [\n {\n \"latitude\": 123,\n \"longitude\": 123,\n \"radius\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"regions\": [\n \"<string>\"\n ],\n \"zips\": [\n \"<string>\"\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.whop.com/api/v1/ad_groups/estimate_reach")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"platform\": \"meta\",\n \"account_id\": \"<string>\",\n \"audiences\": {\n \"exclude\": [\n \"<string>\"\n ],\n \"include\": [\n \"<string>\"\n ]\n },\n \"demographics\": {\n \"automatic\": true,\n \"maximum_age\": 123,\n \"minimum_age\": 123\n },\n \"detailed_targeting\": {\n \"behaviors\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"demographics\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"interests\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n ]\n },\n \"devices\": {\n \"operating_systems\": [\n {\n \"minimum_version\": \"<string>\"\n }\n ],\n \"platforms\": []\n },\n \"languages\": [\n \"<string>\"\n ],\n \"regions\": {\n \"exclude\": {\n \"cities\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"countries\": [\n \"<string>\"\n ],\n \"country_groups\": [\n \"<string>\"\n ],\n \"custom_locations\": [\n {\n \"latitude\": 123,\n \"longitude\": 123,\n \"radius\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"regions\": [\n \"<string>\"\n ],\n \"zips\": [\n \"<string>\"\n ]\n },\n \"include\": {\n \"cities\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"countries\": [\n \"<string>\"\n ],\n \"country_groups\": [\n \"<string>\"\n ],\n \"custom_locations\": [\n {\n \"latitude\": 123,\n \"longitude\": 123,\n \"radius\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"regions\": [\n \"<string>\"\n ],\n \"zips\": [\n \"<string>\"\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"users_lower_bound": 123,
"users_upper_bound": 123
}{
"error": {
"message": "<string>",
"type": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>"
}
}Estimate Ad Group Reach
Estimates how many people a draft targeting spec can reach, before an ad group is created. The body takes the same targeting fields as creating an ad group — regions, demographics, detailed_targeting, audiences, languages, and devices — and nothing is persisted.
import Whop from '@whop/sdk';
const client = new Whop({
apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});
const reachEstimate = await client.adGroups.estimateReach({ platform: 'meta' });
console.log(reachEstimate.users_lower_bound);curl --request POST \
--url https://api.whop.com/api/v1/ad_groups/estimate_reach \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"platform": "meta",
"account_id": "<string>",
"audiences": {
"exclude": [
"<string>"
],
"include": [
"<string>"
]
},
"demographics": {
"automatic": true,
"maximum_age": 123,
"minimum_age": 123
},
"detailed_targeting": {
"behaviors": [
{
"id": "<string>",
"name": "<string>"
}
],
"demographics": [
{
"id": "<string>",
"name": "<string>"
}
],
"interests": [
{
"id": "<string>",
"name": "<string>"
}
]
},
"devices": {
"operating_systems": [
{
"minimum_version": "<string>"
}
],
"platforms": []
},
"languages": [
"<string>"
],
"regions": {
"exclude": {
"cities": [
{
"key": "<string>",
"name": "<string>"
}
],
"countries": [
"<string>"
],
"country_groups": [
"<string>"
],
"custom_locations": [
{
"latitude": 123,
"longitude": 123,
"radius": 123,
"name": "<string>"
}
],
"regions": [
"<string>"
],
"zips": [
"<string>"
]
},
"include": {
"cities": [
{
"key": "<string>",
"name": "<string>"
}
],
"countries": [
"<string>"
],
"country_groups": [
"<string>"
],
"custom_locations": [
{
"latitude": 123,
"longitude": 123,
"radius": 123,
"name": "<string>"
}
],
"regions": [
"<string>"
],
"zips": [
"<string>"
]
}
}
}
'import requests
url = "https://api.whop.com/api/v1/ad_groups/estimate_reach"
payload = {
"platform": "meta",
"account_id": "<string>",
"audiences": {
"exclude": ["<string>"],
"include": ["<string>"]
},
"demographics": {
"automatic": True,
"maximum_age": 123,
"minimum_age": 123
},
"detailed_targeting": {
"behaviors": [
{
"id": "<string>",
"name": "<string>"
}
],
"demographics": [
{
"id": "<string>",
"name": "<string>"
}
],
"interests": [
{
"id": "<string>",
"name": "<string>"
}
]
},
"devices": {
"operating_systems": [{ "minimum_version": "<string>" }],
"platforms": []
},
"languages": ["<string>"],
"regions": {
"exclude": {
"cities": [
{
"key": "<string>",
"name": "<string>"
}
],
"countries": ["<string>"],
"country_groups": ["<string>"],
"custom_locations": [
{
"latitude": 123,
"longitude": 123,
"radius": 123,
"name": "<string>"
}
],
"regions": ["<string>"],
"zips": ["<string>"]
},
"include": {
"cities": [
{
"key": "<string>",
"name": "<string>"
}
],
"countries": ["<string>"],
"country_groups": ["<string>"],
"custom_locations": [
{
"latitude": 123,
"longitude": 123,
"radius": 123,
"name": "<string>"
}
],
"regions": ["<string>"],
"zips": ["<string>"]
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.whop.com/api/v1/ad_groups/estimate_reach",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'platform' => 'meta',
'account_id' => '<string>',
'audiences' => [
'exclude' => [
'<string>'
],
'include' => [
'<string>'
]
],
'demographics' => [
'automatic' => true,
'maximum_age' => 123,
'minimum_age' => 123
],
'detailed_targeting' => [
'behaviors' => [
[
'id' => '<string>',
'name' => '<string>'
]
],
'demographics' => [
[
'id' => '<string>',
'name' => '<string>'
]
],
'interests' => [
[
'id' => '<string>',
'name' => '<string>'
]
]
],
'devices' => [
'operating_systems' => [
[
'minimum_version' => '<string>'
]
],
'platforms' => [
]
],
'languages' => [
'<string>'
],
'regions' => [
'exclude' => [
'cities' => [
[
'key' => '<string>',
'name' => '<string>'
]
],
'countries' => [
'<string>'
],
'country_groups' => [
'<string>'
],
'custom_locations' => [
[
'latitude' => 123,
'longitude' => 123,
'radius' => 123,
'name' => '<string>'
]
],
'regions' => [
'<string>'
],
'zips' => [
'<string>'
]
],
'include' => [
'cities' => [
[
'key' => '<string>',
'name' => '<string>'
]
],
'countries' => [
'<string>'
],
'country_groups' => [
'<string>'
],
'custom_locations' => [
[
'latitude' => 123,
'longitude' => 123,
'radius' => 123,
'name' => '<string>'
]
],
'regions' => [
'<string>'
],
'zips' => [
'<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.whop.com/api/v1/ad_groups/estimate_reach"
payload := strings.NewReader("{\n \"platform\": \"meta\",\n \"account_id\": \"<string>\",\n \"audiences\": {\n \"exclude\": [\n \"<string>\"\n ],\n \"include\": [\n \"<string>\"\n ]\n },\n \"demographics\": {\n \"automatic\": true,\n \"maximum_age\": 123,\n \"minimum_age\": 123\n },\n \"detailed_targeting\": {\n \"behaviors\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"demographics\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"interests\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n ]\n },\n \"devices\": {\n \"operating_systems\": [\n {\n \"minimum_version\": \"<string>\"\n }\n ],\n \"platforms\": []\n },\n \"languages\": [\n \"<string>\"\n ],\n \"regions\": {\n \"exclude\": {\n \"cities\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"countries\": [\n \"<string>\"\n ],\n \"country_groups\": [\n \"<string>\"\n ],\n \"custom_locations\": [\n {\n \"latitude\": 123,\n \"longitude\": 123,\n \"radius\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"regions\": [\n \"<string>\"\n ],\n \"zips\": [\n \"<string>\"\n ]\n },\n \"include\": {\n \"cities\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"countries\": [\n \"<string>\"\n ],\n \"country_groups\": [\n \"<string>\"\n ],\n \"custom_locations\": [\n {\n \"latitude\": 123,\n \"longitude\": 123,\n \"radius\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"regions\": [\n \"<string>\"\n ],\n \"zips\": [\n \"<string>\"\n ]\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.whop.com/api/v1/ad_groups/estimate_reach")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"platform\": \"meta\",\n \"account_id\": \"<string>\",\n \"audiences\": {\n \"exclude\": [\n \"<string>\"\n ],\n \"include\": [\n \"<string>\"\n ]\n },\n \"demographics\": {\n \"automatic\": true,\n \"maximum_age\": 123,\n \"minimum_age\": 123\n },\n \"detailed_targeting\": {\n \"behaviors\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"demographics\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"interests\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n ]\n },\n \"devices\": {\n \"operating_systems\": [\n {\n \"minimum_version\": \"<string>\"\n }\n ],\n \"platforms\": []\n },\n \"languages\": [\n \"<string>\"\n ],\n \"regions\": {\n \"exclude\": {\n \"cities\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"countries\": [\n \"<string>\"\n ],\n \"country_groups\": [\n \"<string>\"\n ],\n \"custom_locations\": [\n {\n \"latitude\": 123,\n \"longitude\": 123,\n \"radius\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"regions\": [\n \"<string>\"\n ],\n \"zips\": [\n \"<string>\"\n ]\n },\n \"include\": {\n \"cities\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"countries\": [\n \"<string>\"\n ],\n \"country_groups\": [\n \"<string>\"\n ],\n \"custom_locations\": [\n {\n \"latitude\": 123,\n \"longitude\": 123,\n \"radius\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"regions\": [\n \"<string>\"\n ],\n \"zips\": [\n \"<string>\"\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.whop.com/api/v1/ad_groups/estimate_reach")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"platform\": \"meta\",\n \"account_id\": \"<string>\",\n \"audiences\": {\n \"exclude\": [\n \"<string>\"\n ],\n \"include\": [\n \"<string>\"\n ]\n },\n \"demographics\": {\n \"automatic\": true,\n \"maximum_age\": 123,\n \"minimum_age\": 123\n },\n \"detailed_targeting\": {\n \"behaviors\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"demographics\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"interests\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n ]\n },\n \"devices\": {\n \"operating_systems\": [\n {\n \"minimum_version\": \"<string>\"\n }\n ],\n \"platforms\": []\n },\n \"languages\": [\n \"<string>\"\n ],\n \"regions\": {\n \"exclude\": {\n \"cities\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"countries\": [\n \"<string>\"\n ],\n \"country_groups\": [\n \"<string>\"\n ],\n \"custom_locations\": [\n {\n \"latitude\": 123,\n \"longitude\": 123,\n \"radius\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"regions\": [\n \"<string>\"\n ],\n \"zips\": [\n \"<string>\"\n ]\n },\n \"include\": {\n \"cities\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"countries\": [\n \"<string>\"\n ],\n \"country_groups\": [\n \"<string>\"\n ],\n \"custom_locations\": [\n {\n \"latitude\": 123,\n \"longitude\": 123,\n \"radius\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"regions\": [\n \"<string>\"\n ],\n \"zips\": [\n \"<string>\"\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"users_lower_bound": 123,
"users_upper_bound": 123
}{
"error": {
"message": "<string>",
"type": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>"
}
}Authorizations
A company API key, company scoped JWT, app API key, or user OAuth token. You must prepend your key/token with the word 'Bearer', which will look like Bearer ***************************
Headers
A unique key that makes this request safe to retry. See Idempotent requests.
255"d9105228-4a08-46b1-8b91-42fed586d383"
Pins the request to a dated API version.
"2026-07-20"
Body
The ad network the estimate runs on.
meta Account to estimate on behalf of. Defaults to the authenticated account.
Saved audiences to deliver to or exclude. Can't be combined with demographics.automatic.
Show child attributes
Show child attributes
Age, gender, and automatic-audience targeting.
Show child attributes
Show child attributes
Interest, behavior, and demographic targeting, using categories from the ad platform's targeting taxonomy. At most 100 entries per section.
Show child attributes
Show child attributes
Device platforms and operating systems to target.
Show child attributes
Show child attributes
Languages to target, as ISO 639 codes such as en or es. Empty or omitted targets all languages.
Locations to target and exclude.
Show child attributes
Show child attributes
Response
reach estimated

