Skip to content

⬆️ Adopt asa-api-client 0.2.1 + AI negative keyword suggestions#31

Merged
SamPetherbridge merged 2 commits into
mainfrom
chore/asa-api-client-0.2.1
Jun 9, 2026
Merged

⬆️ Adopt asa-api-client 0.2.1 + AI negative keyword suggestions#31
SamPetherbridge merged 2 commits into
mainfrom
chore/asa-api-client-0.2.1

Conversation

@SamPetherbridge

@SamPetherbridge SamPetherbridge commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #30 — brings the CLI up to date with asa-api-client 0.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

  • Bump dependency floor to >=0.2.1, refresh uv.lock (0.1.6 → 0.2.1)
  • Adapt to renamed report metric fields in reports.py and optimize.py:
    • installstap_installs
    • conversion_ratetap_install_rate
    • avg_cpatotal_avg_cpi

✨ Add AI-powered negative keyword suggestions

  • New asa optimize negatives command: 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.
  • Supports --min-spend/--min-impressions/--country filters, CSV export, --dry-run, and batched analysis for large term sets.

Verification

  • ruff check / ruff format --check
  • mypy --strict (confirms the renamed fields exist in 0.2.1)
  • pytest (4 passed)
  • ✅ Both AI agents (translate + negatives) construct at runtime; full CLI command tree loads
  • ✅ Each commit verified green standalone

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.
@SamPetherbridge SamPetherbridge merged commit c2d8b9a into main Jun 9, 2026
1 check passed
@SamPetherbridge SamPetherbridge deleted the chore/asa-api-client-0.2.1 branch June 9, 2026 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

⬆️ Update asa-api-client to 0.2.1 (currently locked to 0.1.6)

1 participant