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
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}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
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Personal access token, sent as Authorization: Bearer <token>.
Path Parameters
ID of the app you are planning a Google Ads campaign for.
Body
Landing page the campaign would send clicks to. Required for a forecast.
"https://example.com/furniture"
Locations to forecast for, as Google geo target constant IDs (geoTargetConstants/1023191, or just 1023191). At least one is required for a forecast.
50["1023191"]
Themes the campaign would match on. An empty list forecasts nothing useful.
25[
"handmade oak furniture",
"custom dining tables"
]
Two-letter language the ads would run in. Defaults to en.
"en"
Business name, which sharpens Google's forecast.
"Oakline Furniture"
Daily budget you have in mind, in micros (1,000,000 micros = 1 unit of the account's currency). Google's planner chooses the budget it forecasts at, so this is only reported back when Google returns no recommendation of its own.
30000000
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.
Low end of Google's forecast daily clicks.
12
High end of Google's forecast daily clicks.
31
Forecast spend over 30 days, in micros (1,000,000 micros = 1 unit of the account's currency). This is the recommended daily budget times 30, so it is a 30-day figure rather than a calendar month, and it can differ from the daily_budget you sent.
900000000
Was this page helpful?