curl --request GET \
--url https://app.base44.com/api/apps/{app_id}/google-ads/ai/hero-preview \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/apps/{app_id}/google-ads/ai/hero-preview"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.base44.com/api/apps/{app_id}/google-ads/ai/hero-preview', 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/ai/hero-preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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/ai/hero-preview"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/ai/hero-preview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/google-ads/ai/hero-preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"search_query": "oak dining table san francisco",
"headline": "Handmade Oak Dining Tables",
"description": "Built to order in our San Francisco workshop. Free delivery statewide.",
"subtitle": "nordwind-furniture.com",
"business_name": "Nordwind Furniture",
"source": "ai",
"logo_url": "https://media.base44.com/images/public/logo.png",
"image_urls": [
"https://media.base44.com/images/public/table.jpg"
]
}Get a Google Ads hero preview
Writes one sample search result for the app, to show someone what their ad could look like before they connect a Google Ads account.
This is illustrative copy, not a campaign. It is built from the app’s own description, so it works before there is an account, a campaign, or any business details on file. A generated sample is kept for up to 12 hours per app and language, so repeat calls return the same sample without a new model run.
Check source before you present this as generated copy: fallback means the model did not run or came back empty and you are looking at generic text. The response is a 200 either way.
Every call counts against a read limit of 120 requests per minute per app. A call that runs the model also takes one slot from the shared AI quota described below; a repeat call served from the 12-hour copy does not. A 429 means one of the two is spent: wait a minute and retry.
Accept-Language header. Omit the header and you get English — the app’s own language is not consulted — so send it explicitly for a non-English app.curl --request GET \
--url https://app.base44.com/api/apps/{app_id}/google-ads/ai/hero-preview \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/apps/{app_id}/google-ads/ai/hero-preview"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.base44.com/api/apps/{app_id}/google-ads/ai/hero-preview', 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/ai/hero-preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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/ai/hero-preview"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/ai/hero-preview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/google-ads/ai/hero-preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"search_query": "oak dining table san francisco",
"headline": "Handmade Oak Dining Tables",
"description": "Built to order in our San Francisco workshop. Free delivery statewide.",
"subtitle": "nordwind-furniture.com",
"business_name": "Nordwind Furniture",
"source": "ai",
"logo_url": "https://media.base44.com/images/public/logo.png",
"image_urls": [
"https://media.base44.com/images/public/table.jpg"
]
}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
Headers
Response
A sample search result for the app.
A sample search result to show before the app has a Google Ads account.
Was this page helpful?