New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

aads-cli

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aads-cli

CLI tool for analyzing Amazon Ads Sponsored Products campaign performance

latest
Source
npmnpm
Version
1.4.1
Version published
Maintainers
1
Created
Source

aads

MIT License Node.js

CLI tool for analyzing Amazon Ads Sponsored Products campaign performance.

Reads Amazon Ads bulk sheet exports (Excel/CSV) and generates actionable optimization reports — CPC bid recommendations, auto-to-manual promotion candidates, negative keyword suggestions, and SEO ranking integration.

Features

CommandDescription
analyzeAggregate KPIs (CTR, CVR, ACOS, ROAS) from bulk sheet data
summaryCampaign structure overview with layer-level aggregation
cpc-reportCPC bid optimization report with optional SEO ranking integration
promotion-reportAuto-to-Manual promotion candidates + negative keyword suggestions
seo-reportSEO organic ranking vs ad keyword integrated report
generateGenerate Amazon Ads bulk sheet from analysis results
apply-actionsApply action items (negative KW, keyword, placement) from JSON config
create-campaignGenerate campaign structure bulk sheet from template config
measure-logTrack advertising measures with timestamped notes
measure-compareCompare before/after KPI snapshots for a measure

Installation

npm install -g aads-cli

Or use without installing:

npx aads --help

Quick Start

# Analyze a bulk sheet export
aads analyze --input "bulk-*.xlsx"

# Generate campaign structure summary
aads summary --input "bulk-*.xlsx"

# Generate CPC optimization report
aads cpc-report --input "bulk-*.xlsx" --output cpc-report.xlsx

# Generate promotion report
aads promotion-report --input "bulk-*.xlsx" --output promotion.xlsx

# Generate SEO-integrated report
aads seo-report --input "bulk-*.xlsx" --ranking-db ranking.db

# Generate bulk sheet for uploading to Amazon Ads
aads generate --input "bulk-*.xlsx" --output bulk-update.xlsx

# Generate only specific blocks (e.g., CPC + Negative keywords)
aads generate --input "bulk-*.xlsx" --output bulk-update.xlsx --blocks 2,4

# Apply action items from JSON config
aads apply-actions --config actions.json --output actions.xlsx

# Create new campaign structure from template
aads create-campaign --config campaign.json --output campaign.xlsx

# Track advertising measures
aads measure-log --add --pattern custom --name "Negative KW cleanup" --date 2026-03-08
aads measure-log --list

# Add notes to a measure
aads measure-log --id <entry-id> --note "ACOS improved 15% → 10%"

# Compare before/after KPIs
aads measure-compare --pattern custom --before "before-*.xlsx" --after "after-*.xlsx"

Commands

analyze

Aggregates campaign KPIs from Amazon Ads bulk sheet exports.

aads analyze --input <pattern> [--layer-policy <file>]
OptionDescription
--input <pattern>Input Excel/CSV path or wildcard pattern (required)
--layer-policy <file>Campaign layer policy JSON path

summary

Displays campaign structure with ad group details and layer classification.

aads summary --input <pattern> [--layer-policy <file>]

cpc-report

Generates CPC bid optimization recommendations as an Excel report.

aads cpc-report --input <pattern> --output <file> [--ranking-db <path>]
OptionDescription
--input <pattern>Input Excel/CSV path or wildcard pattern (required)
--output <file>Output xlsx path (required)
--ranking-db <path>A_rank SQLite DB path for SEO-based CPC adjustment

promotion-report

Identifies auto campaign search terms ready for manual campaign promotion and suggests negative keywords for wasteful terms.

aads promotion-report --input <pattern> --output <file>

seo-report

Cross-references ad keywords with organic SEO ranking data to identify opportunities for bid reduction where organic rankings are strong.

aads seo-report --input <pattern> --ranking-db <path> [--output <file>] [--format <type>]
OptionDescription
--input <pattern>Input Excel/CSV path or wildcard pattern (required)
--ranking-db <path>A_rank SQLite DB path (required)
--output <file>Output file path
--format <type>console | json | xlsx (default: console)

generate

Generates an Amazon Ads bulk sheet (V2.10 format, 27 columns) from analysis results. Runs the full analyze pipeline, then applies selected optimization blocks to produce rows ready for upload.

aads generate --input <pattern> --output <file> [--blocks <list>]
OptionDescription
--input <pattern>Input Excel/CSV path or wildcard pattern (required)
--output <file>Output xlsx path (required)
--blocks <list>Comma-separated block numbers to run (default: all)

Available Blocks:

BlockNameDescription
1BudgetCampaign daily budget adjustments
2CPCKeyword bid updates based on ACOS optimization
3PromotionAuto-to-Manual keyword promotion (create in manual campaign)
3.5Negative SyncAdd negative keywords in auto campaign for promoted terms
4NegativeNegative keywords for wasteful search terms
5PlacementPlacement bid modifier adjustments (Top of Search / Product Pages)

