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"
}
}
}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"
}
}
}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 budget options, as Google sent them.
Google's low, recommended and high daily budgets for a Smart campaign.
Was this page helpful?