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]| Flag | Type | Required | Description |
|---|---|---|---|
--brand | integer | Yes | The brand the request acts on. Every brand-scoped resource lives under its brand. |
--query | string | Yes | An 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-id | string | No | One Facebook page id, from an earlier result, to see only that advertiser's ads. |
--country | string | No | Two-letter country the ads ran in. Defaults to US. |
--active-only | boolean | No | Only ads running now. Defaults to true; an ad that has run for months is usually a winner. |
--limit | integer | No | Ads per page, 1-24. Defaults to 12. Minimum 1, maximum 24. |
--cursor | string | No | nextCursor from the previous page. At most 500 characters. |
--for-round | boolean | No | true 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