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

# Ask the Google Ads assistant

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

Answers a plain-language question about the app's Google Ads campaigns.

The answer is prose written for a person, three to five sentences with no markdown, so read it or show it to someone rather than parsing it. The assistant is a language model with no access to the account's numbers, so it gives general advice shaped by your question rather than findings from your data. Read the reporting endpoints such as [Get Google Ads performance dashboard](/api-reference/get-google-ads-performance-dashboard) for the actual figures.

Pass earlier turns in `history` to ask a follow-up. Only the last ten turns reach the model, and anything before that is dropped with nothing in the response saying so, so keep a long conversation summarized on your side.

<Warning>An empty `reply` means the model returned nothing, and it comes back under a 200 exactly like a real answer. There is no field that distinguishes the two, so check for an empty string and retry rather than treating it as the assistant having nothing to say.</Warning>

This endpoint is limited to 20 requests a minute per app, shared with the other Google Ads endpoints that run a language model.

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



## OpenAPI

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


        Answers a plain-language question about the app's Google Ads campaigns.


        The answer is prose written for a person, three to five sentences with
        no markdown, so read it or show it to someone rather than parsing it.
        The assistant is a language model with no access to the account's
        numbers, so it gives general advice shaped by your question rather than
        findings from your data. Read the reporting endpoints such as [Get
        Google Ads performance
        dashboard](/api-reference/get-google-ads-performance-dashboard) for the
        actual figures.


        Pass earlier turns in `history` to ask a follow-up. Only the last ten
        turns reach the model, and anything before that is dropped with nothing
        in the response saying so, so keep a long conversation summarized on
        your side.


        <Warning>An empty `reply` means the model returned nothing, and it comes
        back under a 200 exactly like a real answer. There is no field that
        distinguishes the two, so check for an empty string and retry rather
        than treating it as the assistant having nothing to say.</Warning>


        This endpoint is limited to 20 requests a minute per app, shared with
        the other Google Ads endpoints that run a language model.


        <Note>This endpoint accepts a personal API key. Workspace API keys are
        not authorized for it and are rejected with a 403.</Note>
      operationId: troubleshoot_ask_api_apps__app_id__google_ads_troubleshoot_ask_post
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            description: ID of the app whose Google Ads campaigns to manage.
            title: App Id
          description: ID of the app whose Google Ads campaigns to manage.
          example: 6820f3a4e7b91d003c45a1f2
      requestBody:
        required: true
        content:
          application/json:
            schema:
              title: AskGoogleAdsAssistant
              type: object
              required:
                - question
              properties:
                question:
                  type: string
                  description: >-
                    What you want to ask about the app's Google Ads campaigns,
                    in plain language.
                  example: >-
                    Why is my Performance Max campaign spending its budget
                    without converting?
                campaign_id:
                  type: string
                  description: >-
                    A campaign ID to mention in the question. It is passed to
                    the model as text for context only, so the assistant does
                    not read the campaign's data from it.
                  example: 68b1c0d4e7b91d003c45a1f2
                history:
                  type: array
                  description: >-
                    Earlier turns of the conversation, oldest first. Only the
                    last ten are used.
                  items:
                    type: object
                    required:
                      - role
                      - content
                    properties:
                      role:
                        type: string
                        description: >-
                          Who said it. Use `user` for your own turns and
                          `assistant` for the replies. Any value other than
                          `user` is treated as the assistant.
                        example: user
                      content:
                        type: string
                        description: What was said in that turn.
                        example: Which campaign is spending the most?
                  example:
                    - role: user
                      content: Which campaign is spending the most?
            example:
              question: >-
                Why is my Performance Max campaign spending its budget without
                converting?
              campaign_id: 68b1c0d4e7b91d003c45a1f2
      responses:
        '200':
          description: The assistant's answer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TroubleshootReply'
        '401':
          description: Missing or invalid credentials.
        '403':
          description: >-
            You don't have access to this app, the app does not exist, or you
            used a workspace API key. A missing app and an app you cannot reach
            are deliberately the same answer.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: >-
            The app has used up its 20 language-model requests a minute. Retry
            later.
components:
  schemas:
    TroubleshootReply:
      properties:
        reply:
          type: string
          title: Reply
          description: >-
            The answer, as three to five sentences of plain prose with no
            markdown and no code blocks. It is written for a person to read, so
            do not parse it. An empty string means the model returned nothing,
            which you cannot tell apart from a genuinely empty answer, so treat
            it as a failed call and retry.
          example: >-
            Your campaign is spending its full daily budget but converting below
            the account average, which usually points at the landing page rather
            than the targeting. Check that the page loads quickly on mobile and
            that the offer matches the ad copy. Narrowing the geo targets to
            your best-performing region would also concentrate the budget.
      type: object
      required:
        - reply
      title: TroubleshootReply
      description: The assistant's answer.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api_key
      description: Personal API key.

````