> ## Documentation Index
> Fetch the complete documentation index at: https://docs.base44.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Internal links on these pages omit the .md extension. Append .md to a docs page URL, or send an Accept: text/markdown header, to get that page as markdown.

# Suggest Google Ads setup targeting

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

Suggests where to advertise, which keyword themes to target, and which conversions to track for the app's first campaign, read from the app itself.

A language model reads the app's name, description, pages, data entities and page source once, then Base44 resolves the places it names to real Google locations. Everything here is a suggestion for someone to confirm. Nothing is saved, and the app does not need a Google Ads account yet.

The call never fails on the suggestions themselves. When the app has nothing to read, the model fails or answers with nothing usable, or Google can't resolve a place, the affected lists come back empty under a 200, so an empty list means "no suggestion" rather than "none apply". `conversion_categories` in particular is empty unless the app already has the flow behind a goal, such as a booking page or a checkout. Expect it to take 30 seconds or more.

Once the app has a provisioned Google Ads account, [Suggest Google Ads setup keyword themes](/api-reference/suggest-google-ads-setup-keyword-themes) gets Google's own themes for the locations you settle on. Use those first and fill up from `keyword_themes`.

<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>

It is refused with a 409 while the workspace is on a Google Ads billing hold. Running the model does not spend credits.

<Note>This endpoint accepts a personal API key from anyone who can edit the app. A read-only key is refused with a 403, and so are workspace API keys.</Note>



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json post /api/apps/{app_id}/google-ads/setup-suggestions
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - PersonalAccessTokenAuth: []
paths:
  /api/apps/{app_id}/google-ads/setup-suggestions:
    post:
      summary: Suggest Google Ads setup targeting
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Suggests where to advertise, which keyword themes to target, and which
        conversions to track for the app's first campaign, read from the app
        itself.


        A language model reads the app's name, description, pages, data entities
        and page source once, then Base44 resolves the places it names to real
        Google locations. Everything here is a suggestion for someone to
        confirm. Nothing is saved, and the app does not need a Google Ads
        account yet.


        The call never fails on the suggestions themselves. When the app has
        nothing to read, the model fails or answers with nothing usable, or
        Google can't resolve a place, the affected lists come back empty under a
        200, so an empty list means "no suggestion" rather than "none apply".
        `conversion_categories` in particular is empty unless the app already
        has the flow behind a goal, such as a booking page or a checkout. Expect
        it to take 30 seconds or more.


        Once the app has a provisioned Google Ads account, [Suggest Google Ads
        setup keyword
        themes](/api-reference/suggest-google-ads-setup-keyword-themes) gets
        Google's own themes for the locations you settle on. Use those first and
        fill up from `keyword_themes`.


        <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>


        It is refused with a 409 while the workspace is on a Google Ads billing
        hold. Running the model does not spend credits.


        <Note>This endpoint accepts a personal API key from anyone who can edit
        the app. A read-only key is refused with a 403, and so are workspace API
        keys.</Note>
      operationId: >-
        get_setup_suggestions_api_apps__app_id__google_ads_setup_suggestions_post
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            description: ID of the app you are setting up Google Ads for.
            title: App Id
          description: ID of the app you are setting up Google Ads for.
          example: 6820f3a4e7b91d003c45a1f2
      responses:
        '200':
          description: Suggested locations, keyword themes and conversion goals.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleAdsSetupSuggestions'
        '401':
          description: Missing or invalid credentials.
        '403':
          description: >-
            You can't edit this app, the app does not exist, or you used a
            read-only or workspace API key. A missing app and an app you cannot
            reach are deliberately the same answer.
        '409':
          description: The workspace is on a Google Ads billing hold.
        '429':
          description: >-
            The app has used up its 20 language-model requests a minute. Retry
            later.
