Get a Google Ads hero preview

<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

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, and nothing is saved. 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.

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.

<Note>This endpoint runs a language model and draws on a shared quota of 20 requests per minute per app, which every Google Ads AI endpoint debits. Enterprise workspaces get a higher quota. A 429 means the quota is spent, not that this endpoint has its own limit.</Note>

<Note>The copy is written in the language you send in the 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.</Note>

<Note>This endpoint accepts a personal API key. Workspace API keys are not authorized for it and are rejected with a 403.</Note>

get/api/apps/{app_id}/google-ads/ai/hero-preview

Path parameters

app_idstring required

ID of the app you are planning a Google Ads campaign for.

ID of the app you are planning a Google Ads campaign for.

Headers

Accept-Languagestring nullable

Language to return generated text in, as a standard Accept-Language value. An unsupported language falls back to English.

Language to return generated text in, as a standard Accept-Language value. An unsupported language falls back to English.

Response

A sample search result for the app.

search_querystring required

A search someone might type to find this business.

headlinestring required

Headline of the sample ad.

descriptionstring required

Body text of the sample ad.

subtitlestring required

The display line shown under the headline, usually the site.

business_namestring required

The business name this preview was written for, taken from the app.

sourcestring required

ai when a language model wrote this preview, fallback when it did not run or returned nothing and Base44 filled in generic copy instead.

Example response

{
  "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"
}

Changes

Changed in 2 of the 15 revisions of this API.2