list_campaigns
List distinct campaigns for an ad account. Reads from Adlyse’s platform-normalized data table, so the response shape is identical across Google / Meta / TikTok.
Parameters#
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
ad_account_id | string | yes | Ad account id | |
status | string? | no | null | Filter by status: enabled, paused, or removed |
limit | integer | no | 100 | Max campaigns to return; clamped to 500 |
offset | integer | no | 0 | Pagination offset |
Returns#
json
{
"campaigns": [
{
"campaign_id": "1234567890",
"campaign_name": "Brand Search - US",
"platform": "google_ads",
"campaign_status": "enabled",
"campaign_type": "SEARCH"
}
],
"count": 1,
"total": 4,
"offset": 0,
"limit": 100,
"has_more": false,
"source": "adlyse.ads_campaigns@v1"
}| Field | Description |
|---|---|
campaigns[].campaign_id | Platform’s native campaign id; use for all other tools in this server |
campaigns[].platform | google_ads, meta_ads, or tiktok_ads |
campaigns[].campaign_status | enabled, paused, or removed |
total | Distinct campaigns matching filters |
Errors#
error_type | When |
|---|---|
auth_error | Missing / invalid API key |
not_found | Ad account doesn’t belong to your org |
Empty response#
If the account has never been synced, the response has total: 0 and includes a note field explaining that campaign metrics haven’t been synced yet. This is not an error.
Example#
Request:
json
{ "ad_account_id": "ad_acct_abc", "status": "enabled", "limit": 20 }Response:
json
{
"campaigns": [
{ "campaign_id": "c1", "campaign_name": "Brand Search - US", "platform": "google_ads", "campaign_status": "enabled" },
{ "campaign_id": "c2", "campaign_name": "Retargeting - Core", "platform": "meta_ads", "campaign_status": "enabled" }
],
"count": 2,
"total": 2,
"has_more": false,
"source": "adlyse.ads_campaigns@v1"
}See also#
get_performance— aggregated metrics across a date rangelist_ads— drill down from campaigns to adsupdate_campaign_status— pause / resume