Generate Google Ads text assets
Writes ad copy for the app and returns it as previews.
Nothing reaches Google Ads here. Each line comes back with a session_asset_id you pass to Accept a generated Google Ads asset to put it on a live campaign. Use Generate Google Ads assets instead when you want copy and pictures in one call.
Pick the lines you want with asset_field_types. SEARCH campaigns do not take LONG_HEADLINE, so Google rejects that combination.
Grounding is flexible here, unlike image generation. You may send final_url and freeform_prompt together, and sending neither grounds the copy in the app’s own home page.
The copy is written in the language of the app’s own site, not the language you ask in, and the response reports which one in language.
in_flight set to true, that run’s session_id, and an empty assets. Poll the session_id you were given rather than retrying.This endpoint costs 2 of 20 copy requests a minute per app, shared with the other Google Ads endpoints that write copy, and up to 4 when the retry below happens.
Authorizations
Personal API key.
Path Parameters
ID of the app whose Google Ads creative you want to generate or read.
Body
Campaign type the copy is for, one of PERFORMANCE_MAX, DEMAND_GEN, SEARCH or DISPLAY.
"PERFORMANCE_MAX"
Which kinds of line to write, from HEADLINE, LONG_HEADLINE or DESCRIPTION. Send between one and three entries. An image field type here is rejected with a 422.
One of HEADLINE, LONG_HEADLINE or DESCRIPTION.
Page to base the copy on. Unlike image generation you may send this together with freeform_prompt, and sending neither grounds the copy in the app's own home page.
"https://example.com/spring"
What the copy should say, in your own words, up to 1500 characters.
"Lead with free delivery across Germany"
Keywords to work into the copy. Send between 1 and 15 of them, and none of them blank. Omit the field entirely rather than sending an empty list.
1 - 15 elementsOne keyword. It must not be blank or whitespace only.
Response
The copy that was generated.
The copy one text generation produced.
ID of this generation. Pass it as session_id to List Google Ads generated assets, or to Accept a generated Google Ads asset with one of the returned session_asset_id values.
"9c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f"
The copy that was generated, one entry per line. Empty when the engine produced nothing and when a generation for this app was already running, which in_flight tells apart.
Language the copy was written in, as a lowercase two-letter code. It comes from the app's own site rather than from anything you send. The field is absent on a lock-miss response unless you asked for a specific campaign.
"de"
Present and true only when a text generation for this app was already running, in which case session_id is that run's and assets is empty. Poll the returned session_id rather than retrying. The field is absent on every other response.
true