Conferences
Budapest, Hungary
08
July
Budapest, Hungary
08
July
Budapest, Hungary
08
July
Budapest, Hungary
08
July
08
July
Budapest, Hungary
08
July
08
July
Budapest, Hungary
08-10
July
Budapest, Hungary
09
July
09
July
09
July
09
July
09
July
Budapest, Hungary
09
July
09
July
Budapest, Hungary
09
July
Budapest, Hungary
09
July
Будапешт, Венгрия
09-10
July
10
July
14
July
Tbilisi, Georgia.
15
July
15
July
16
July
Limassol, Cyprus
23-24
July
23
July
Limassol, Cyprus
23
July
26
July
27-28
July
30-31
July
Limassol, Cyprus
07
August
Saint Petersburg, Russia
12-13
August
25
August
Mexico City, Mexico
27-01
August -
September
Мехико, Мексика
31
August
Mexico City, Mexico
01-03
September
01
September
Mexico City, Mexico
01-03
September
Mexico City, Mexico
03
September
Cancún, Mexico
07-08
September
Rome, Italy
02-05
November
Rome, Italy
02
November
04
November
05
November
24-25
November
Bangkok, Thailand
30-02
November -
December
Bangkok, Thailand
09-10
December
Ta’ Qali, Malta
03-05
May
Ho Chi Minh City, Vietnam
14
June

Meta launches Ads CLI for managing adverts via command line


Meta has introduced Ads CLI — a command-line interface for working with Meta Ads and Commerce. The tool is designed for developers and AI agents who work with the Meta Marketing API and wish to manage advertising campaigns directly from the terminal, without writing their own code.

According to Meta, the Marketing API remains a powerful tool, but when working with it, developers constantly have to write the same technical code: authorisation, pagination, output formatting, and error handling. The Ads CLI solves this problem by consolidating the Meta Marketing API into a single tool with predictable commands for managing ads.

For example, you can retrieve a list of campaigns via the command line:

meta ads campaign list

Or export campaign statistics for the last 7 days:

meta ads insights get --campaign_id COMPAIGN_ID --date-preset last_7d —-fields conversions,impressions

Ads CLI supports several output formats, including JSON and plain text with tab-separated values. This is necessary for the tool to be used not only manually, but also in automation, scripts, internal tools, and CI/CD pipelines.

What you can do with Ads CLI

Using Ads CLI, you can create, view, update, and delete campaigns, ad sets, ads, and creatives. By default, new objects are created with a PAUSED status, so a campaign will not start immediately until it is manually switched to an active status.

Example of creating a campaign with a daily budget of 50.00 in the advertising account currency:

meta ads campaign create --name "Summer Sale" --objective OUTCOME_SALES --daily-budget 5000

Creating an ad set:

 meta ads adset create CAMPAIGN_ID --name "My Ad Set"

 --optimization-goal LINK_CLICKS --billing-event IMPRESSIONS 
 --bid-amount 500 --targeting-countries US 

Creating a creative with an image and a button:

meta ads creative create --name "Hero Banner"

 --page-id 111222333 --image ./banner.jpg 
 --body "50% off everything!" --title "Shop Now"

 --link-url https://example.com/sale --call-to-action SHOP_NOW 

Creating an ad based on an ad set and creative:

meta ads ad create ADSET_ID --name "Hero Banner Ad" --creative-id CREATIVE_ID 

Once verified, the campaign, ad set, and ad can be set to active status:

 meta ads campaign update CAMPAIGN_ID --status ACTIVE 
 meta ads adset update ADSET_ID --status ACTIVE 
 meta ads ad update AD_ID --status ACTIVE

Analytics and statistics

The Ads CLI also allows you to view advertising metrics: spend, impressions, CTR, ROAS, and other metrics. Queries can use date ranges, breakdowns by age, gender, platform, and various levels of aggregation.

Example of  campaign statistics export for the last 7 days:

meta ads insights get --campaign_id COMPAIGN_ID --fields=impressions,conversions --date-preset last_7d

