curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/google-ads/campaigns/suggestions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"keyword_themes": [
"handmade oak furniture",
"custom dining tables"
],
"landing_page": "https://example.com/furniture",
"geo_targets": [
"1023191"
],
"language_code": "en",
"business_name": "Oakline Furniture"
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/google-ads/campaigns/suggestions"
payload = {
"keyword_themes": ["handmade oak furniture", "custom dining tables"],
"landing_page": "https://example.com/furniture",
"geo_targets": ["1023191"],
"language_code": "en",
"business_name": "Oakline Furniture"
}
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({
keyword_themes: ['handmade oak furniture', 'custom dining tables'],
landing_page: 'https://example.com/furniture',
geo_targets: ['1023191'],
language_code: 'en',
business_name: 'Oakline Furniture'
})
};
fetch('https://app.base44.com/api/apps/{app_id}/google-ads/campaigns/suggestions', 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/suggestions",
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([
'keyword_themes' => [
'handmade oak furniture',
'custom dining tables'
],
'landing_page' => 'https://example.com/furniture',
'geo_targets' => [
'1023191'
],
'language_code' => 'en',
'business_name' => 'Oakline Furniture'
]),
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/suggestions"
payload := strings.NewReader("{\n \"keyword_themes\": [\n \"handmade oak furniture\",\n \"custom dining tables\"\n ],\n \"landing_page\": \"https://example.com/furniture\",\n \"geo_targets\": [\n \"1023191\"\n ],\n \"language_code\": \"en\",\n \"business_name\": \"Oakline Furniture\"\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/suggestions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"keyword_themes\": [\n \"handmade oak furniture\",\n \"custom dining tables\"\n ],\n \"landing_page\": \"https://example.com/furniture\",\n \"geo_targets\": [\n \"1023191\"\n ],\n \"language_code\": \"en\",\n \"business_name\": \"Oakline Furniture\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/google-ads/campaigns/suggestions")
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 \"keyword_themes\": [\n \"handmade oak furniture\",\n \"custom dining tables\"\n ],\n \"landing_page\": \"https://example.com/furniture\",\n \"geo_targets\": [\n \"1023191\"\n ],\n \"language_code\": \"en\",\n \"business_name\": \"Oakline Furniture\"\n}"
response = http.request(request)
puts response.read_body{
"low": {
"dailyAmountMicros": "30000000",
"metrics": {
"minDailyClicks": "12",
"maxDailyClicks": "31"
}
},
"recommended": {
"dailyAmountMicros": "30000000",
"metrics": {
"minDailyClicks": "12",
"maxDailyClicks": "31"
}
},
"high": {
"dailyAmountMicros": "30000000",
"metrics": {
"minDailyClicks": "12",
"maxDailyClicks": "31"
}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Suggest Google Ads budget options
Asks Google’s Smart campaign planner for a low, a recommended and a high daily budget for a set of keyword themes, each with its daily click forecast.
The response is Google’s own answer, passed through as Google sends it. That is why its fields are camelCase and its numbers are strings, unlike the rest of this API, and why a value of 0 is left out rather than sent. Any tier can be missing. Estimate a Google Ads campaign budget makes the same planner call and returns one recommended forecast in this API’s usual shape, so prefer it unless you need all three tiers.
Google needs a landing page and at least one location, so a request without an http or https landing_page or without a usable geo_targets entry is rejected with a 400 before it reaches Google. Entries in geo_targets that are not geo target constant IDs are dropped. Nothing is saved.
The app needs a connected Google Ads account that has finished provisioning. Check that google_customer_id in Get Google Ads account is not empty before you call this.
This shares a quota of 10 requests a minute per app with Estimate a Google Ads campaign budget. Some workspaces have a different limit. It is refused with a 409 while the workspace is on a Google Ads billing hold.
curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/google-ads/campaigns/suggestions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"keyword_themes": [
"handmade oak furniture",
"custom dining tables"
],
"landing_page": "https://example.com/furniture",
"geo_targets": [
"1023191"
],
"language_code": "en",
"business_name": "Oakline Furniture"
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/google-ads/campaigns/suggestions"
payload = {
"keyword_themes": ["handmade oak furniture", "custom dining tables"],
"landing_page": "https://example.com/furniture",
"geo_targets": ["1023191"],
"language_code": "en",
"business_name": "Oakline Furniture"
}
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({
keyword_themes: ['handmade oak furniture', 'custom dining tables'],
landing_page: 'https://example.com/furniture',
geo_targets: ['1023191'],
language_code: 'en',
business_name: 'Oakline Furniture'
})
};
fetch('https://app.base44.com/api/apps/{app_id}/google-ads/campaigns/suggestions', 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/suggestions",
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([
'keyword_themes' => [
'handmade oak furniture',
'custom dining tables'
],
'landing_page' => 'https://example.com/furniture',
'geo_targets' => [
'1023191'
],
'language_code' => 'en',
'business_name' => 'Oakline Furniture'
]),
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/suggestions"
payload := strings.NewReader("{\n \"keyword_themes\": [\n \"handmade oak furniture\",\n \"custom dining tables\"\n ],\n \"landing_page\": \"https://example.com/furniture\",\n \"geo_targets\": [\n \"1023191\"\n ],\n \"language_code\": \"en\",\n \"business_name\": \"Oakline Furniture\"\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/suggestions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"keyword_themes\": [\n \"handmade oak furniture\",\n \"custom dining tables\"\n ],\n \"landing_page\": \"https://example.com/furniture\",\n \"geo_targets\": [\n \"1023191\"\n ],\n \"language_code\": \"en\",\n \"business_name\": \"Oakline Furniture\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/google-ads/campaigns/suggestions")
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 \"keyword_themes\": [\n \"handmade oak furniture\",\n \"custom dining tables\"\n ],\n \"landing_page\": \"https://example.com/furniture\",\n \"geo_targets\": [\n \"1023191\"\n ],\n \"language_code\": \"en\",\n \"business_name\": \"Oakline Furniture\"\n}"
response = http.request(request)
puts response.read_body{
"low": {
"dailyAmountMicros": "30000000",
"metrics": {
"minDailyClicks": "12",
"maxDailyClicks": "31"
}
},
"recommended": {
"dailyAmountMicros": "30000000",
"metrics": {
"minDailyClicks": "12",
"maxDailyClicks": "31"
}
},
"high": {
"dailyAmountMicros": "30000000",
"metrics": {
"minDailyClicks": "12",
"maxDailyClicks": "31"
}
}
}{
"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
Themes the campaign would match on, up to 25.
25[
"handmade oak furniture",
"custom dining tables"
]
Page the campaign would send clicks to, as an http or https URL. Required: a request without one is rejected with a 400.
"https://example.com/furniture"
Locations to plan for, up to 50, as Google geo target constant IDs (geoTargetConstants/1023191, or just 1023191). Entries in any other form are dropped, and at least one usable entry is required.
50["1023191"]
Two-letter code of the language the ads would run in. A missing or unsupported code plans in English.
"en"
Business name, which sharpens Google's forecast. Only the first 120 characters are used.
"Oakline Furniture"
Response
Google's budget options, as Google sent them.
Google's low, recommended and high daily budgets for a Smart campaign.
The lowest budget Google suggests. Absent or null when Google has no tier at this level.
Show child attributes
Show child attributes
The budget Google recommends. Absent or null when Google has none.
Show child attributes
Show child attributes
The highest budget Google suggests. Absent or null when Google has no tier at this level.
Show child attributes
Show child attributes
Was this page helpful?