ads

package
v1.261201.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2026 License: MIT Imports: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAdsCommand

func NewAdsCommand(d *shared.Deps) *ffcli.Command

NewAdsCommand returns the Apple Ads root command.

func SuggestionQueryRecoveryHint

func SuggestionQueryRecoveryHint(err error) string

SuggestionQueryRecoveryHint returns JSON-safe guidance for category and phrase query failures.

Types

type SearchCampaign added in v1.260819.0

type SearchCampaign struct {
	ID            int64    `json:"id"`
	Name          string   `json:"name,omitempty"`
	Status        string   `json:"status,omitempty"`
	DisplayStatus string   `json:"displayStatus,omitempty"`
	Countries     []string `json:"countries,omitempty"`
}

SearchCampaign is the app campaign context used to scope dependent queries.

type SearchEligibility added in v1.260819.0

type SearchEligibility struct {
	Country         string   `json:"country,omitempty"`
	SupplyPlacement string   `json:"supplyPlacement,omitempty"`
	DeviceClass     string   `json:"deviceClass,omitempty"`
	State           string   `json:"state"`
	Reasons         []string `json:"reasons,omitempty"`
}

SearchEligibility describes one placement/storefront eligibility row.

type SearchImpressionShare added in v1.260819.0

type SearchImpressionShare struct {
	Term        string   `json:"term"`
	Country     string   `json:"country,omitempty"`
	Day         string   `json:"day,omitempty"`
	Week        string   `json:"week,omitempty"`
	Low         *float64 `json:"low,omitempty"`
	High        *float64 `json:"high,omitempty"`
	Rank        *int     `json:"rank,omitempty"`
	Popularity5 *int     `json:"popularity5,omitempty"`
}

SearchImpressionShare is one app-specific paid reach row.

type SearchNegativeKeyword added in v1.260819.0

type SearchNegativeKeyword struct {
	Text       string `json:"text"`
	MatchType  string `json:"matchType"`
	Status     string `json:"status,omitempty"`
	CampaignID int64  `json:"campaignId"`
	AdGroupID  int64  `json:"adGroupId,omitempty"`
}

SearchNegativeKeyword is an existing paid exclusion.

type SearchOptimizationData added in v1.260819.0

type SearchOptimizationData struct {
	Sources                        []SearchOptimizationSourceStatus `json:"sources"`
	Suggestions                    []SearchSuggestion               `json:"suggestions,omitempty"`
	SuggestionsTruncated           bool                             `json:"-"`
	Popularities                   []SearchPopularity               `json:"popularities,omitempty"`
	ImpressionShares               []SearchImpressionShare          `json:"impressionShares,omitempty"`
	SearchTerms                    []SearchTermPerformance          `json:"searchTerms,omitempty"`
	Campaigns                      []SearchCampaign                 `json:"campaigns,omitempty"`
	Keywords                       []SearchTargetingKeyword         `json:"keywords,omitempty"`
	NegativeKeywords               []SearchNegativeKeyword          `json:"negativeKeywords,omitempty"`
	Eligibilities                  []SearchEligibility              `json:"eligibilities,omitempty"`
	DailyBudgetRecommendationItems []json.RawMessage                `json:"dailyBudgetRecommendationItems,omitempty"`
	TargetCPARecommendationItems   []json.RawMessage                `json:"targetCpaRecommendationItems,omitempty"`
	TargetCPASuggestion            json.RawMessage                  `json:"targetCpaSuggestion,omitempty"`
	DailyBudgetRecommendations     int                              `json:"dailyBudgetRecommendations"`
	TargetCPARecommendations       int                              `json:"targetCpaRecommendations"`
}

SearchOptimizationData is the normalized official Apple Ads evidence used by the top-level optimizer.

func CollectSearchOptimizationData added in v1.260819.0

func CollectSearchOptimizationData(ctx context.Context, d *shared.Deps, adsProfile, adAccount string, request SearchOptimizationRequest) (SearchOptimizationData, error)

CollectSearchOptimizationData resolves official Apple Ads authentication and gathers the read-only evidence needed by `asc optimize search plan`.

