curl --request GET \
--url https://app.base44.com/api/apps/{app_id}/google-ads/campaigns/budget-boundaries \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/apps/{app_id}/google-ads/campaigns/budget-boundaries"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.base44.com/api/apps/{app_id}/google-ads/campaigns/budget-boundaries', 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://app.base44.com/api/apps/{app_id}/google-ads/campaigns/budget-boundaries",
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://app.base44.com/api/apps/{app_id}/google-ads/campaigns/budget-boundaries"
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://app.base44.com/api/apps/{app_id}/google-ads/campaigns/budget-boundaries")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/google-ads/campaigns/budget-boundaries")
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{
"currency_code": "USD",
"campaign_type": "PERFORMANCE_MAX",
"min_daily_budget_micros": 10000000,
"max_daily_budget_micros": 1000000000,
"recommended_daily_budget_micros": 30000000,
"preset_daily_budget_micros": [
15000000,
30000000,
60000000
],
"usd_to_currency_rate": 1,
"clicks_per_unit_min": 1.9,
"clicks_per_unit_max": 21.2,
"clicks_per_unit_scope": "fleet"
}Get Google Ads budget boundaries
Reads the daily budget range Google accepts for a campaign type and currency, so you can validate a budget before you create a campaign.
The numbers come from a fixed table rather than from Google, because Google does not publish them as a queryable resource. They change rarely. min_daily_budget_micros is the same floor the create, update, and bulk-budget endpoints enforce, so a budget that passes here is accepted there.
clicks_per_unit_min and clicks_per_unit_max are always present, and are measured rather than forecast whenever clicks_per_unit_scope is campaign or fleet: the middle half of what one unit of currency_code in daily budget has actually bought across recent Base44 campaigns billing in that currency. Multiply a daily budget by them directly. Pass campaign_id to get the same pair for one campaign’s own delivery once it has enough of a record to speak for itself. A scope of unavailable still returns a usable pair, but a stored one rather than a current measurement — read the scope before presenting these as live figures.
You do not need a connected Google Ads account to call this, which is what lets you show a budget slider before the account exists. An unrecognized currency_code or campaign_type is not rejected: you get the US dollar and Smart campaign defaults back, with the values you sent echoed in currency_code and campaign_type. Compare those two fields against what you sent if you need to know that happened.
curl --request GET \
--url https://app.base44.com/api/apps/{app_id}/google-ads/campaigns/budget-boundaries \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/apps/{app_id}/google-ads/campaigns/budget-boundaries"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.base44.com/api/apps/{app_id}/google-ads/campaigns/budget-boundaries', 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://app.base44.com/api/apps/{app_id}/google-ads/campaigns/budget-boundaries",
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://app.base44.com/api/apps/{app_id}/google-ads/campaigns/budget-boundaries"
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://app.base44.com/api/apps/{app_id}/google-ads/campaigns/budget-boundaries")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/google-ads/campaigns/budget-boundaries")
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{
"currency_code": "USD",
"campaign_type": "PERFORMANCE_MAX",
"min_daily_budget_micros": 10000000,
"max_daily_budget_micros": 1000000000,
"recommended_daily_budget_micros": 30000000,
"preset_daily_budget_micros": [
15000000,
30000000,
60000000
],
"usd_to_currency_rate": 1,
"clicks_per_unit_min": 1.9,
"clicks_per_unit_max": 21.2,
"clicks_per_unit_scope": "fleet"
}Authorizations
Personal access token, sent as Authorization: Bearer <token>. Each operation lists the permission it needs: read_only or full_access. A full-access token can call every operation. A read-only token can call only the operations that list read_only; anything else returns 403 read_only_credential_route_not_allowed.
Scopes
Query Parameters
An existing campaign to quote the click rate for. With it, clicks_per_unit_min / clicks_per_unit_max describe that campaign's own recent delivery instead of the platform-wide range, and clicks_per_unit_scope reads campaign. A campaign without enough delivery, or one whose budget currency differs from currency_code, still answers from the platform-wide range.
Response
The accepted daily budget range.
The daily budget range Google accepts for a campaign type and currency.
Smallest daily budget Google accepts for this campaign type and currency, in micros (1,000,000 micros = 1 unit of the currency). Sending less than this to Create campaign is rejected with a 400.
10000000
Low end of the clicks one unit of currency_code in daily budget has actually bought. Multiply a daily budget by this directly — it is already in the same currency the budget is, so no conversion is involved. Always present — check clicks_per_unit_scope to see whether it is a live measurement.
1.9
Where the click range came from, and whether it is a measurement at all. campaign: measured on the campaign named by campaign_id. fleet: measured across accounts billing in this currency — also what an unknown campaign, or one without enough delivery, returns. unavailable: NOT measured — a stored range is being served because this currency has too few accounts to measure or the measurement could not be read. The range is usable in every case, but only the first two are measured.
"fleet"
Was this page helpful?