This is useful for teams who want to generate reports automatically, without manually exporting data from Ads Manager.

Catalogues and products

The Ads CLI allows you to manage not only advertising campaigns but also catalogues. The tool supports the creation and management of catalogues, products, and product sets.

Creating a catalogue:

meta ads catalog create --name "My Catalog"

Adding a product to the catalogue:

meta ads product-item create --catalog-id 123456 
 --retailer-id sku_a --name "Blue Shirt"

 --url https://example.com/blue_shirt --price "999" --currency "USD"

 --image-url https://example.com/blue_shirt.jpg

View product sets:

meta ads product-set list --catalog-id 123456

Pixels and datasets

A separate section covers datasets. Using the Ads CLI, you can create pixels for conversion tracking, link them to advertising accounts and product catalogues, and configure the connection for conversion tracking.

Creating a dataset:

meta ads dataset create --name "Website Pixel"

Connecting the dataset to an advertising account and catalogue:

meta ads dataset connect 111222 --ad-account-id 333444 --catalog-id 555666

Automation and AI agents

Meta specifically states that meta ads are designed for autonomous execution in CI/CD pipelines, interactive use in the terminal, and use in scripts.

Three output formats are provided for this purpose:

  • table — human-readable output;
  • json — a format for processing via jq and other tools;
  • plain — simple tab-separated values, which are convenient to pass to sort, awk, cut, and other commands.

There are also the —no-input and —force parameters, which disable all interactive requests.

Standard exit codes are used for error handling: for example, 0 for successful execution, 3 for an authorisation error, and 4 for an API error. Environment variables are also supported for tokens, secrets, and advertising account IDs, so as not to store sensitive data in the command history and version control system.

Essentially, Ads CLI provides an official way to work with the Meta Marketing API via commands: creating campaigns, ad sets, ads, and creatives, working with catalogues, gathering statistics, and automating routines without manual work in the interface.

  • Ads CLI requires Python 3.12+ and pip/uv.

Like it? Share with your friends!
0 Comments
Affiliate - Our assessment
Verticals
Min. sum
Site
It’s an affiliate program of the eponymous online casino. A direct advertiser as of 2017. They work by RevShare (up to 50%) partnership strategy.
1,000 rubles/$20/€20 pay
фото
фото
фото
фото
фото
фото
фото
фото
фото
фото
фото
фото
фото
фото
Affiliate program in the gambling vertical, a direct advertiser. It accepts traffic from CIS. It cooperates on the CPA, RevShare, Hybrid, Fix, and Flat models.
€100 pay
фото
фото
фото
фото
фото
фото
фото
It’s our affiliate program with gambling and betting offers. We are currently in beta but we accept traffic.
$20 pay
фото
860
Go to offers
SpinBetter Partners is an affiliate program in the Gambling and Betting verticals and a direct advertiser of the SpinBetter project. The company has been operating since 2019. It co-operates on CPA, Hybrid, RevShare, Fix, and Fix + RevShare models. SpinBet accepts SEO, ASO, PPC, UAC, Facebook, social, stream, email, messaging apps, and other types of traffic, except motive, schemes, and fraud.
50 pay
фото
фото
фото
фото
фото
Traffic Cake is a direct advertiser offering iGaming vertical offers. Exclusive offers include VOX and Winnita. GEOs: Tier-1 and Tier-2. An authorized partner of well-known brands such as Vulkan Vegas, IceCasino, and Verde Casino. Works on CPA (up to €600), RevShare, and Hybrid models. Affiliates can earn up to 60% RevShare. Payments are made weekly with no delays. All major traffic sources are accepted.
€100 pay
фото
фото
Direct advertiser of popular European casino and sportsbook brands V.Vegas, ICE Casino, VERDE Casino, FS Casino, Fiery Play, Slotoro and Hit’N’Spin. Founded in 2016, they operate on CPA, RevShare, and Hybrid models, accepting traffic from over 35 countries. They provide all the necessary tools for success.
€100 pay
фото
фото
фото
фото
фото