CLI commands

Ad Library commands

The 1 koast CLI command for the Ad Library operations.

Every command is one API operation, named by its operationId. Global flags such as --output and --api-url work on all of them, see CLI commands.

search-ad-library

Search the Ad Library. GET /v1/brands/{brandId}/ad-library/ads, API reference.

koast search-ad-library --brand <brand> --query <query> [flags]
FlagTypeRequiredDescription
--brandintegerYesThe brand the request acts on. Every brand-scoped resource lives under its brand.
--querystringYesAn advertiser's website domain, such as "triplewhale.com", to get that advertiser's own ads; a name also brings other advertisers' ads. Or keywords for an offer. With pageId, * lists every ad of that page. At most 200 characters.
--page-idstringNoOne Facebook page id, from an earlier result, to see only that advertiser's ads.
--countrystringNoTwo-letter country the ads ran in. Defaults to US.
--active-onlybooleanNoOnly ads running now. Defaults to true; an ad that has run for months is usually a winner.
--limitintegerNoAds per page, 1-24. Defaults to 12. Minimum 1, maximum 24.
--cursorstringNonextCursor from the previous page. At most 500 characters.
--for-roundbooleanNotrue when you search for references for a round of ads you are making: the user does not see the results. Omit it when the user asked to see other advertisers' ads.

Required scope: read. Paged. --all follows nextCursor to the end and prints one JSON line per item.

Example:

koast search-ad-library --brand 123 --query QUERY

On this page