Help us shape the future of Go! Take the 2026 Go Developer Survey

optimize

package
v1.261022.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 28 Imported by: 0

Documentation

Overview

Package optimize composes official Apple sources into read-only optimization workflows.

The keyword difficulty methodology implemented in this file — the signal weights and constants, the keyword match ladder, and the brand heuristic — is adapted from semihcihan's App Store Optimization CLI (MIT licensed): https://github.com/semihcihan/App-Store-Optimization-CLI

This is an independent Go implementation of that published formula rather than ported code. docs/design/optimize-keywords.md documents the formula, its named inputs, and its limitations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KeywordsCommand added in v1.260825.0

func KeywordsCommand() *ffcli.Command

KeywordsCommand returns the keyword evaluation group.

func KeywordsDiscoverCommand added in v1.260825.0

func KeywordsDiscoverCommand() *ffcli.Command

KeywordsDiscoverCommand returns the official Apple Ads keyword suggestion command.

func KeywordsRankCommand added in v1.260825.0

func KeywordsRankCommand() *ffcli.Command

KeywordsRankCommand returns the public keyword ranking command.

func KeywordsScoreCommand added in v1.260825.0

func KeywordsScoreCommand() *ffcli.Command

KeywordsScoreCommand returns the composed keyword scoring command.

func OptimizeCommand

func OptimizeCommand() *ffcli.Command

OptimizeCommand returns the cross-API optimization group.

func SearchCommand

func SearchCommand() *ffcli.Command

SearchCommand returns the search optimization group.

func SearchPlanCommand

func SearchPlanCommand() *ffcli.Command

SearchPlanCommand returns the official-only search optimization workflow.

Types

type SearchPlanMoney

type SearchPlanMoney struct {
	Amount   string `json:"amount"`
	Currency string `json:"currency"`
}

SearchPlanMoney is one currency-qualified amount derived from official Ads reporting data.

type SearchPlanRecommendations

type SearchPlanRecommendations struct {
	DailyBudgets        []json.RawMessage `json:"dailyBudgets,omitempty"`
	TargetCPAs          []json.RawMessage `json:"targetCpas,omitempty"`
	TargetCPASuggestion json.RawMessage   `json:"targetCpaSuggestion,omitempty"`
}

SearchPlanRecommendations preserves Apple's actionable recommendation payloads without converting them into client-authored advice.

type SearchPlanReport

type SearchPlanReport struct {
	SchemaVersion   string                               `json:"schemaVersion"`
	GeneratedAt     string                               `json:"generatedAt,omitempty"`
	AppID           string                               `json:"appId"`
	Version         string                               `json:"version"`
	VersionID       string                               `json:"versionId,omitempty"`
	AppInfoID       string                               `json:"appInfoId,omitempty"`
	Platform        string                               `json:"platform"`
	Country         string                               `json:"country"`
	Genre           string                               `json:"genre"`
	Locale          string                               `json:"locale"`
	Window          searchPlanWindow                     `json:"window"`
	Metadata        searchMetadataSnapshot               `json:"metadata"`
	Sources         []ads.SearchOptimizationSourceStatus `json:"sources"`
	Eligibility     []ads.SearchEligibility              `json:"eligibility,omitempty"`
	Campaigns       []ads.SearchCampaign                 `json:"campaigns,omitempty"`
	Recommendations SearchPlanRecommendations            `json:"recommendations"`
	Summary         SearchPlanSummary                    `json:"summary"`
	Rows            []SearchPlanRow                      `json:"rows"`
	Notices         []string                             `json:"notices,omitempty"`
	Artifacts       []string                             `json:"artifacts,omitempty"`
}

SearchPlanReport is the stable JSON contract emitted by the workflow.

type SearchPlanRow

type SearchPlanRow struct {
	Term                       string           `json:"term"`
	Popularity5                *int             `json:"popularity5,omitempty"`
	Popularity100              *int             `json:"popularity100,omitempty"`
	PopularityInGenre          *int             `json:"popularityInGenre,omitempty"`
	RankInGenre                *int             `json:"rankInGenre,omitempty"`
	SuggestionPopularity       *int             `json:"suggestionPopularity,omitempty"`
	ImpressionSharePeriod      string           `json:"impressionSharePeriod,omitempty"`
	ImpressionSharePopularity5 *int             `json:"impressionSharePopularity5,omitempty"`
	ImpressionShareLow         *float64         `json:"impressionShareLow,omitempty"`
	ImpressionShareHigh        *float64         `json:"impressionShareHigh,omitempty"`
	ImpressionShareRank        *int             `json:"impressionShareRank,omitempty"`
	Impressions                *int64           `json:"impressions,omitempty"`
	Taps                       *int64           `json:"taps,omitempty"`
	TapInstalls                *int64           `json:"tapInstalls,omitempty"`
	TotalInstalls              *int64           `json:"totalInstalls,omitempty"`
	Spend                      *SearchPlanMoney `json:"spend,omitempty"`
	CPA                        *SearchPlanMoney `json:"cpa,omitempty"`
	MatchedKeyword             string           `json:"matchedKeyword,omitempty"`
	MatchType                  string           `json:"matchType,omitempty"`
	CampaignID                 *int64           `json:"campaignId,omitempty"`
	AdGroupID                  *int64           `json:"adGroupId,omitempty"`
	MetadataFields             []string         `json:"metadataFields,omitempty"`
	Sources                    []string         `json:"sources"`
	Actions                    []string         `json:"actions,omitempty"`
	Confidence                 string           `json:"confidence"`
}

SearchPlanRow is one normalized term with explicit source provenance.

type SearchPlanSummary

type SearchPlanSummary struct {
	Terms                      int            `json:"terms"`
	Actions                    map[string]int `json:"actions"`
	AvailableSources           int            `json:"availableSources"`
	EmptySources               int            `json:"emptySources"`
	UnavailableSources         int            `json:"unavailableSources"`
	DailyBudgetRecommendations int            `json:"dailyBudgetRecommendations"`
	TargetCPARecommendations   int            `json:"targetCpaRecommendations"`
}

SearchPlanSummary summarizes evidence and recommendation coverage.

Jump to

Keyboard shortcuts

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