⬆️ Adopt asa-api-client 0.2.1 + AI negative keyword suggestions#31
Merged
Conversation
Bump the dependency floor to >=0.2.1 and refresh the lockfile to pick up the v0.2.0 API v5 coverage release (and v0.2.1 maintenance fixes). Adapt to renamed report metric fields: - installs -> tap_installs - conversion_rate -> tap_install_rate - avg_cpa -> total_avg_cpi Closes #30
Add 'asa optimize negatives' command that pulls search term reports across campaigns, sends performance data to an AI model (Anthropic or Gemini via PydanticAI) for relevance classification, and optionally applies suggestions as campaign-level negative keywords. Supports filtering by spend/impressions/country, CSV export, dry-run, and batched analysis for large term sets.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #30 — brings the CLI up to date with
asa-api-client0.2.1 (was locked to 0.1.6, two releases behind) and adapts to the v5 API surface from the v0.2.0 release.Changes
⬆️ Adopt asa-api-client 0.2.1 and adapt report fields>=0.2.1, refreshuv.lock(0.1.6 → 0.2.1)reports.pyandoptimize.py:installs→tap_installsconversion_rate→tap_install_rateavg_cpa→total_avg_cpi✨ Add AI-powered negative keyword suggestionsasa optimize negativescommand: pulls search-term reports across campaigns, classifies relevance via an AI model (Anthropic or Gemini through PydanticAI), and optionally applies suggestions as campaign-level negative keywords.--min-spend/--min-impressions/--countryfilters, CSV export,--dry-run, and batched analysis for large term sets.Verification
ruff check/ruff format --checkmypy --strict(confirms the renamed fields exist in 0.2.1)pytest(4 passed)