components:
  schemas:
    GoogleAdsSetupSuggestions:
      properties:
        geo_targets:
          items:
            $ref: '#/components/schemas/GoogleAdsSetupLocation'
          type: array
          title: Geo Targets
          description: >-
            Up to 10 locations worth advertising in, one per place the model
            named. Empty when it couldn't tell.
          example:
            - canonical_name: Dublin,County Dublin,Ireland
              country_code: IE
              name: Dublin
              reach: '1300000'
              resource_name: geoTargetConstants/1007339
        keyword_themes:
          items:
            type: string
          type: array
          title: Keyword Themes
          description: >-
            Up to 25 search themes a buyer might type, best first, in the app's
            own language.
          example:
            - phone screen repair
            - iphone battery replacement
        conversion_categories:
          items:
            type: string
          type: array
          title: Conversion Categories
          description: >-
            Conversion goals worth tracking because the app already has the flow
            behind them, from `PURCHASE`, `ADD_TO_CART`, `BEGIN_CHECKOUT`,
            `SUBSCRIBE_PAID`, `SUBMIT_LEAD_FORM`, `BOOK_APPOINTMENT`,
            `REQUEST_QUOTE`, `CONTACT`, `PHONE_CALL_LEAD` and `SIGNUP`. Often
            empty.
          example:
            - BOOK_APPOINTMENT
            - PHONE_CALL_LEAD
        language_code:
          type: string
          title: Language Code
          description: >-
            Two-letter code of the language `keyword_themes` is written in, as
            the model reported it. Empty when it couldn't tell. Pass it to
            [Suggest Google Ads setup keyword
            themes](/api-reference/suggest-google-ads-setup-keyword-themes).
          example: en
        limits:
          $ref: '#/components/schemas/GoogleAdsTargetingLimits'
          description: The limits the themes and excluded terms you save have to fit.
      type: object
      required:
        - geo_targets
        - keyword_themes
        - conversion_categories
        - language_code
        - limits
      title: GoogleAdsSetupSuggestions
      description: Suggested targeting and conversion goals for a first campaign.
    GoogleAdsSetupLocation:
      properties:
        resource_name:
          type: string
          title: Resource Name
          description: >-
            Google's identifier for the location. Pass it in `geo_targets` when
            you create a campaign.
          example: geoTargetConstants/1007339
        name:
          type: string
          title: Name
          description: The location's own name.
          example: Dublin
        canonical_name:
          type: string
          title: Canonical Name
          description: The location's full path, including its region and country.
          example: Dublin,County Dublin,Ireland
        country_code:
          type: string
          title: Country Code
          description: ISO 3166-1 alpha-2 country code the location sits in.
          example: IE
        reach:
          anyOf:
            - type: string
            - type: integer
          title: Reach
          description: >-
            Google's estimate of how many people can be reached in this
            location. Google sends this 64-bit integer as a string of digits, so
            parse it before comparing. It is the number `0` when Google gives no
            estimate.
          example: '1300000'
      type: object
      required:
        - resource_name
        - name
        - canonical_name
        - country_code
        - reach
      title: GoogleAdsSetupLocation
      description: One location Base44 suggests targeting.
    GoogleAdsTargetingLimits:
      properties:
        max_keyword_themes:
          type: integer
          title: Max Keyword Themes
          description: Most keyword themes a campaign can have.
          example: 25
        max_excluded_terms:
          type: integer
          title: Max Excluded Terms
          description: Most excluded search terms a campaign can have.
          example: 25
        term_max_len:
          type: integer
          title: Term Max Len
          description: Most characters in one theme or excluded term.
          example: 80
        term_max_words:
          type: integer
          title: Term Max Words
          description: Most words in one theme or excluded term.
          example: 10
      type: object
      required:
        - max_keyword_themes
        - max_excluded_terms
        - term_max_len
        - term_max_words
      title: GoogleAdsTargetingLimits
      description: The limits a campaign's keyword themes and excluded terms have to fit.
  securitySchemes:
    PersonalAccessTokenAuth:
      type: http
      scheme: bearer
      description: 'Personal access token, sent as `Authorization: Bearer <token>`.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.