python-amazon-ad-api 1.5.10__tar.gz → 1.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- python_amazon_ad_api-1.6.0/PKG-INFO +498 -0
- python_amazon_ad_api-1.6.0/README.md +470 -0
- python_amazon_ad_api-1.6.0/ad_api/api/exports.py +149 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sd/budget_rules.py +6 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sp/budget_rules.py +6 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/v1/__init__.py +2 -0
- python_amazon_ad_api-1.6.0/ad_api/api/v1/location_indexes.py +109 -0
- python_amazon_ad_api-1.6.0/ad_api/version.py +1 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/pyproject.toml +4 -0
- python_amazon_ad_api-1.6.0/python_amazon_ad_api.egg-info/PKG-INFO +498 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/python_amazon_ad_api.egg-info/SOURCES.txt +1 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/setup.cfg +1 -1
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/setup.py +1 -1
- python_amazon_ad_api-1.5.10/PKG-INFO +0 -492
- python_amazon_ad_api-1.5.10/README.md +0 -464
- python_amazon_ad_api-1.5.10/ad_api/api/exports.py +0 -56
- python_amazon_ad_api-1.5.10/ad_api/version.py +0 -1
- python_amazon_ad_api-1.5.10/python_amazon_ad_api.egg-info/PKG-INFO +0 -492
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/LICENSE +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/__init__.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/__init__.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/account.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/account_budgets.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/advertising_test_account.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/attribution.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/audiences.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/billing.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/brand_metrics.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/creative_assets.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/eligibility.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/history.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/insights.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/invoices.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/localization.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/manager_accounts.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/metadata.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/portfolios.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/portfolios_v3.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/profiles.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/recommendations.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/reports.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sb/__init__.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sb/ad_creatives_v4.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sb/ad_groups.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sb/ad_groups_v4.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sb/ads_v4.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sb/benchmarks.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sb/bid_recommendations.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sb/brands.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sb/budget_rules.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sb/campaigns.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sb/campaigns_v4.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sb/forecast.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sb/keywords.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sb/keywords_recommendations.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sb/landing_page_asins.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sb/media.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sb/migration.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sb/negative_keywords.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sb/negative_product_targeting.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sb/optimization_rules.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sb/product_targeting.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sb/recommendations.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sb/reports.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sb/stores.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sb/targeting_categories.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sb/targeting_recommendations.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sb/themes.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sd/__init__.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sd/ad_groups.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sd/bid_recommendations.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sd/brand_safety.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sd/campaigns.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sd/campaigns_budget_usage.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sd/creatives.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sd/forecast.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sd/negative_product_targeting.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sd/product_ads.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sd/product_targeting.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sd/recommendations.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sd/reports.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sd/snapshots.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sd/targeting_recommendations.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sp/__init__.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sp/ad_groups_v3.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sp/bid_recommendations_v3.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sp/budget_initial_recommendation.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sp/budget_recommendations.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sp/budget_rules_recommendations.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sp/campaign_consolidated_recommendations.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sp/campaign_negative_keywords_v3.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sp/campaign_negative_targets.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sp/campaigns_budget_usage.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sp/campaigns_v3.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sp/campaings_optimization.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sp/keywords_v3.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sp/negative_keywords_v3.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sp/negative_product_targeting_v3.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sp/product_ads_v3.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sp/product_recommendations.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sp/product_targeting_v3.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sp/ranked_keywords_recommendations.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/sp/schedule_based_bid_optimization.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/stores.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/stream.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/v1/ad_associations.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/v1/ad_extensions.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/v1/ad_groups.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/v1/ads.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/v1/advertiser_accounts.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/v1/brand_store_edition_publish_versions.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/v1/brand_store_editions.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/v1/brand_store_pages.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/v1/brand_stores.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/v1/campaigns.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/v1/geo_locations.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/v1/label_object_associations.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/v1/labels.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/v1/manager_accounts.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/v1/recommendation_types.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/v1/recommendations.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/v1/reports.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/v1/selling_accounts.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/v1/targets.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/api/validation_configurations.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/auth/__init__.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/auth/access_token_client.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/auth/access_token_response.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/auth/credentials.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/auth/exceptions.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/base/__init__.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/base/api_response.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/base/base_client.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/base/client.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/base/config.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/base/credential_provider.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/base/exceptions.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/base/helpers.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/base/marketplaces.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/ad_api/base/utils.py +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/python_amazon_ad_api.egg-info/dependency_links.txt +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/python_amazon_ad_api.egg-info/requires.txt +0 -0
- {python_amazon_ad_api-1.5.10 → python_amazon_ad_api-1.6.0}/python_amazon_ad_api.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,498 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: python-amazon-ad-api
|
|
3
|
+
Version: 1.6.0
|
|
4
|
+
Summary: Python wrapper for the Amazon Advertising API
|
|
5
|
+
Home-page: https://github.com/denisneuf/python-amazon-ad-api
|
|
6
|
+
Author: Daniel Alvaro
|
|
7
|
+
Author-email: denisneuf@hotmail.com
|
|
8
|
+
License: MIT
|
|
9
|
+
Project-URL: Bug Tracker, https://github.com/denisneuf/python-amazon-ad-api/issues
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Requires-Dist: requests<2.35.0,>=2.27.1
|
|
16
|
+
Requires-Dist: six<1.18,>=1.16
|
|
17
|
+
Requires-Dist: cachetools<7.3,>=5.0
|
|
18
|
+
Requires-Dist: pycryptodome<4.3,>=3.13
|
|
19
|
+
Requires-Dist: pytz<2027.0,>=2021.3
|
|
20
|
+
Requires-Dist: confuse<2.4,>=1.7
|
|
21
|
+
Dynamic: author
|
|
22
|
+
Dynamic: author-email
|
|
23
|
+
Dynamic: home-page
|
|
24
|
+
Dynamic: license
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
Dynamic: requires-dist
|
|
27
|
+
Dynamic: summary
|
|
28
|
+
|
|
29
|
+
# PYTHON-AMAZON-AD-API
|
|
30
|
+
|
|
31
|
+