apply-actions

Applies action items from a JSON config to generate a bulk sheet for batch operations — negative keywords, keyword additions, product targeting, and placement adjustments.

aads apply-actions --config <file> --output <file>
OptionDescription
--config <file>Action items JSON config path (required)
--output <file>Output xlsx path (required)

Supported action types:

TypeDescription
negative_keywordAdd negative keyword (ad group or campaign level)
negative_product_targetingAdd negative product targeting (ASIN)
keywordAdd keyword with bid
placementAdjust placement bid percentage

See data/samples/action-items-sample.json for config format.

create-campaign

Generates campaign structure from a template config. Supports new campaign creation and existing campaign updates.

aads create-campaign --config <file> --output <file> [--mode <create|update>] [--input <file>]
OptionDescription
--config <file>Campaign template JSON config path (required)
--output <file>Output xlsx path (required)
--mode <mode>create (default) or update
--input <file>SC bulk sheet for update mode ID resolution

Campaign types: auto, phrase, broad, asin, manual

Campaign and ad group names are customizable via naming in the config:

{
  "naming": {
    "campaignTemplate": "{brand}_{typeLabel}_{suffix}",
    "adGroupTemplate": "{code}_{descriptor}"
  }
}

See data/samples/campaign-template-sample.json for full config format.

measure-log

Track advertising measures (campaign changes, optimizations) as a log with timestamped notes. Data is stored in ./data/measure-log.json in your working directory.

aads measure-log --list [--format <type>] [--status <status>] [--pattern <id>]
aads measure-log --add --pattern <id> --name <text> --date <yyyy-mm-dd> [--note <text>]
aads measure-log --remove <id>
aads measure-log --id <entry-id> --note <text>
OptionDescription
--listList all entries
--addAdd a new entry
--remove <id>Remove an entry
--id <entry-id>Target entry ID (for --note)
--note <text>Add a note (standalone with --id, or initial note with --add)
--pattern <id>Measure pattern ID
--name <text>Measure name
--date <yyyy-mm-dd>Measure execution date
--status <status>pending | completed
--format <type>console | json | markdown (default: console)

measure-compare

Compare before/after KPI snapshots for a measure to evaluate its effectiveness.

aads measure-compare --pattern <id> --before <pattern> --after <pattern> [options]
OptionDescription
--pattern <id>Measure pattern ID
--log-id <id>Resolve pattern and metadata from measure-log entry
--before <pattern>Before input file path or wildcard (required)
--after <pattern>After input file path or wildcard (required)
--campaigns <list>Comma-separated campaign IDs or names to filter
--asins <list>Comma-separated ASINs to filter
--name <text>Measure name
--description <text>Measure description
--with-llmRun LLM analysis (requires API key)

Configuration

Configuration is done via environment variables (or a .env file):

VariableDefaultDescription
TARGET_ACOS0.25Target ACOS for CPC optimization
MIN_CLICKS_CPC5Minimum clicks for CPC recommendation
MIN_CLICKS_PROMOTION5Minimum clicks for promotion candidate
MIN_CVR_PROMOTION0.03Minimum CVR for promotion candidate
NEGATIVE_ACOS_THRESHOLD0.4ACOS threshold for negative keyword suggestion
SEO_ENABLEDtrueEnable SEO ranking integration
SEO_CPC_CEILING0CPC ceiling (0 = auto)
RANKING_DB_PATH-Default path to A_rank SQLite DB
LOG_LEVELinfoLog level (debug | info)

See .env.example for a complete template.

SEO Integration

The cpc-report and seo-report commands can integrate with SEO ranking data stored in a SQLite database.

When an ad keyword has strong organic ranking (positions 1-4), the tool automatically reduces the recommended CPC bid:

Organic PositionSEO FactorBid Reduction
#10.50-50%
#20.60-40%
#30.70-30%
#40.80-20%
#5+1.00No change

Getting Started with SEO Data

A sample database with dummy data is included for testing:

aads seo-report --input bulk-sheet.xlsx --ranking-db data/sample-ranking.db

To use your own data, create a SQLite database matching the database schema. You can populate it from any source — a custom scraper, third-party API, or manual entry.

Coming soon: A companion Chrome extension for automatically collecting Amazon search ranking data will be released as a separate open-source project.

Campaign Layer Policy

The analyze and summary commands support campaign layer classification using a JSON policy file:

aads summary --input "bulk-*.xlsx" --layer-policy data/campaign-layer-policy.json

See data/campaign-layer-policy.json for the default policy structure.

Contributing

See CONTRIBUTING.md for development setup and contribution guidelines.

License

MIT

Keywords

amazon-ads

FAQs

Package last updated on 17 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts