> 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`).
> - 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 geographic location suggestions matching a partial query string.
Use the returned geo targets to populate the `locations` field when creating a campaign.
Results may include restricted countries; restricted locations are rejected when the campaign is created.

---

## REST API

### Schema

```
 Method: getGeoOptions
 Description: Retrieves geographic location suggestions matching a partial query string. Use the returned geo targets to populate the `locations` field when creating a campaign. Results may include restricted countries; restricted locations are rejected when the campaign is created.
 URL: https://www.wixapis.com/_serverless/pa-google/v1/geo-options
 Method: GET
 Method parameters:
   query param name: countryCode | type: countryCode | description: ISO 3166-1 alpha-2 country code to bias results toward a specific country.  | validation: format COUNTRY
   query param name: languageCode | type: languageCode | description: BCP-47 language code for localizing result display names.  | validation: maxLength 1000
   query param name: queryLocation | type: queryLocation | description: Partial location name to search for.  | validation: maxLength 1000
   query param name: queryLocations | type: queryLocations | description: Multiple location names to search for, separated by semicolons.  | validation: maxLength 1000
 Return type: GetGeoOptionsResponse
  - name: googleSuggestion | type: GoogleSuggestion | description: Geo target suggestions matching the query. May include restricted countries; restricted locations are rejected when the campaign is created.  
     - ONE-OF: 
        - name: keywordThemes | type: KeywordThemes | description: Keyword theme suggestions for a Smart campaign.  
           - name: keywordThemes | type: array<KeywordTheme> | description: Keyword themes suggested for the campaign.  | validation: maxItems 10
              - name: id | type: string | description: Google Ads internal GUID for this keyword theme.  | validation: maxLength 1000
              - name: displayName | type: string | description: Human-readable label for the keyword theme, suitable for display in a UI.  | validation: maxLength 1000
        - name: geoTargetsSuggestions | type: GeoTargets | description: Geographic target suggestions for a campaign.  
           - name: geoTargets | type: array<GeoTarget> | description: Geographic targets suggested for the campaign.  | validation: maxItems 1000
              - name: id | type: string | description: Google Ads internal GUID for this geographic target.  | validation: maxLength 1000
              - name: displayName | type: string | description: Human-readable name for the geographic target, suitable for display in a UI.  | validation: maxLength 1000
              - name: countryCode | type: string | description: ISO 3166-1 alpha-2 country code for this geo target. Output 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}  
           - 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 budget suggestions with estimated click ranges.  
           - name: low | type: BudgetSuggestion | description: Conservative budget option with the lowest daily spend.  
              - name: dailyBudget | type: string | description: Suggested daily budget in micros (1,000,000 micros = 1 currency unit).  
              - name: minEstimatedClicks | type: string | description: Estimated minimum number of clicks per day at this budget level.  
              - name: maxEstimatedClicks | type: string | description: Estimated maximum number of clicks per day at this budget level.  
           - name: high | type: BudgetSuggestion | description: Aggressive budget option with the highest daily spend.  
           - name: recommended | type: BudgetSuggestion | description: Balanced budget option recommended by Google Ads.  


```

### Examples

### Get Geo Options
```curl
curl -X GET \
  'https://www.wixapis.com/google-ads/v1/geo-options?queryLocation=New+York&languageCode=en&countryCode=US' \
  -H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.promoteGoogleAds.suggestions.getGeoOptions(options)
 Description: Retrieves geographic location suggestions matching a partial query string. Use the returned geo targets to populate the `locations` field when creating a campaign. Results may include restricted countries; restricted locations are rejected when the campaign is created.
 Method parameters:
   param name: options | type: GetGeoOptionsOptions  none  
        - name: queryLocation | type: string | description: Partial location name to search for.  | validation: maxLength 1000
        - name: languageCode | type: string | description: BCP-47 language code for localizing result display names.  | validation: maxLength 1000
        - name: countryCode | type: string | description: ISO 3166-1 alpha-2 country code to bias results toward a specific country.  | validation: format COUNTRY
        - name: queryLocations | type: string | description: Multiple location names to search for, separated by semicolons.  | validation: maxLength 1000
 Return type: PROMISE<GetGeoOptionsResponse>
  - name: googleSuggestion | type: GoogleSuggestion | description: Geo target suggestions matching the query. May include restricted countries; restricted locations are rejected when the campaign is created.  
     - ONE-OF: 
        - name: keywordThemes | type: KeywordThemes | description: Keyword theme suggestions for a Smart campaign.  
           - name: keywordThemes | type: array<KeywordTheme> | description: Keyword themes suggested for the campaign.  | validation: maxItems 10
              - name: _id | type: string | description: Google Ads internal GUID for this keyword theme.  | validation: maxLength 1000
              - name: displayName | type: string | description: Human-readable label for the keyword theme, suitable for display in a UI.  | validation: maxLength 1000
        - name: geoTargetsSuggestions | type: GeoTargets | description: Geographic target suggestions for a campaign.  
           - name: geoTargets | type: array<GeoTarget> | description: Geographic targets suggested for the campaign.  | validation: maxItems 1000
              - name: _id | type: string | description: Google Ads internal GUID for this geographic target.  | validation: maxLength 1000
              - name: displayName | type: string | description: Human-readable name for the geographic target, suitable for display in a UI.  | validation: maxLength 1000
              - name: countryCode | type: string | description: ISO 3166-1 alpha-2 country code for this geo target. Output 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}  
           - 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 budget suggestions with estimated click ranges.  
           - name: low | type: BudgetSuggestion | description: Conservative budget option with the lowest daily spend.  
              - name: dailyBudget | type: string | description: Suggested daily budget in micros (1,000,000 micros = 1 currency unit).  
              - name: minEstimatedClicks | type: string | description: Estimated minimum number of clicks per day at this budget level.  
              - name: maxEstimatedClicks | type: string | description: Estimated maximum number of clicks per day at this budget level.  
           - name: high | type: BudgetSuggestion | description: Aggressive budget option with the highest daily spend.  
           - name: recommended | type: BudgetSuggestion | description: Balanced budget option recommended by Google Ads.  


```

### Examples

### Get geo location options for a partial address query
```javascript
import { suggestions } from '@wix/promote-google-ads';

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

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

```

### getGeoOptions (self-hosted)
Self-hosted 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);
};
```

---