🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

Ads Optimizer Skill

by @zero2ai-hub

Amazon Ads API v3 skill for OpenClaw agents. List profiles, manage Sponsored Products campaigns, view budgets and performance. Works with any advertiser acco...

Versionv1.0.1
Downloads1,082
TERMINAL
clawhub install skill-ads-optimizer

πŸ“– About This Skill


name: skill-amazon-ads description: "Amazon Ads API v3 skill for OpenClaw agents. List profiles, manage Sponsored Products campaigns, view budgets and performance. Works with any advertiser account." metadata: openclaw: requires: { bins: ["node"] }

Amazon Ads API Skill

Manage Amazon Sponsored Products campaigns from your OpenClaw agent β€” list profiles, view campaigns, check budgets, and pull performance data.


Setup

1. Create credentials file

{
  "lwaClientId": "amzn1.application-oa2-client.YOUR_CLIENT_ID",
  "lwaClientSecret": "YOUR_CLIENT_SECRET",
  "refreshToken": "Atzr|YOUR_REFRESH_TOKEN",
  "profileId": "YOUR_ADS_PROFILE_ID",
  "region": "eu"
}
Save as amazon-ads-api.json. Set AMAZON_ADS_PATH env var to point to it (default: ./amazon-ads-api.json).

> Regions & endpoints: > - na β†’ advertising-api.amazon.com > - eu β†’ advertising-api-eu.amazon.com > - fe β†’ advertising-api-fe.amazon.com

2. Get your Profile ID

node scripts/ads.js --profiles
Copy the profileId for your brand/marketplace and add it to the credentials file.


Scripts

ads.js β€” Campaigns & Summary

node scripts/ads.js --profiles                # list all advertiser profiles
node scripts/ads.js --campaigns               # list all SP campaigns
node scripts/ads.js --summary                 # active campaigns + budgets summary
node scripts/ads.js --campaigns --out c.json  # save to file


Credentials Schema

| Field | Description | |-------|-------------| | lwaClientId | Ads app client ID (separate from SP-API) | | lwaClientSecret | Ads app client secret | | refreshToken | LWA refresh token | | profileId | Advertising profile ID (from --profiles) | | region | na, eu, or fe |


Notes

  • Ads API uses a separate LWA app from SP-API β€” different client ID/secret
  • Profile ID is required for all campaign operations
  • Tokens are fetched fresh per request (no caching overhead for CLI use)
  • For production/high-frequency use, add token caching
  • Related

  • skill-amazon-spapi β€” Orders, inventory & listings
  • βš™οΈ Configuration

    1. Create credentials file

    {
      "lwaClientId": "amzn1.application-oa2-client.YOUR_CLIENT_ID",
      "lwaClientSecret": "YOUR_CLIENT_SECRET",
      "refreshToken": "Atzr|YOUR_REFRESH_TOKEN",
      "profileId": "YOUR_ADS_PROFILE_ID",
      "region": "eu"
    }
    
    Save as amazon-ads-api.json. Set AMAZON_ADS_PATH env var to point to it (default: ./amazon-ads-api.json).

    > Regions & endpoints: > - na β†’ advertising-api.amazon.com > - eu β†’ advertising-api-eu.amazon.com > - fe β†’ advertising-api-fe.amazon.com

    2. Get your Profile ID

    node scripts/ads.js --profiles
    
    Copy the profileId for your brand/marketplace and add it to the credentials file.


    πŸ“‹ Tips & Best Practices

  • Ads API uses a separate LWA app from SP-API β€” different client ID/secret
  • Profile ID is required for all campaign operations
  • Tokens are fetched fresh per request (no caching overhead for CLI use)
  • For production/high-frequency use, add token caching