|
|
32
|
+

|
|
33
|
+

|
|
34
|
+
[](https://python-amazon-ad-api.readthedocs.io/en/latest/?badge=latest)
|
|
35
|
+

|
|
36
|
+
[](https://pepy.tech/project/python-amazon-ad-api)
|
|
37
|
+
[](https://pepy.tech/project/python-amazon-ad-api)
|
|
38
|
+
|
|
39
|
+
## Amazon's Advertising API
|
|
40
|
+
|
|
41
|
+
A python 3 wrapper to access Amazon's Advertising API with an easy-to-use interface.
|
|
42
|
+
|
|
43
|
+
### Install
|
|
44
|
+
|
|
45
|
+
[](https://pypi.org/project/python-amazon-ad-api/)
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
pip install python-amazon-ad-api
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Donate
|
|
52
|
+
|
|
53
|
+
If you find this project is useful consider donating or [sponsor](https://github.com/sponsors/denisneuf) it to keep on going on it, thank you.
|
|
54
|
+
|
|
55
|
+
[](https://www.paypal.com/donate?hosted_button_id=G3KB6M2G9YV9C)
|
|
56
|
+
|
|
57
|
+

|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
### Overview
|
|
61
|
+
|
|
62
|
+
You need obtain your own credentials with Amazon that may include an amazon developer account and access as seller or vendor. Please view the checklist of [Amazon Ads API onboarding overview](https://advertising.amazon.com/API/docs/en-us/setting-up/overview)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
### Code Credentials
|
|
66
|
+
You can use your credentials as follows passing it to the client as a dict. Please review the full [documentation](https://github.com/sponsors/denisneuf) to see all posibilities to include your credentials.
|
|
67
|
+
|
|
68
|
+
```javascript
|
|
69
|
+
from ad_api.api import ads_api_v1
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
my_credentials = dict(
|
|
73
|
+
refresh_token='your-refresh_token',
|
|
74
|
+
client_id='your-client_id',
|
|
75
|
+
client_secret='your-client_secret',
|
|
76
|
+
profile_id='your-profile_id',
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
info = {
|
|
80
|
+
"adProductFilter":
|
|
81
|
+
{
|
|
82
|
+
"include": [
|
|
83
|
+
"SPONSORED_PRODUCTS"
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
"stateFilter":
|
|
87
|
+
{
|
|
88
|
+
"include": [
|
|
89
|
+
"ENABLED"
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
result = ads_api_v1.Campaigns(credentials=my_credentials).query_campaigns(
|
|
95
|
+
body=info
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### YAML Credentials
|
|
101
|
+
Use a credentials.yml file with your credentials for more convenience and manage diferent accounts or profiles. Amazon requires one profile per marketplace so it is helpful to keep all in one file and switch directly from the code, using the account.
|
|
102
|
+
|
|
103
|
+
Create a file credentials.yml
|
|
104
|
+
|
|
105
|
+
```javascript
|
|
106
|
+
version: '1.0'
|
|
107
|
+
|
|
108
|
+
default:
|
|
109
|
+
refresh_token: 'your-refresh-token'
|
|
110
|
+
client_id: 'your-client-id'
|
|
111
|
+
client_secret: 'your-client-secret'
|
|
112
|
+
profile_id: 'your-profile-id'
|
|
113
|
+
|
|
114
|
+
germany:
|
|
115
|
+
refresh_token: 'other-refresh-token'
|
|
116
|
+
client_id: 'other-client-id'
|
|
117
|
+
client_secret: 'other-client-secret'
|
|
118
|
+
profile_id: 'other-profile-id'
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Python code
|
|
123
|
+
|
|
124
|
+
```python
|
|
125
|
+
from ad_api.api import ads_api_v1
|
|
126
|
+
|
|
127
|
+
info = {
|
|
128
|
+
"adProductFilter":
|
|
129
|
+
{
|
|
130
|
+
"include": [
|
|
131
|
+
"SPONSORED_PRODUCTS"
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
# Leave empty will use the 'default' account
|
|
137
|
+
result=ads_api_v1.Campaigns().query_campaigns(body=info)
|
|
138
|
+
# will use germany account data
|
|
139
|
+
result=ads_api_v1.Campaigns(account="germany").query_campaigns(body=info)
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
### Search path for credentials.yml
|
|
145
|
+
|
|
146
|
+
* macOS and Other Unix: `~/.config/python-ad-api`
|
|
147
|
+
* Windows: `%APPDATA%\python-ad-api` where the <cite>APPDATA</cite> environment variable falls
|
|
148
|
+
back to `%HOME%\AppData\Roaming` if undefined
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
[Confuse Help](https://confuse.readthedocs.io/en/latest/usage.html#search-paths)
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
### Marketplaces
|
|
155
|
+
|
|
156
|
+
Marketplaces are used to define basically the [API endpoints](https://advertising.amazon.com/API/docs/en-us/info/api-overview#api-endpoints) Amazon need to use depending on the regions, by default it will use EU so if you are using one of the marketplaces that are under the Europe (EU). Covers UK, FR, IT, ES, DE, NL, AE, SE, PL, and TR marketplaces you can skip. If you are using either North America (NA) or Far East (FE), you will need import from base and pass the marketplace as follows:
|
|
157
|
+
|
|
158
|
+
```python
|
|
159
|
+
from ad_api.api import ads_api_v1
|
|
160
|
+
from ad_api.base import Marketplaces
|
|
161
|
+
|
|
162
|
+
info = {
|
|
163
|
+
"adProductFilter":
|
|
164
|
+
{
|
|
165
|
+
"include": [
|
|
166
|
+
"SPONSORED_PRODUCTS"
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
# You can pass NA or US, CA, MX or BR for North America and JP, AU or SG for Far East
|
|
172
|
+
result=ads_api_v1.Campaigns(marketplace=Marketplaces.NA).query_campaigns(body=info)
|
|
173
|
+
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Exceptions
|
|
177
|
+
|
|
178
|
+
You can use a [try](https://docs.python.org/3.10/reference/compound_stmts.html#try) except statement when you call the API and catch exceptions if some problem ocurred:
|
|
179
|
+
|
|
180
|
+
```python
|
|
181
|
+
from ad_api.api import ads_api_v1
|
|
182
|
+
from ad_api.base import AdvertisingApiException
|
|
183
|
+
|
|
184
|
+
info = {
|
|
185
|
+
"adProductFilter":
|
|
186
|
+
{
|
|
187
|
+
"include": [
|
|
188
|
+
"SPONSORED_PRODUCTS"
|
|
189
|
+
]
|
|
190
|
+
},
|
|
191
|
+
"stateFilter":
|
|
192
|
+
{
|
|
193
|
+
"include": [
|
|
194
|
+
"ENABLED"
|
|
195
|
+
]
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
try:
|
|
200
|
+
|
|
201
|
+
result = ads_api_v1.Campaigns().query_campaigns(
|
|
202
|
+
body=info
|
|
203
|
+
)
|
|
204
|
+
|
|
205
|
+
logging.info(result)
|
|
206
|
+
|
|
207
|
+
except AdvertisingApiException as error:
|
|
208
|
+
logging.info(error)
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### Debug
|
|
212
|
+
|
|
213
|
+
Use debug=True if you want see some logs like the header you submit to the api endpoint, the method and path used among the params and the data submitted if any, to trace some possible errors. Note that the header includes the Authorization bearer token, so do not leave debug output in shared logs.
|
|
214
|
+
|
|
215
|
+
```python
|
|
216
|
+
from ad_api.api import ads_api_v1
|
|
217
|
+
from ad_api.base import AdvertisingApiException
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
info = {
|
|
221
|
+
"adProductFilter":
|
|
222
|
+
{
|
|
223
|
+
"include": [
|
|
224
|
+
"SPONSORED_PRODUCTS"
|
|
225
|
+
]
|
|
226
|
+
},
|
|
227
|
+
"stateFilter":
|
|
228
|
+
{
|
|
229
|
+
"include": [
|
|
230
|
+
"ENABLED"
|
|
231
|
+
]
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
try:
|
|
236
|
+
|
|
237
|
+
result = ads_api_v1.Campaigns(debug=True).query_campaigns(
|
|
238
|
+
body=info
|
|
239
|
+
)
|
|
240
|
+
|
|
241
|
+
logging.info(result)
|
|
242
|
+
|
|
243
|
+
except AdvertisingApiException as error:
|
|
244
|
+
logging.info(error)
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
### [Modules Available Common Resources](https://python-amazon-ad-api.readthedocs.io/en/latest/api.html)
|
|
249
|
+
|
|
250
|
+
| Module | Vendor contract | Vendor docs |
|
|
251
|
+
|---|---|---|
|
|
252
|
+
| [Profiles](https://python-amazon-ad-api.readthedocs.io/en/latest/api/profiles.html) | [contract](https://d3a0d0y2hgofx6.cloudfront.net/openapi/en-us/profiles/3-0/openapi.yaml) | [docs](https://advertising.amazon.com/API/docs/en-us/reference/profiles) |
|
|
253
|
+
| [Manager Accounts](https://python-amazon-ad-api.readthedocs.io/en/latest/api/manager_accounts.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/ManagerAccount_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/reference/v0/managerAccount) |
|
|
254
|
+
| [PortfoliosV3](https://python-amazon-ad-api.readthedocs.io/en/latest/api/portfoliosV3.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/Portfolios_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/reference/portfolios) |
|
|
255
|
+
| [Invoices](https://python-amazon-ad-api.readthedocs.io/en/latest/api/invoices.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AdvertisingBilling_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/billing) |
|
|
256
|
+
| [Billing](https://python-amazon-ad-api.readthedocs.io/en/latest/api/billing.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AdvertisingBilling_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/billing) |
|
|
257
|
+
| [Account Budgets](https://python-amazon-ad-api.readthedocs.io/en/latest/api/account_budgets.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/Advertisers_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/account-budgets/) |
|
|
258
|
+
| [Audiences](https://python-amazon-ad-api.readthedocs.io/en/latest/api/audiences.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/Audiences_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/audiences/) |
|
|
259
|
+
| [Change History](https://python-amazon-ad-api.readthedocs.io/en/latest/api/history.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/Changehistory_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/change-history/) |
|
|
260
|
+
| [Creative Assets](https://python-amazon-ad-api.readthedocs.io/en/latest/api/creative_assets.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/creative-asset-library-openapi.yaml) | [docs](https://advertising.amazon.com/API/docs/en-us/creative-asset-library) |
|
|
261
|
+
| [Eligibility](https://python-amazon-ad-api.readthedocs.io/en/latest/api/eligibility.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/Eligibility_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/eligibility-prod-3p) |
|
|
262
|
+
| [Insights](https://python-amazon-ad-api.readthedocs.io/en/latest/api/insights.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/Insights_prod_3p.json) | - |
|
|
263
|
+
| [Localization](https://python-amazon-ad-api.readthedocs.io/en/latest/api/localization.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/Localization_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/localization/) |
|
|
264
|
+
| [Product Selector](https://python-amazon-ad-api.readthedocs.io/en/latest/api/metadata.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/ProductSelector_prod_3p.json) | - |
|
|
265
|
+
| [Validation Configurations](https://python-amazon-ad-api.readthedocs.io/en/latest/api/validation_configurations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/ValidationConfigurationsAPI_prod_3p.json) | - |
|
|
266
|
+
| [Tactical recommendations](https://python-amazon-ad-api.readthedocs.io/en/latest/api/recommendations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/Recommendations_prod_3p.json) | - |
|
|
267
|
+
| [Exports](https://python-amazon-ad-api.readthedocs.io/en/latest/api/exports.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPIExports_prod_3p.json) | - |
|
|
268
|
+
|
|
269
|
+
### [Amazon Attribution open beta](https://python-amazon-ad-api.readthedocs.io/en/latest/api/attribution.html)
|
|
270
|
+
|
|
271
|
+
| Operation | Vendor contract | Vendor docs |
|
|
272
|
+
|---|---|---|
|
|
273
|
+
| [Advertisers](https://python-amazon-ad-api.readthedocs.io/en/latest/api/attribution.html#ad_api.api.Attribution.Attribution.get_advertisers) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAttribution_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/amazon-attribution-prod-3p) |
|
|
274
|
+
| [Publishers](https://python-amazon-ad-api.readthedocs.io/en/latest/api/attribution.html#ad_api.api.Attribution.Attribution.get_publishers) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAttribution_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/amazon-attribution-prod-3p) |
|
|
275
|
+
| [Macro tags](https://python-amazon-ad-api.readthedocs.io/en/latest/api/attribution.html#ad_api.api.Attribution.Attribution.get_macro_tag) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAttribution_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/amazon-attribution-prod-3p) |
|
|
276
|
+
| [Non Macro tags](https://python-amazon-ad-api.readthedocs.io/en/latest/api/attribution.html#ad_api.api.Attribution.Attribution.get_non_macro_template_tag) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAttribution_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/amazon-attribution-prod-3p) |
|
|
277
|
+
| [Reports](https://python-amazon-ad-api.readthedocs.io/en/latest/api/attribution.html#ad_api.api.Attribution.Attribution.post_report) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAttribution_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/amazon-attribution-prod-3p) |
|
|
278
|
+
|
|
279
|
+
### [Brand Metrics open beta](https://python-amazon-ad-api.readthedocs.io/en/latest/api/brand_metrics.html)
|
|
280
|
+
|
|
281
|
+
| Operation | Vendor contract | Vendor docs |
|
|
282
|
+
|---|---|---|
|
|
283
|
+
| [Post Report](https://python-amazon-ad-api.readthedocs.io/en/latest/api/brand_metrics.html#ad_api.api.BrandMetrics.BrandMetrics.post_report) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/BrandMetrics_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/guides/reporting/brand-metrics/overview) |
|
|
284
|
+
| [Get Report](https://python-amazon-ad-api.readthedocs.io/en/latest/api/brand_metrics.html#ad_api.api.BrandMetrics.BrandMetrics.get_report) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/BrandMetrics_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/guides/reporting/brand-metrics/overview) |
|
|
285
|
+
| [Download Report](https://python-amazon-ad-api.readthedocs.io/en/latest/api/brand_metrics.html#ad_api.api.BrandMetrics.BrandMetrics.download_report) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/BrandMetrics_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/guides/reporting/brand-metrics/overview) |
|
|
286
|
+
|
|
287
|
+
### [Advertising Test Account](https://python-amazon-ad-api.readthedocs.io/en/latest/api/advertising_test_account.html)
|
|
288
|
+
|
|
289
|
+
| Operation | Vendor contract | Vendor docs |
|
|
290
|
+
|---|---|---|
|
|
291
|
+
| [Create test account](https://python-amazon-ad-api.readthedocs.io/en/latest/api/advertising_test_account.html#ad_api.api.AdvertisingTestAccount) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AdvertisingTestAccount_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/test-accounts/openapi) |
|
|
292
|
+
| [Get test account information](https://python-amazon-ad-api.readthedocs.io/en/latest/api/advertising_test_account.html#ad_api.api.AdvertisingTestAccount.AdvertisingTestAccount.get_test_account) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AdvertisingTestAccount_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/test-accounts/openapi) |
|
|
293
|
+
|
|
294
|
+
### [Amazon Ads API v1 (new, unified)](https://python-amazon-ad-api.readthedocs.io/en/latest/v1.html)
|
|
295
|
+
|
|
296
|
+
> The v1 API lives under `/adsApi/v1/` and is **not** split by product: every call targets the same resource and the product is selected in the request body with `adProductFilter`. It supersedes the per-product v3 endpoints.
|
|
297
|
+
|
|
298
|
+
| Module | Vendor contract | Vendor docs |
|
|
299
|
+
|---|---|---|
|
|
300
|
+
| [Campaigns](https://python-amazon-ad-api.readthedocs.io/en/latest/v1/campaigns.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPIALLMerged_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/api-spec-v1-campaigns) |
|
|
301
|
+
| [Ad Groups](https://python-amazon-ad-api.readthedocs.io/en/latest/v1/ad_groups.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPIALLMerged_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/api-spec-v1-adgroups) |
|
|
302
|
+
| [Ads](https://python-amazon-ad-api.readthedocs.io/en/latest/v1/ads.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPIALLMerged_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/api-spec-v1-ads) |
|
|
303
|
+
| [Targets](https://python-amazon-ad-api.readthedocs.io/en/latest/v1/targets.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPIALLMerged_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/api-spec-v1-targets) |
|
|
304
|
+
| [Ad Extensions](https://python-amazon-ad-api.readthedocs.io/en/latest/v1/ad_extensions.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPIALLMerged_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/api-spec-v1-adextensions) |
|
|
305
|
+
| [Advertiser Accounts](https://python-amazon-ad-api.readthedocs.io/en/latest/v1/advertiser_accounts.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPIALLMerged_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/api-spec-v1-advertiseraccounts) |
|
|
306
|
+
| [Ad Associations](https://python-amazon-ad-api.readthedocs.io/en/latest/v1/ad_associations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPIALLMerged_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/api-spec-v1-adassociations) |
|
|
307
|
+
| [Brand Store Edition Publish Versions](https://python-amazon-ad-api.readthedocs.io/en/latest/v1/brand_store_edition_publish_versions.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPIALLMerged_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/api-spec-v1-brandstoreeditionpublishversions) |
|
|
308
|
+
| [Brand Stores](https://python-amazon-ad-api.readthedocs.io/en/latest/v1/brand_stores.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPIALLMerged_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/api-spec-v1-brandstores) |
|
|
309
|
+
| [Brand Store Editions](https://python-amazon-ad-api.readthedocs.io/en/latest/v1/brand_store_editions.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPIALLMerged_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/api-spec-v1-brandstoreeditions) |
|
|
310
|
+
| [Brand Store Pages](https://python-amazon-ad-api.readthedocs.io/en/latest/v1/brand_store_pages.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPIALLMerged_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/api-spec-v1-brandstorepages) |
|
|
311
|
+
| [Reports](https://python-amazon-ad-api.readthedocs.io/en/latest/v1/reports.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPIALLMerged_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/api-spec-v1-reports) |
|
|
312
|
+
| [Labels](https://python-amazon-ad-api.readthedocs.io/en/latest/v1/labels.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPIALLMerged_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/api-spec-v1-labels) |
|
|
313
|
+
| [Manager Accounts](https://python-amazon-ad-api.readthedocs.io/en/latest/v1/manager_accounts.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPIALLMerged_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/api-spec-v1-manager-accounts) |
|
|
314
|
+
| [Recommendations](https://python-amazon-ad-api.readthedocs.io/en/latest/v1/recommendations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPIALLMerged_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/api-spec-v1-recommendations) |
|
|
315
|
+
| [Selling Accounts](https://python-amazon-ad-api.readthedocs.io/en/latest/v1/selling_accounts.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPIALLMerged_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/api-spec-v1-selling-accounts) |
|
|
316
|
+
| [Label Object Associations](https://python-amazon-ad-api.readthedocs.io/en/latest/v1/label_object_associations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPIALLMerged_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/api-spec-v1-label-object-associations) |
|
|
317
|
+
| [Geo Locations](https://python-amazon-ad-api.readthedocs.io/en/latest/v1/geo_locations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPIALLMerged_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/api-spec-v1-geo-locations) |
|
|
318
|
+
| [Recommendation Types](https://python-amazon-ad-api.readthedocs.io/en/latest/v1/recommendation_types.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPIALLMerged_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/api-spec-v1-recommendation-types) |
|
|
319
|
+
|
|
320
|
+
### [Modules Available Sponsored Products](https://python-amazon-ad-api.readthedocs.io/en/latest/sp.html)
|
|
321
|
+
|
|
322
|
+
> The campaign, ad group and product ad operations are deprecated in favour of the v1 endpoints. In product targeting only the four CRUD operations are deprecated; its helper endpoints remain supported. Keywords, negative keywords and negative product targeting have no v1 equivalent yet and stay supported.
|
|
323
|
+
|
|
324
|
+
| Module | Vendor contract | Vendor docs |
|
|
325
|
+
|---|---|---|
|
|
326
|
+
| [ThemeBased Bid Recommendation](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/bid_recommendations_v3.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
|
|
327
|
+
| [Keyword Recommendations](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/ranked_keywords_recommendations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
|
|
328
|
+
| [Keywords](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/keywords_v3.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
|
|
329
|
+
| [Negative Keywords](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/negative_keywords_v3.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
|
|
330
|
+
| [Product Targeting](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/product_targeting_v3.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
|
|
331
|
+
| [Campaign Optimization](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/campaign_optimization_rules.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
|
|
332
|
+
| [Budget Rules](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/budget_rules.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
|
|
333
|
+
| [Product Ads](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/product_ads_v3.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
|
|
334
|
+
| [Negative Targeting Clauses](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/negative_product_targeting_v3.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
|
|
335
|
+
| [Campaign Negative Targeting Clauses](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/campaign_negative_targets.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
|
|
336
|
+
| [Budget recommendations and missed opportunities](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/product_recommendations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
|
|
337
|
+
| [Budget Rules Recommendation](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/budget_rules_recommendations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
|
|
338
|
+
| [Campaigns](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/campaignsv3.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
|
|
339
|
+
| [Ad Groups](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/ad_groups_v3.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
|
|
340
|
+
| [Consolidated Recommendations](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/campaigns_consolidated_recommendations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
|
|
341
|
+
| [Campaign Negative Keywords](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/campaign_negative_keywords_v3.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
|
|
342
|
+
| [Product Recommendations](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/budget_recommendations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
|
|
343
|
+
| [Budget Usage](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/campaign_budget_usage.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
|
|
344
|
+
| [Reports](https://python-amazon-ad-api.readthedocs.io/en/latest/api/reports.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/offline-report-prod-3p) |
|
|
345
|
+
|
|
346
|
+
### [Modules Available Sponsored Brands 3.0](https://python-amazon-ad-api.readthedocs.io/en/latest/sb_v3.html)
|
|
347
|
+
|
|
348
|
+
> Campaigns and Ad Groups are deprecated in v3: Amazon answers `403 Endpoint has been deprecated` and points to the v4 API. Use the 4.0 section below for those two.
|
|
349
|
+
|
|
350
|
+
| Module | Vendor contract | Vendor docs |
|
|
351
|
+
|---|---|---|
|
|
352
|
+
| [Campaigns (deprecated)](https://python-amazon-ad-api.readthedocs.io/en/latest/sb/campaigns.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-brands_3-0_openapi.yaml) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-brands/3-0/openapi) |
|
|
353
|
+
| [Ad Groups (deprecated)](https://python-amazon-ad-api.readthedocs.io/en/latest/sb/ad_groups.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-brands_3-0_openapi.yaml) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-brands/3-0/openapi) |
|
|
354
|
+
| [Keywords](https://python-amazon-ad-api.readthedocs.io/en/latest/sb/keywords.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-brands_3-0_openapi.yaml) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-brands/3-0/openapi) |
|
|
355
|
+
| [Negative Keywords](https://python-amazon-ad-api.readthedocs.io/en/latest/sb/negative_keywords.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-brands_3-0_openapi.yaml) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-brands/3-0/openapi) |
|
|
356
|
+
| [Keywords Recommendations](https://python-amazon-ad-api.readthedocs.io/en/latest/sb/keywords_recommendations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-brands_3-0_openapi.yaml) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-brands/3-0/openapi) |
|
|
357
|
+
| [Product Targeting](https://python-amazon-ad-api.readthedocs.io/en/latest/sb/product_targeting.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-brands_3-0_openapi.yaml) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-brands/3-0/openapi) |
|
|
358
|
+
| [Negative Product Targeting](https://python-amazon-ad-api.readthedocs.io/en/latest/sb/negative_product_targeting.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-brands_3-0_openapi.yaml) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-brands/3-0/openapi) |
|
|
359
|
+
| [Targeting Recommendations](https://python-amazon-ad-api.readthedocs.io/en/latest/sb/targeting_recommendations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-brands_3-0_openapi.yaml) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-brands/3-0/openapi) |
|
|
360
|
+
| [Bid Recommendations](https://python-amazon-ad-api.readthedocs.io/en/latest/sb/bid_recommendations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-brands_3-0_openapi.yaml) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-brands/3-0/openapi) |
|
|
361
|
+
| [Benchmarks](https://python-amazon-ad-api.readthedocs.io/en/latest/sb/benchmarks.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-brands_3-0_openapi.yaml) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-brands/3-0/openapi) |
|
|
362
|
+
| [Stores](https://python-amazon-ad-api.readthedocs.io/en/latest/sb/stores.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-brands_3-0_openapi.yaml) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-brands/3-0/openapi) |
|
|
363
|
+
| [Landing Page Asins](https://python-amazon-ad-api.readthedocs.io/en/latest/sb/landing_page_asins.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-brands_3-0_openapi.yaml) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-brands/3-0/openapi) |
|
|
364
|
+
| [Media](https://python-amazon-ad-api.readthedocs.io/en/latest/sb/media.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-brands_3-0_openapi.yaml) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-brands/3-0/openapi) |
|
|
365
|
+
| [Brands](https://python-amazon-ad-api.readthedocs.io/en/latest/sb/brands.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-brands_3-0_openapi.yaml) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-brands/3-0/openapi) |
|
|
366
|
+
| [Themes](https://python-amazon-ad-api.readthedocs.io/en/latest/sb/themes.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-brands_3-0_openapi.yaml) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-brands/3-0/openapi) |
|
|
367
|
+
| [Reports](https://python-amazon-ad-api.readthedocs.io/en/latest/sb/reports.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-brands_3-0_openapi.yaml) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-brands/3-0/openapi) |
|
|
368
|
+
|
|
369
|
+
### [Modules Available Sponsored Brands 4.0](https://python-amazon-ad-api.readthedocs.io/en/latest/sb_v4.html)
|
|
370
|
+
|
|
371
|
+
> The 4.0 contract is fully covered: every operation is implemented except the campaign moderation route, which the service answers with a router `404`, and the report download, which resolves through the shared `_download` helper.
|
|
372
|
+
|
|
373
|
+
| Module | Vendor contract | Vendor docs |
|
|
374
|
+
|---|---|---|
|
|
375
|
+
| [Campaigns](https://python-amazon-ad-api.readthedocs.io/en/latest/sb/campaigns_v4.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-brands_4-0_openapi.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-brands/3-0/openapi/prod) |
|
|
376
|
+
| [Ad Groups](https://python-amazon-ad-api.readthedocs.io/en/latest/sb/ad_groups_v4.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-brands_4-0_openapi.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-brands/3-0/openapi/prod) |
|
|
377
|
+
| [Ads](https://python-amazon-ad-api.readthedocs.io/en/latest/sb/ads_v4.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-brands_4-0_openapi.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-brands/3-0/openapi/prod) |
|
|
378
|
+
| [Ad Creatives](https://python-amazon-ad-api.readthedocs.io/en/latest/sb/ad_creatives_v4.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-brands_4-0_openapi.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-brands/3-0/openapi/prod) |
|
|
379
|
+
| [Forecast](https://python-amazon-ad-api.readthedocs.io/en/latest/sb/forecast.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-brands_4-0_openapi.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-brands/3-0/openapi/prod) |
|
|
380
|
+
| [Recommendations](https://python-amazon-ad-api.readthedocs.io/en/latest/sb/recommendations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-brands_4-0_openapi.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-brands/3-0/openapi/prod) |
|
|
381
|
+
| [Budget Rules](https://python-amazon-ad-api.readthedocs.io/en/latest/sb/budget_rules.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-brands_4-0_openapi.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-brands/3-0/openapi/prod) |
|
|
382
|
+
| [Optimization Rules](https://python-amazon-ad-api.readthedocs.io/en/latest/sb/optimization_rules.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-brands_4-0_openapi.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-brands/3-0/openapi/prod) |
|
|
383
|
+
| [Targeting Categories](https://python-amazon-ad-api.readthedocs.io/en/latest/sb/targeting_categories.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-brands_4-0_openapi.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-brands/3-0/openapi/prod) |
|
|
384
|
+
| [Migration](https://python-amazon-ad-api.readthedocs.io/en/latest/sb/migration.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-brands_4-0_openapi.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-brands/3-0/openapi/prod) |
|
|
385
|
+
|
|
386
|
+
> Most 4.0 routes take a versioned media type and the service routes on it. With `application/json` they answer `404 Could not find resource`, which reads like a missing route but is only the wrong media type. This affects forecasts, budget recommendations, optimization rules, migrations, insights, negative brand recommendations and the collection creatives.
|
|
387
|
+
|
|
388
|
+
### [Modules Available Sponsored Display](https://python-amazon-ad-api.readthedocs.io/en/latest/sd.html)
|
|
389
|
+
|
|
390
|
+
| Module | Vendor contract | Vendor docs |
|
|
391
|
+
|---|---|---|
|
|
392
|
+
| [Campaigns](https://python-amazon-ad-api.readthedocs.io/en/latest/sd/campaigns.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-display_3-0_openapi.yaml) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-display/3-0/openapi) |
|
|
393
|
+
| [Ad Groups](https://python-amazon-ad-api.readthedocs.io/en/latest/sd/ad_groups.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-display_3-0_openapi.yaml) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-display/3-0/openapi) |
|
|
394
|
+
| [Reports](https://python-amazon-ad-api.readthedocs.io/en/latest/sd/reports.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-display_3-0_openapi.yaml) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-display/3-0/openapi) |
|
|
395
|
+
| [Product Ads](https://python-amazon-ad-api.readthedocs.io/en/latest/sd/product_ads.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-display_3-0_openapi.yaml) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-display/3-0/openapi) |
|
|
396
|
+
| [Targets](https://python-amazon-ad-api.readthedocs.io/en/latest/sd/product_targeting.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-display_3-0_openapi.yaml) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-display/3-0/openapi) |
|
|
397
|
+
| [Negative Targets](https://python-amazon-ad-api.readthedocs.io/en/latest/sd/negative_product_targeting.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-display_3-0_openapi.yaml) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-display/3-0/openapi) |
|
|
398
|
+
| [Targets Recommendations](https://python-amazon-ad-api.readthedocs.io/en/latest/sd/targeting_recommendations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-display_3-0_openapi.yaml) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-display/3-0/openapi) |
|
|
399
|
+
| [Bid Recommendations](https://python-amazon-ad-api.readthedocs.io/en/latest/sd/bid_recommendations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-display_3-0_openapi.yaml) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-display/3-0/openapi) |
|
|
400
|
+
| [Creatives](https://python-amazon-ad-api.readthedocs.io/en/latest/sd/creatives.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-display_3-0_openapi.yaml) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-display/3-0/openapi) |
|
|
401
|
+
| [Brand Safety List](https://python-amazon-ad-api.readthedocs.io/en/latest/sd/brand_safety.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-display_3-0_openapi.yaml) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-display/3-0/openapi) |
|
|
402
|
+
| [Budget Rules](https://python-amazon-ad-api.readthedocs.io/en/latest/sd/budget_rules.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-display_3-0_openapi.yaml) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-display/3-0/openapi) |
|
|
403
|
+
| [Campaigns Budget Usage](https://python-amazon-ad-api.readthedocs.io/en/latest/sd/campaign_budget_usage.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-display_3-0_openapi.yaml) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-display/3-0/openapi) |
|
|
404
|
+
| [Forecasts](https://python-amazon-ad-api.readthedocs.io/en/latest/sd/forecast.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-display_3-0_openapi.yaml) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-display/3-0/openapi) |
|
|
405
|
+
| [Recommendations](https://python-amazon-ad-api.readthedocs.io/en/latest/sd/recommendations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/sponsored-display_3-0_openapi.yaml) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-display/3-0/openapi) |
|
|
406
|
+
|
|
407
|
+
### Amazon Ads API v1 - basic example
|
|
408
|
+
|
|
409
|
+
Both `v1` and `ads_api_v1` name the same namespace, so pick whichever reads
|
|
410
|
+
clearer: `from ad_api.api import v1` is shorter, and `ads_api_v1` makes it
|
|
411
|
+
obvious at the call site that the v1 API is being used.
|
|
412
|
+
|
|
413
|
+
```python
|
|
414
|
+
from ad_api.api import v1
|
|
415
|
+
|
|
416
|
+
result = v1.Campaigns(credentials=credentials, debug=True).query_campaigns(
|
|
417
|
+
body={
|
|
418
|
+
"adProductFilter": {"include": ["SPONSORED_PRODUCTS"]},
|
|
419
|
+
"stateFilter": {"include": ["ENABLED"]},
|
|
420
|
+
"maxResults": 100,
|
|
421
|
+
}
|
|
422
|
+
)
|
|
423
|
+
|
|
424
|
+
campaigns = result.payload.get("campaigns")
|
|
425
|
+
next_token = result.payload.get("nextToken")
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
### Simple Example Usage Campaigns with Credentials (v3, legacy)
|
|
429
|
+
|
|
430
|
+
> This example uses `CampaignsV3.list_campaigns`, which is deprecated. See the v1 `query_campaigns` example above.
|
|
431
|
+
|
|
432
|
+
```python
|
|
433
|
+
import logging
|
|
434
|
+
from ad_api.base import AdvertisingApiException
|
|
435
|
+
from ad_api.api import sponsored_products
|
|
436
|
+
|
|
437
|
+
logging.basicConfig(
|
|
438
|
+
level=logging.DEBUG,
|
|
439
|
+
format="%(asctime)s:%(levelname)s:%(message)s"
|
|
440
|
+
)
|
|
441
|
+
|
|
442
|
+
def sp_list_campaigns_v3(info: dict = None):
|
|
443
|
+
|
|
444
|
+
credentials = dict(
|
|
445
|
+
refresh_token='your-refresh_token',
|
|
446
|
+
client_id='your-client_id',
|
|
447
|
+
client_secret='your-client_secret',
|
|
448
|
+
profile_id='your-profile_id',
|
|
449
|
+
)
|
|
450
|
+
|
|
451
|
+
try:
|
|
452
|
+
result = sponsored_products.CampaignsV3(credentials=credentials, debug=True).list_campaigns(
|
|
453
|
+
body=info
|
|
454
|
+
)
|
|
455
|
+
payload = result.payload
|
|
456
|
+
return payload
|
|
457
|
+
except AdvertisingApiException as error:
|
|
458
|
+
logging.error(error)
|
|
459
|
+
logging.error(error.code)
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
state_filter = \
|
|
463
|
+
{
|
|
464
|
+
"stateFilter":
|
|
465
|
+
{
|
|
466
|
+
"include": [
|
|
467
|
+
"ENABLED"
|
|
468
|
+
]
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
enabled_campaigns = sp_list_campaigns_v3(state_filter).get("campaigns")
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
for campaign in enabled_campaigns:
|
|
476
|
+
logging.info(campaign)
|
|
477
|
+
|
|
478
|
+
logging.info(len(campaigns))
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
### API NOTICE
|
|
485
|
+
|
|
486
|
+
This API is based on the [API Client](https://github.com/saleweaver/rapid_rest_client) created by [@saleweaver](https://github.com/saleweaver) but adapted to amazon advertising authentication requeriments
|
|
487
|
+
|
|
488
|
+
### DISCLAIMER
|
|
489
|
+
|
|
490
|
+
We are not affiliated with Amazon but they used our api :)
|
|
491
|
+
|
|
492
|
+
### LICENSE
|
|
493
|
+
|
|
494
|
+

|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
---
|
|
498
|
+
*Last release: v1.5.11*
|