Skip to content

gbpadovan/amz_ads_py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AMAZON ADS PY

Introduction:

  • This module generates and downloads reports on advertising campaigns on the Amazon Platform.
  • Utilizes a custom solution to interact with Amazon REST API V3.

Configure .env file:

  • IMPORTANT: YOU MUST FOLLOW THE ONBOARDING STEPS BEFORE YOU CAN USE THIS PYTHON APP!
  • Set RETURN_URL, CLIENT_ID, CLIENT_SECRET, PROFILE_ID & REFRESH_TOKEN in the .env file,
  • (Optional) - for future implementation: MKTPLACE_ID, MKTPLACE_STR_ID,
  • For any other additional marketplace, follow the same pattern as 'USA' below
# This is a model for the .env file
# OAuth2 Credentials:
export RETURN_URL="https://www.yoururl.com/"
export CLIENT_ID="amzn1.application-oa2-client.XXXXXXXXXXXX"
export CLIENT_SECRET="XXXXXXXXXX"

# Advertising credentials:
# credentials usa account
export USA_PROFILE_ID=123456789
export USA_ACCOUNT_ID="A123456789"
export USA_MKTPLACE_ID="ENTITY123456789"
export USA_MKTPLACE_STR_ID="XXXXXXXXXXXX"
export USA_REFRESH_TOKEN="Atzr|XXXXX123456789XXXXXX"

# Follow the same pattern for accounts in other markets

How to use:

  • Adjust desired dates and markets in collect_reports.py.
    • avaiable markets: 'usa','uk','ca' and 'au'.
  • Run collect_reports.py.
$ python collect_reports.py

Reports Avaiable:

spTargeting

  • Available timeUnits: 'SUMMARY' and 'DAILY'.
  • Available groupBy: "campaign", "adGroup", and ["campaign","adGroup"].
  • Monthly: Covers from the first to the last day of the month.

spCampaigns

  • Available timeUnits: 'SUMMARY' and 'DAILY'.
  • Monthly: Covers from the first to the last day of the month.

NOTE:

  • Additional reports supported by Amazon REST API will be added in future versions.
  • Reports downloaded and saved at the reports/ folder.

Project Structure:

📁 amz_ads_api
 |_ 📁 amz_ads_api
    |_ 📄 __init__.py
    |_ 📄 amz_credentials.py
    |_ 📄 amzapi.py
    |_ 📄 authorization.py
    |_ 📄 connect.py
    |_ 📄 metrics.py
    |_ 📄 reports.py
    |_ 📄 root.py
    |_ 📄 utils.py
 |_ 📁 examples
 |_ 📁 html
 |_ 📁 metadata
 |_ 📁 reports
 |_ 📄 MANIFEST.in
 |_ 📄 README.md
 |_ 📄 requirements.txt
 |_ 📄 setup.py
 |_ 📄 collect_reports.py

More information:

Amazon REST Api V3

About

Generates and downloads reports on advertising campaigns using Amazon REST API V3.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages