curl --request GET \
--url https://app.base44.com/api/apps/{app_id}/google-ads/campaigns/budget-boundaries \
--header 'api_key: <api-key>'import requests
url = "https://app.base44.com/api/apps/{app_id}/google-ads/campaigns/budget-boundaries"
headers = {"api_key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {api_key: '<api-key>'}};
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 => [
"api_key: <api-key>"
],
]);
$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("api_key", "<api-key>")
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("api_key", "<api-key>")
.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["api_key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"currency_code": "USD",
"campaign_type": "SMART",
"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
}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.
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 'api_key: <api-key>'import requests
url = "https://app.base44.com/api/apps/{app_id}/google-ads/campaigns/budget-boundaries"
headers = {"api_key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {api_key: '<api-key>'}};
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 => [
"api_key: <api-key>"
],
]);
$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("api_key", "<api-key>")
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("api_key", "<api-key>")
.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["api_key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"currency_code": "USD",
"campaign_type": "SMART",
"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
}Authorizations
Personal API key.
Path Parameters
ID of the app you are planning a Google Ads campaign for.
Query Parameters
Currency to report the bounds in, as an ISO 4217 code. An unrecognized code falls back to USD.
Campaign type to report bounds for: SMART or PERFORMANCE_MAX. Anything else falls back to SMART.
Response
The accepted daily budget range.
The daily budget range Google accepts for a campaign type and currency.
The currency these amounts are in, upper-cased from what you sent.
"USD"
The campaign type these bounds apply to, upper-cased from what you sent.
"SMART"
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
Largest daily budget accepted for this campaign type and currency, in micros.
1000000000
A sensible starting daily budget, in micros. Never above max_daily_budget_micros.
30000000
Three suggested daily budgets, in micros, from lowest to highest. These are raw presets, so unlike recommended_daily_budget_micros the highest one can sit above max_daily_budget_micros.
[15000000, 30000000, 60000000]
How many units of this currency Base44 counts per US dollar when it converts the presets.
1
Was this page helpful?