Skip to main content
adjar import is the starting point for every Adjar project. It connects to your live ad account via the API and writes a complete snapshot of your campaigns, ad groups, creatives, and conversions — plus keywords and assets on Google Ads — to a TOML config. Once imported, your account lives in plain text — human-readable, diffable, and ready to be managed by you or an AI agent.

Syntax

With no -o, the config is written to stdout.

Flags

string
required
The account ID to import.
  • Google Ads — the numeric customer ID shown top-right in the Google Ads UI, with no hyphens (e.g. 4821937650, not 482-193-7650).
  • OpenAI Ads — the adacct_… account ID. Since the API key already scopes to one account, this is mainly a label; Adjar reads the real ID from the account endpoint.
string
default:"google"
The ad platform to import from — google or openai.
string
Path to the TOML file to write (e.g., config/google.toml). The parent directory is created automatically if it does not exist. Omit to print the config to stdout instead.
string
Path to the platform credentials JSON file (google.json or openai.json). Alternatively set ADJAR_CREDENTIALS. See Authentication.

Examples

Output

adjar import writes a single self-contained TOML file containing the account’s metadata and its full campaign tree — every campaign, ad group, ad, and account-level conversion (plus keywords and assets on Google Ads). For a large account you can split this into multiple files with a top-level imports directive after the fact — see the config reference for Google Ads or OpenAI Ads.

After import: commit to version control

Once the import completes, commit the entire config directory to your repository. This snapshot becomes the baseline that adjar plan diffs against:
From this point forward, all changes flow through the planapply cycle rather than through import.

Re-running import

Re-run adjar import to refresh your local config from the live account state at any time — for example, after making changes directly in the Google Ads UI, or to onboard a new team member against the latest live state:
Re-running adjar import overwrites the output file with the live account state. Commit or stash any uncommitted local changes first — they will be lost.

Next steps

After importing, edit your TOML files and use adjar plan to preview what will change before pushing anything back to the platform.