func CollectSearchSuggestions added in v1.260825.0

func CollectSearchSuggestions(ctx context.Context, d *shared.Deps, adsProfile, adAccount string, request SearchOptimizationRequest) (SearchOptimizationData, error)

CollectSearchSuggestions resolves official Apple Ads authentication and gathers only the keyword and phrase suggestions needed by `asc optimize keywords discover`. The request limit is applied to each documented suggestion endpoint before pagination, so discovery never walks the broader optimization data set or downloads a full 1000-item page just to truncate it locally.

type SearchOptimizationRequest added in v1.260819.0

type SearchOptimizationRequest struct {
	AppID           string
	Country         string
	Genre           string
	Start           string
	End             string
	PopularityStart string
	PopularityEnd   string
	// Limit bounds the suggestions-only collection used by keyword discovery.
	// The broader optimization plan leaves it unset and retains its existing
	// pagination behavior.
	Limit int
}

SearchOptimizationRequest identifies the official Apple Ads data window and market used by the cross-API search optimization workflow.

type SearchOptimizationSourceStatus added in v1.260819.0

type SearchOptimizationSourceStatus struct {
	Name   string `json:"name"`
	Status string `json:"status"`
	Count  int    `json:"count"`
	Error  string `json:"error,omitempty"`
}

SearchOptimizationSourceStatus describes the availability of one official Apple Ads source. Empty responses are distinct from unavailable sources.

type SearchPopularity added in v1.260819.0

type SearchPopularity struct {
	Term              string `json:"term"`
	Country           string `json:"country,omitempty"`
	Genre             string `json:"genre,omitempty"`
	Week              string `json:"week,omitempty"`
	Month             string `json:"month,omitempty"`
	RankInGenre       *int   `json:"rankInGenre,omitempty"`
	PopularityInGenre *int   `json:"popularityInGenre,omitempty"`
	Popularity100     *int   `json:"popularity100,omitempty"`
	Popularity5       *int   `json:"popularity5,omitempty"`
}

SearchPopularity is one country-and-genre search demand snapshot.

func CollectSearchPopularity added in v1.260825.0

func CollectSearchPopularity(ctx context.Context, d *shared.Deps, adsProfile, adAccount string, request SearchOptimizationRequest) ([]SearchPopularity, error)

CollectSearchPopularity resolves official Apple Ads authentication and reads only country-and-genre search demand. Unlike the broader optimization plan, this source is not scoped to a promoted app.

type SearchSuggestion added in v1.260819.0

type SearchSuggestion struct {
	Text       string `json:"text"`
	Popularity *int   `json:"popularity,omitempty"`
	Kind       string `json:"kind"`
}

SearchSuggestion is one keyword or phrase returned by Apple's suggestion endpoints. Popularity is kept separate from market-scoped popularity.

type SearchTargetingKeyword added in v1.260819.0

type SearchTargetingKeyword struct {
	Text       string `json:"text"`
	MatchType  string `json:"matchType"`
	Status     string `json:"status,omitempty"`
	CampaignID int64  `json:"campaignId"`
	AdGroupID  int64  `json:"adGroupId"`
}

SearchTargetingKeyword is an existing paid targeting keyword.

type SearchTermPerformance added in v1.260819.0

type SearchTermPerformance struct {
	Term          string `json:"term"`
	KeywordText   string `json:"keywordText,omitempty"`
	MatchType     string `json:"matchType,omitempty"`
	Country       string `json:"country,omitempty"`
	CampaignID    int64  `json:"campaignId,omitempty"`
	AdGroupID     int64  `json:"adGroupId,omitempty"`
	Impressions   int64  `json:"impressions"`
	Taps          int64  `json:"taps"`
	TapInstalls   int64  `json:"tapInstalls"`
	TotalInstalls int64  `json:"totalInstalls"`
	SpendAmount   string `json:"spendAmount,omitempty"`
	SpendCurrency string `json:"spendCurrency,omitempty"`
}

SearchTermPerformance captures the actual user query and paid outcome from Apple's app Search Terms report.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL