> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# GetGeoOptions

# Package: googleAds

# Namespace: SuggestionsService

# Method link: https://dev.wix.com/docs/api-reference/business-management/marketing/ads/google-ads/google-suggestion-v1/get-geo-options.md

## Permission Scopes:
View google ads campaigns: SCOPE.PROMOTE.VIEW-GOOGLE-ADS

## Introduction

Retrieves geo targets that match a location name.

Use the returned geo targets to set a campaign's `locations` when you call
[Create Campaign](https://dev.wix.com/docs/api-reference/business-management/marketing/ads/google-ads/campaign-v1/create-campaign.md).

Results can include locations in restricted countries. Create Campaign rejects these locations.

---

## REST API

### Schema

```
 Method: getGeoOptions
 Description: Retrieves geo targets that match a location name.  Use the returned geo targets to set a campaign's `locations` when you call [Create Campaign](https://dev.wix.com/docs/api-reference/business-management/marketing/ads/google-ads/campaign-v1/create-campaign.md).  Results can include locations in restricted countries. Create Campaign rejects these locations.
 URL: https://www.wixapis.com/_serverless/pa-google/v1/geo-options
 Method: GET
 Method parameters:
   query param name: countryCode | type: countryCode | description: Country to prioritize in the results, as a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.  | validation: format COUNTRY
   query param name: languageCode | type: languageCode | description: Language of the returned location names, in [IETF BCP 47](https://en.wikipedia.org/wiki/IETF_language_tag) format. For example, `en`.  | validation: maxLength 1000
   query param name: queryLocation | type: queryLocation | description: Location name to search for. For example, `New York`.  | validation: maxLength 1000
   query param name: queryLocations | type: queryLocations | description: Several location names to search for, separated by semicolons. For example, `London;Paris`.  Matches for all the names are returned in a single list. If `queryLocation` is also specified, its matches are included too.  | validation: maxLength 1000
 Return type: GetGeoOptionsResponse
  - name: googleSuggestion | type: GoogleSuggestion | description: Geo targets that match the query, in `geoTargetsSuggestions`.  Can include locations in restricted countries, which [Create Campaign](https://dev.wix.com/docs/api-reference/business-management/marketing/ads/google-ads/campaign-v1/create-campaign.md) rejects.  
     - ONE-OF: 
        - name: keywordThemes | type: KeywordThemes | description: Keyword theme suggestions for a Smart campaign.  
           - name: keywordThemes | type: array<KeywordTheme> | description: Keyword themes.  | validation: maxItems 10
              - name: id | type: string | description: Keyword theme GUID, as a Google Ads keyword theme constant resource name.  | validation: maxLength 1000
              - name: displayName | type: string | description: Keyword theme's display name.  | validation: maxLength 1000
        - name: geoTargetsSuggestions | type: GeoTargets | description: Geographic target suggestions for a campaign.  
           - name: geoTargets | type: array<GeoTarget> | description: Geo targets.  | validation: maxItems 1000
              - name: id | type: string | description: Geo target GUID, as a Google Ads geo target constant resource name. For example, `geoTargetConstants/2840` for the United States.  | validation: maxLength 1000
              - name: displayName | type: string | description: Geo target's full name. For example, `New York,New York,United States`.  | validation: maxLength 1000
              - name: countryCode | type: string | description: Geo target's country, as a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.  Read-only.  | validation: maxLength 1000
        - name: adContent | type: SmartCampaignAd | description: Headline and description suggestions for a Smart campaign ad.  
           - name: resourceName | type: string | description: Actual ad resource name. customers/{customerId}/adGroupAds/{adGroupId}~{ad_id}  | read-only: true 
           - name: headlines | type: array<string> | description: Headlines of the ad.  | validation: minItems 3, maxItems 3, maxLength 30
           - name: descriptions | type: array<string> | description: Descriptions of the ad.  | validation: minItems 2, maxItems 2, maxLength 90
        - name: budget | type: Budget | description: Low, recommended, and high daily budget options, with estimated clicks for each.  
           - name: low | type: BudgetSuggestion | description: Budget option with the lowest daily spend.  
              - name: dailyBudget | type: string | description: Daily budget in micros, where 1,000,000 micros equal 1 currency unit.  
              - name: minEstimatedClicks | type: string | description: Estimated minimum number of clicks per day with this budget.  
              - name: maxEstimatedClicks | type: string | description: Estimated maximum number of clicks per day with this budget.  
           - name: high | type: BudgetSuggestion | description: Budget option with the highest daily spend.  
           - name: recommended | type: BudgetSuggestion | description: Budget option that Google Ads recommends.  


```

### Examples

### Search for geo targets by location name
```curl
curl -X GET \
'https://www.wixapis.com/_serverless/pa-google/v1/geo-options?queryLocation=New%20York&languageCode=en&countryCode=US' \
-H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.promoteGoogleAds.suggestions.getGeoOptions(options)
 Description: Retrieves geo targets that match a location name.  Use the returned geo targets to set a campaign's `locations` when you call [Create Campaign](https://dev.wix.com/docs/api-reference/business-management/marketing/ads/google-ads/campaign-v1/create-campaign.md).  Results can include locations in restricted countries. Create Campaign rejects these locations.
 Method parameters:
   param name: options | type: GetGeoOptionsOptions  none  
        - name: queryLocation | type: string | description: Location name to search for. For example, `New York`.  | validation: maxLength 1000
        - name: languageCode | type: string | description: Language of the returned location names, in [IETF BCP 47](https://en.wikipedia.org/wiki/IETF_language_tag) format. For example, `en`.  | validation: maxLength 1000
        - name: countryCode | type: string | description: Country to prioritize in the results, as a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.  | validation: format COUNTRY
        - name: queryLocations | type: string | description: Several location names to search for, separated by semicolons. For example, `London;Paris`.  Matches for all the names are returned in a single list. If `queryLocation` is also specified, its matches are included too.  | validation: maxLength 1000
 Return type: PROMISE<GetGeoOptionsResponse>
  - name: googleSuggestion | type: GoogleSuggestion | description: Geo targets that match the query, in `geoTargetsSuggestions`.  Can include locations in restricted countries, which [Create Campaign](https://dev.wix.com/docs/api-reference/business-management/marketing/ads/google-ads/campaign-v1/create-campaign.md) rejects.  
     - ONE-OF: 
        - name: keywordThemes | type: KeywordThemes | description: Keyword theme suggestions for a Smart campaign.  
           - name: keywordThemes | type: array<KeywordTheme> | description: Keyword themes.  | validation: maxItems 10
              - name: _id | type: string | description: Keyword theme GUID, as a Google Ads keyword theme constant resource name.  | validation: maxLength 1000
              - name: displayName | type: string | description: Keyword theme's display name.  | validation: maxLength 1000
        - name: geoTargetsSuggestions | type: GeoTargets | description: Geographic target suggestions for a campaign.  
           - name: geoTargets | type: array<GeoTarget> | description: Geo targets.  | validation: maxItems 1000
              - name: _id | type: string | description: Geo target GUID, as a Google Ads geo target constant resource name. For example, `geoTargetConstants/2840` for the United States.  | validation: maxLength 1000
              - name: displayName | type: string | description: Geo target's full name. For example, `New York,New York,United States`.  | validation: maxLength 1000
              - name: countryCode | type: string | description: Geo target's country, as a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.  Read-only.  | validation: maxLength 1000
        - name: adContent | type: SmartCampaignAd | description: Headline and description suggestions for a Smart campaign ad.  
           - name: resourceName | type: string | description: Actual ad resource name. customers/{customerId}/adGroupAds/{adGroupId}~{ad_id}  | read-only: true 
           - name: headlines | type: array<string> | description: Headlines of the ad.  | validation: minItems 3, maxItems 3, maxLength 30
           - name: descriptions | type: array<string> | description: Descriptions of the ad.  | validation: minItems 2, maxItems 2, maxLength 90
        - name: budget | type: Budget | description: Low, recommended, and high daily budget options, with estimated clicks for each.  
           - name: low | type: BudgetSuggestion | description: Budget option with the lowest daily spend.  
              - name: dailyBudget | type: string | description: Daily budget in micros, where 1,000,000 micros equal 1 currency unit.  
              - name: minEstimatedClicks | type: string | description: Estimated minimum number of clicks per day with this budget.  
              - name: maxEstimatedClicks | type: string | description: Estimated maximum number of clicks per day with this budget.  
           - name: high | type: BudgetSuggestion | description: Budget option with the highest daily spend.  
           - name: recommended | type: BudgetSuggestion | description: Budget option that Google Ads recommends.  


```

### Examples

### Search for geo targets by location name
```javascript
import { suggestions } from "@wix/promote-google-ads";

async function getGeoOptions() {
  const response = await suggestions.getGeoOptions({
    queryLocation: "New York",
    languageCode: "en",
    countryCode: "US",
  });
}

/* Promise resolves to:
 * {
 *   "googleSuggestion": {
 *     "geoTargetsSuggestions": {
 *       "geoTargets": [
 *         {
 *           "id": "geoTargetConstants/1023191",
 *           "displayName": "New York,New York,United States",
 *           "countryCode": "US"
 *         },
 *         {
 *           "id": "geoTargetConstants/21167",
 *           "displayName": "New York,United States",
 *           "countryCode": "US"
 *         }
 *       ]
 *     }
 *   }
 * }
 */

```

### getGeoOptions (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { suggestions } from '@wix/promote-google-ads';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { suggestions },
  // Include the auth strategy and host as relevant
});


async function getGeoOptions(options) {
  const response = await myWixClient.suggestions.getGeoOptions(options);
};
```

---