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

# Suggest Google Ads setup keyword themes

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

Asks Google which keyword themes fit the app's landing page in the locations you picked, for a campaign you have not launched yet.

These come from Google's own read of the app's published site, so prefer them over the generated `keyword_themes` from [Suggest Google Ads setup targeting](/api-reference/suggest-google-ads-setup-targeting) and fill up from those. Send the `language_code` that endpoint returned, so Google answers in the same language.

The call always returns a 200 once it is allowed through. `keyword_themes` is empty when Google cannot answer: the app has no Google Ads account with a Google customer ID yet, the app is not published where Google can read it, none of `geo_targets` is a geo target constant ID, Google returns nothing, or the request to Google fails. Read an empty list as "keep the generated themes", not as an error. Nothing is saved, and no language model runs.

This is limited to 10 requests a minute per app. Some workspaces have a different limit. It is refused with a 409 while the workspace is on a Google Ads billing hold.

<Note>This endpoint accepts a personal API key from anyone who can edit the app, or a workspace API key, which acts as the workspace owner. Read-only tokens and keys are refused with a 403.</Note>



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json post /api/apps/{app_id}/google-ads/setup-suggestions/keyword-themes
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/keyword-themes:
    post:
      summary: Suggest Google Ads setup keyword themes
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Asks Google which keyword themes fit the app's landing page in the
        locations you picked, for a campaign you have not launched yet.


        These come from Google's own read of the app's published site, so prefer
        them over the generated `keyword_themes` from [Suggest Google Ads setup
        targeting](/api-reference/suggest-google-ads-setup-targeting) and fill
        up from those. Send the `language_code` that endpoint returned, so
        Google answers in the same language.


        The call always returns a 200 once it is allowed through.
        `keyword_themes` is empty when Google cannot answer: the app has no
        Google Ads account with a Google customer ID yet, the app is not
        published where Google can read it, none of `geo_targets` is a geo
        target constant ID, Google returns nothing, or the request to Google
        fails. Read an empty list as "keep the generated themes", not as an
        error. Nothing is saved, and no language model runs.


        This is limited to 10 requests a minute per app. Some workspaces have a
        different limit. It is refused with a 409 while the workspace is on a
        Google Ads billing hold.


        <Note>This endpoint accepts a personal API key from anyone who can edit
        the app, or a workspace API key, which acts as the workspace owner.
        Read-only tokens and keys are refused with a 403.</Note>
      operationId: >-
        get_setup_keyword_themes_api_apps__app_id__google_ads_setup_suggestions_keyword_themes_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
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GoogleAdsSetupKeywordThemesRequest'
      responses:
        '200':
          description: Google's keyword themes, or an empty list.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleAdsSetupKeywordThemes'
        '401':
          description: Missing or invalid credentials.
        '403':
          description: >-
            You can't edit this app, the app does not exist, or your token or
            key is read-only. 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.
        '422':
          description: >-
            The body has a field other than `geo_targets` and `language_code`,
            or a field of the wrong type.
        '429':
          description: >-
            The app has used up its 10 keyword theme requests for the current
            minute. Retry later.
        '503':
          description: >-
            Database temporarily unavailable (`database_unavailable`): the data
            cluster did not answer in time. Retry after the `Retry-After`
            seconds.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
              examples:
                database_unavailable:
                  summary: database_unavailable
                  value:
                    error:
                      code: database_unavailable
                      message: Database temporarily unavailable, please retry
                      details: {}
      security:
        - PersonalAccessTokenAuth:
            - full_access
        - WorkspaceApiKeyAuth:
            - full_access
        - WorkspaceApiKeyBearerAuth:
            - full_access
components:
  schemas:
    GoogleAdsSetupKeywordThemesRequest:
      properties:
        geo_targets:
          items:
            type: string
          type: array
          title: Geo Targets
          description: >-
            Locations the campaign targets, as Google geo target constant IDs
            (`geoTargetConstants/1023191`, or just `1023191`). Entries in any
            other form are ignored, and with none left you get an empty list.
          example:
            - geoTargetConstants/1007339
        language_code:
          type: string
          title: Language Code
          description: >-
            Language the themes should be in, normally the `language_code`
            [Suggest Google Ads setup
            targeting](/api-reference/suggest-google-ads-setup-targeting)
            returned. A missing or unsupported code gets English themes.
          default: ''
          example: en
      additionalProperties: false
      type: object
      title: GoogleAdsSetupKeywordThemesRequest
    GoogleAdsSetupKeywordThemes:
      properties:
        keyword_themes:
          items:
            type: string
          type: array
          title: Keyword Themes
          description: >-
            Up to 25 themes Google suggests, in Google's order. Empty when
            Google could not answer.
          example:
            - phone repair shop
            - screen replacement
      type: object
      required:
        - keyword_themes
      title: GoogleAdsSetupKeywordThemes
      description: Google's keyword themes for the app's landing page.
    StandardErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/StandardError'
          description: What went wrong.
      type: object
      required:
        - error
      title: StandardErrorEnvelope
      description: The error body returned in the standard envelope.
    StandardError:
      properties:
        code:
          type: string
          title: Code
          description: >-
            Stable machine-readable cause of the failure. Match on this, not on
            `message`.
          example: not_found
        message:
          type: string
          title: Message
          description: Human-readable explanation. It isn't a stable contract.
          example: App not found
        details:
          additionalProperties: true
          type: object
          title: Details
          description: >-
            Structured context for the failure, or an empty object when there's
            none.
          example: {}
      type: object
      required:
        - code
        - message
      title: StandardError
  securitySchemes:
    PersonalAccessTokenAuth:
      type: http
      scheme: bearer
      description: >-
        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`.
    WorkspaceApiKeyAuth:
      type: apiKey
      in: header
      name: api_key
      description: >-
        Workspace API key, sent as `api_key: <key>`. Each operation that accepts
        one lists what the key needs: a permission, `read_only` or
        `full_access`, like a personal access token, or a scope. A key without
        the scope gets 403 `workspace_api_key_scope_required`.
    WorkspaceApiKeyBearerAuth:
      type: http
      scheme: bearer
      description: >-
        Workspace API key, sent as `Authorization: Bearer <key>`. Accepted
        wherever `api_key` is, with the same permission.

````

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