curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/google-ads/campaigns/estimate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"landing_page": "https://example.com/furniture",
"geo_targets": [
"1023191"
],
"keyword_themes": [
"handmade oak furniture",
"custom dining tables"
],
"language_code": "en",
"business_name": "Oakline Furniture",
"daily_budget": 30000000
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/google-ads/campaigns/estimate"
payload = {
"landing_page": "https://example.com/furniture",
"geo_targets": ["1023191"],
"keyword_themes": ["handmade oak furniture", "custom dining tables"],
"language_code": "en",
"business_name": "Oakline Furniture",
"daily_budget": 30000000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
landing_page: 'https://example.com/furniture',
geo_targets: ['1023191'],
keyword_themes: ['handmade oak furniture', 'custom dining tables'],
language_code: 'en',
business_name: 'Oakline Furniture',
daily_budget: 30000000
})
};
fetch('https://app.base44.com/api/apps/{app_id}/google-ads/campaigns/estimate', 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/estimate",
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([
'landing_page' => 'https://example.com/furniture',
'geo_targets' => [
'1023191'
],
'keyword_themes' => [
'handmade oak furniture',
'custom dining tables'
],
'language_code' => 'en',
'business_name' => 'Oakline Furniture',
'daily_budget' => 30000000
]),
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://app.base44.com/api/apps/{app_id}/google-ads/campaigns/estimate"
payload := strings.NewReader("{\n \"landing_page\": \"https://example.com/furniture\",\n \"geo_targets\": [\n \"1023191\"\n ],\n \"keyword_themes\": [\n \"handmade oak furniture\",\n \"custom dining tables\"\n ],\n \"language_code\": \"en\",\n \"business_name\": \"Oakline Furniture\",\n \"daily_budget\": 30000000\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://app.base44.com/api/apps/{app_id}/google-ads/campaigns/estimate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"landing_page\": \"https://example.com/furniture\",\n \"geo_targets\": [\n \"1023191\"\n ],\n \"keyword_themes\": [\n \"handmade oak furniture\",\n \"custom dining tables\"\n ],\n \"language_code\": \"en\",\n \"business_name\": \"Oakline Furniture\",\n \"daily_budget\": 30000000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/google-ads/campaigns/estimate")
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 \"landing_page\": \"https://example.com/furniture\",\n \"geo_targets\": [\n \"1023191\"\n ],\n \"keyword_themes\": [\n \"handmade oak furniture\",\n \"custom dining tables\"\n ],\n \"language_code\": \"en\",\n \"business_name\": \"Oakline Furniture\",\n \"daily_budget\": 30000000\n}"
response = http.request(request)
puts response.read_body{
"estimated_daily_clicks_low": 12,
"estimated_daily_clicks_high": 31,
"estimated_monthly_cost": 900000000
}Estimate a Google Ads campaign budget
Asks Google to forecast the clicks and spend a set of keyword themes would produce, so you can show a projection before a campaign is created.
Send the themes you are considering, as they would go to Create campaign. Nothing is saved.
Google’s planner picks the budget it forecasts at — it does not take one — so the figures come back for Google’s own recommended daily budget, which estimated_monthly_cost reports.
Google forecasts for a landing page in specific places, so a request without landing_page or without at least one geo_targets entry is rejected with a 400 before it reaches Google.
The forecast comes from Google’s own planner, so it needs a connected Google Ads account that has finished provisioning. An account that exists but has no Google customer ID yet is rejected with a 400; wait for provisioning to finish and retry.
estimated_monthly_cost is in micros and covers 30 days.
curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/google-ads/campaigns/estimate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"landing_page": "https://example.com/furniture",
"geo_targets": [
"1023191"
],
"keyword_themes": [
"handmade oak furniture",
"custom dining tables"
],
"language_code": "en",
"business_name": "Oakline Furniture",
"daily_budget": 30000000
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/google-ads/campaigns/estimate"
payload = {
"landing_page": "https://example.com/furniture",
"geo_targets": ["1023191"],
"keyword_themes": ["handmade oak furniture", "custom dining tables"],
"language_code": "en",
"business_name": "Oakline Furniture",
"daily_budget": 30000000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
landing_page: 'https://example.com/furniture',
geo_targets: ['1023191'],
keyword_themes: ['handmade oak furniture', 'custom dining tables'],
language_code: 'en',
business_name: 'Oakline Furniture',
daily_budget: 30000000
})
};
fetch('https://app.base44.com/api/apps/{app_id}/google-ads/campaigns/estimate', 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/estimate",
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([
'landing_page' => 'https://example.com/furniture',
'geo_targets' => [
'1023191'
],
'keyword_themes' => [
'handmade oak furniture',
'custom dining tables'
],
'language_code' => 'en',
'business_name' => 'Oakline Furniture',
'daily_budget' => 30000000
]),
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://app.base44.com/api/apps/{app_id}/google-ads/campaigns/estimate"
payload := strings.NewReader("{\n \"landing_page\": \"https://example.com/furniture\",\n \"geo_targets\": [\n \"1023191\"\n ],\n \"keyword_themes\": [\n \"handmade oak furniture\",\n \"custom dining tables\"\n ],\n \"language_code\": \"en\",\n \"business_name\": \"Oakline Furniture\",\n \"daily_budget\": 30000000\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://app.base44.com/api/apps/{app_id}/google-ads/campaigns/estimate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"landing_page\": \"https://example.com/furniture\",\n \"geo_targets\": [\n \"1023191\"\n ],\n \"keyword_themes\": [\n \"handmade oak furniture\",\n \"custom dining tables\"\n ],\n \"language_code\": \"en\",\n \"business_name\": \"Oakline Furniture\",\n \"daily_budget\": 30000000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/google-ads/campaigns/estimate")
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 \"landing_page\": \"https://example.com/furniture\",\n \"geo_targets\": [\n \"1023191\"\n ],\n \"keyword_themes\": [\n \"handmade oak furniture\",\n \"custom dining tables\"\n ],\n \"language_code\": \"en\",\n \"business_name\": \"Oakline Furniture\",\n \"daily_budget\": 30000000\n}"
response = http.request(request)
puts response.read_body{
"estimated_daily_clicks_low": 12,
"estimated_daily_clicks_high": 31,
"estimated_monthly_cost": 900000000
}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
Body
Response
Google's forecast for the themes and locations you sent.
Google's forecast for a set of keyword themes in a set of locations.
Was this page helpful?