-
Notifications
You must be signed in to change notification settings - Fork 2
Releases: SamPetherbridge/asa-api-client
v0.2.1 — CI fixes & maintenance
2d219a2 Patch release. No public API changes — rolls up post-0.2.0 maintenance and CI fixes.
Fixes
- 🐛 Allow
list[int]JSON body for bulk-delete endpoints (mypy type correctness; runtime behavior unchanged) - 🎨 Apply ruff formatting across source files
- 🔧 Sync
uv.lockwith the package version (#16)
Tooling / CI
- 👷 Add
uv lock --checkCI guard to prevent lockfile drift (#16) - 👷 Bump GitHub Actions:
checkout4→6,setup-uv4→7,configure-pages4→5,upload-pages-artifact3→4 (#4–#7)
Full Changelog: v0.2.0...v0.2.1
Assets 2
v0.2.0 — Complete Apple Ads API v5 Coverage
67eeb86 ✨ Complete Apple Ads API v5 Coverage
This release brings full coverage of the Apple Search Ads Campaign Management API v5 with correct Pydantic models for every endpoint.
New Resources
- Ads — Full CRUD for ad management (
client.campaigns(id).ad_groups(id).ads) - Product Pages — List pages, get details, locale info (
client.product_pages(adam_id)) - Budget Orders — Read budget orders (
client.budget_orders) - ACLs — List org/role access (
client.acls) - App Search — Search eligible iOS apps (
client.apps.search()) - Geo Search — Search geographic locations for targeting (
client.geo.search()) - Countries/Regions — List supported countries with language details (
client.countries_or_regions)
New Keyword Operations
keywords.delete_bulk()— Bulk delete targeting keywordsnegative_keywords.update_bulk()— Bulk update negative keywordsnegative_keywords.delete_bulk()— Bulk delete negative keywords
New Report Types
reports.ads()— Ad-level performance reportsreports.ad_group_keywords()— Ad group-scoped keyword reportsreports.ad_group_search_terms()— Ad group-scoped search term reports
v5 Model Corrections
- Campaign: Fixed
biddingStrategy(wasbidStrategyType),targetCpa(wastargetCostPerAcquisition),budgetOrdersis nowlist[int],countryOrRegionServingStateReasonsis nowdict[str, list[str]]. AddedcreationTime,deleted,adChannelType,billingEventto response model. - MetricData: All field aliases corrected to v5 names —
tapInstalls,viewInstalls,totalInstalls,tapInstallCPI,avgCPM,totalAvgCPI,totalInstallRate,tapPreOrdersPlaced, etc. - AdGroup: Added
deleted,automatedKeywordsRequired,biddingStrategy,paymentModel. Fixed serving state reason enum values. - Ad: Added
creativeId. FixedAdDisplayStatusvalues andAdServingStateReasonenum (12 values). - ReportMetadata: Added ad-level fields (
adId,adName,creativeType,creativeId,adDisplayStatus,language,productPageId).
Enum Completeness
CampaignServingStateReason: 38 values (was 28)CampaignCountryOrRegionServingStateReason: 20 values (was 3)AdGroupServingStateReason: 12 values with correct v5 namesAdServingStateReason: 12 values (was 5)CreativeType: AddedCREATIVE_SET- New:
BudgetOrderStatus,BiddingStrategyenums
Deprecations
custom_reports.list_reports(),.get()— GET/custom-reportsendpoint returns 403 since March 2026 (Apple replaced with Insights). EmitsDeprecationWarning. POST-basedcreate_impression_share()+wait_for_report()still works.
Breaking Changes
BidStrategyTyperenamed toBiddingStrategy(alias kept for backwards compat)MetricDatafield names changed to match v5 API (e.g.,installs→tap_installs)Campaign.budget_orderstype changed fromlist[dict]tolist[int]Campaign.country_or_region_serving_statesreplaced bycountry_or_region_serving_state_reasons
Assets 2
v0.1.6 - Report Reuse
f729b14 What's New
Report Reuse to Avoid Daily Limit
Apple limits impression share reports to 10 per day. This release automatically reuses existing completed reports when possible:
get_impression_share()now checks for existing reports before creating new ones- Uses 1-day tolerance on end date to handle day rollover scenarios
- Prefers exact matches, falls back to close matches
Debug Logging
Set ASA_DEBUG=1 environment variable to see all API requests:
$ ASA_DEBUG=1 uv run asa impression-share analyze [custom-reports] GET custom-reports [custom-reports] Reusing existing report 57861436 ✓ Retrieved 65 records
Bug Fixes
- Fixed
list_reports()- removed unsupported pagination params that caused HTTP 400
Full Changelog
Assets 2
v0.1.5
7c21b7a - Increase default retries from 3 to 5
- Increase initial delay from 1s to 5s (better for Apple rate limits)
- Increase max delay from 60s to 120s
- Add visible retry progress output to stderr
Assets 2
v0.1.4
b5f7d5c Add retry with exponential backoff to CustomReportResource for impression share report creation
Assets 2
v0.1.3
f31ed64 What's Changed
Features
- Automatic retry with exponential backoff for rate limiting (429) and server errors (5xx)
- Exponential backoff: 1s, 2s, 4s... up to 60s max
- Respects
Retry-Afterheader when present - 3 retries by default (configurable via
max_retriesparam) - Applies to both sync and async request methods
- Logs retry attempts with delay information
This helps handle Apple's API rate limits gracefully, automatically retrying requests when the API returns 429 errors.
Assets 2
v0.1.2 - Add Impression Share Reports
452d8c5 What's New
-
Impression Share Reports: Added full support for Apple Search Ads Custom Reports API
ImpressionShareReport,ImpressionShareReportRow,ImpressionShareReportRequestmodelsCustomReportResourcewithcreate_impression_share(),get(),wait_for_report()methods- Automatic CSV download and parsing when report completes
- Both sync and async support
-
Pre-commit Hooks: Added ruff and mypy pre-commit hooks for code quality
Assets 2
v0.1.1 - Fix author metadata
2ec5683 Changes
- Fixed author name to "Sam Petherbridge"
- Fixed author email to "hello@peth.me"
No functional changes from v0.1.0.
Assets 2
v0.1.0 - Initial Release
55c0106 ASA API Client v0.1.0
A modern, fully-typed Python client for the Apple Search Ads API with async support and Pydantic models.
Features
- Full Type Safety - Complete type hints with strict mypy compliance
- Async Support - Both sync and async methods in a unified client
- Pydantic Models - Validated request/response models
- Resource-based API - Intuitive
client.campaigns.list()pattern - Automatic Pagination -
iter_all()anditer_all_async()helpers - Reports with Pandas - Optional DataFrame export
Installation
pip install asa-api-client
Or with uv:
uv add asa-api-client
Quick Start
from asa_api_client import AppleSearchAdsClient client = AppleSearchAdsClient.from_env() with client: campaigns = client.campaigns.list() for campaign in campaigns: print(f"{campaign.name}: {campaign.status}")
Resources
- Campaigns - List, get, create, update campaigns
- Ad Groups - Manage ad groups within campaigns
- Keywords - Bulk create and manage keywords
- Reports - Generate performance reports with optional DataFrame export
Documentation
Full documentation available at asa-api-client.peth.au
Requirements
- Python 3.13+
- Valid Apple Search Ads API credentials
License
MIT License - Copyright (c) 2025 Peth Pty Ltd