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

# Search Google Ads locations

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

Searches Google's location catalog so you can offer a location picker when you create or edit a campaign.

Pass what the person is typing as `query`. Results come back ordered by how well they match, and each one carries the `resource_name` you pass to [Create campaign](/api-reference/create-google-ads-campaign) in `geo_targets`.

You do not need a connected Google Ads account, so this works before the account exists. Set `country_code` to keep results inside one country. An empty `query` returns Google's unfiltered suggestions rather than an error.

<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 get /api/apps/{app_id}/google-ads/geo-targets/search
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/geo-targets/search:
    get:
      summary: Search Google Ads locations
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Searches Google's location catalog so you can offer a location picker
        when you create or edit a campaign.


        Pass what the person is typing as `query`. Results come back ordered by
        how well they match, and each one carries the `resource_name` you pass
        to [Create campaign](/api-reference/create-google-ads-campaign) in
        `geo_targets`.


        You do not need a connected Google Ads account, so this works before the
        account exists. Set `country_code` to keep results inside one country.
        An empty `query` returns Google's unfiltered suggestions rather than an
        error.


        <Note>This endpoint accepts a personal API key. Workspace API keys are
        not authorized for it and are rejected with a 403.</Note>
      operationId: search_geo_targets_api_apps__app_id__google_ads_geo_targets_search_get
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            description: ID of the app you are planning a Google Ads campaign for.
            title: App Id
          description: ID of the app you are planning a Google Ads campaign for.
          example: 6820f3a4e7b91d003c45a1f2
        - name: query
          in: query
          required: false
          schema:
            type: string
            description: >-
              What the person is typing. Shorter than two characters is still
              accepted.
            default: ''
            title: Query
          description: >-
            What the person is typing. Shorter than two characters is still
            accepted.
          example: san fran
        - name: country_code
          in: query
          required: false
          schema:
            type: string
            description: >-
              Keep results inside one country, as an ISO 3166-1 alpha-2 code.
              Empty searches everywhere.
            default: ''
            title: Country Code
          description: >-
            Keep results inside one country, as an ISO 3166-1 alpha-2 code.
            Empty searches everywhere.
          example: US
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: Most results to return.
            default: 20
            title: Limit
          description: Most results to return.
          example: 20
      responses:
        '200':
          description: Locations matching the search string.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/GoogleAdsGeoTarget'
                title: GoogleAdsGeoTargets
        '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'
components:
  schemas:
    GoogleAdsGeoTarget:
      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/1014221
        name:
          type: string
          title: Name
          description: The location's own name.
          example: San Francisco
        canonical_name:
          type: string
          title: Canonical Name
          description: The location's full path, including its region and country.
          example: San Francisco,California,United States
        country_code:
          type: string
          title: Country Code
          description: ISO 3166-1 alpha-2 country code the location sits in.
          example: US
        target_type:
          type: string
          title: Target Type
          description: >-
            What kind of place this is, for example `City`, `Region` or
            `Country`.
          example: City
        reach:
          type: integer
          title: Reach
          description: >-
            Google's estimate of how many people can be reached in this
            location.
          example: 4200000
        search_term:
          type: string
          title: Search Term
          description: The `query` value this result was matched against, echoed back.
          example: san francisco
      type: object
      required:
        - resource_name
        - name
        - canonical_name
        - country_code
        - target_type
        - reach
        - search_term
      title: GoogleAdsGeoTarget
      description: One location Google matched for the search string.
    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.

````