Command Line

Tap CLI

Build, test, and manage your Tap integration directly from the terminal.

Installation

npm
npm install -g @tap-co/cli

Authentication

Authenticate using your API key. You can find your key in the Dashboard.

$ tap auth login --key sk_live_****

Alternatively, set the TAP_API_KEY environment variable.

Quick start

Search for radio inventory in New York:

$ tap search --market "New York" --format radio

Generate a media plan with a $50k budget:

$ tap plan --budget 50000 --goal awareness

Create a campaign from a plan:

$ tap plan --budget 25000 --json | tap campaigns create --from-stdin

Commands

tap search

Search available advertising inventory

tap search [flags]

Flags

--marketFilter by geographic market
--formatFilter by media type (radio, tv, podcast, digital)
--budgetMaximum CPM
--jsonOutput as JSON
tap plan

Generate an optimized media plan

tap plan [flags]

Flags

--budgetCampaign budget in USD (required)
--goalCampaign objective (awareness, consideration, conversion)
--marketsTarget markets (comma-separated)
--jsonOutput as JSON
tap creative

Generate and manage ad creatives

tap creative <command>

Subcommands

generateGenerate a new creative asset
specsGet creative specifications for a platform
tap campaigns

Manage advertising campaigns

tap campaigns <command>

Subcommands

listList all campaigns
getGet campaign details
createCreate a new campaign

Configuration

Environment VariableDescription
TAP_API_KEYYour API key
TAP_API_URLAPI base URL (default: https://sdk.tap.co/v1)

JSON output

All commands support --json for machine-readable output.

$ tap search --market NYC --json | jq '.platforms[0]'

Getting help

Use --help with any command for detailed usage information.

$ tap --help
$ tap search --help