---
title: "How to automate daily checks across many ad accounts"
description: "Pull spend, disapprovals and billing status from the Meta, Google Ads and TikTok APIs, then check pages with no API through the BrowserLogin API."
url: https://sapps.co/explore/browserlogin/articles/automate-repeat-ad-account-checks-api
app: "BrowserLogin"
app_url: https://sapps.co/explore/browserlogin
published: 2026-12-02T11:25:32.788Z
updated: 2026-12-02T11:25:32.788Z
tags: ["ad accounts","automation","api","mcp","media buying"]
lang: "en"
---

# How to automate daily checks across many ad accounts

Automate daily ad account checks by pulling spend, ad status and billing fields from each platform's official API on a schedule, and turn on the alerts and scheduled reports the platforms already offer. Keep browser automation for the few pages that have no API, and only where the site's terms allow it.

## Check spend, disapprovals and billing through the official APIs

Each large ad platform exposes the numbers a morning check needs. Calling them from one script replaces logging in to every account by hand.

### Meta Marketing API

The [Insights API](https://developers.facebook.com/docs/marketing-api/insights) returns performance data such as `spend` for an ad account, campaign, ad set or ad, through the `insights` edge on each (for example `/{ad-account-id}/insights`). It needs an app with the `ads_read` permission.

For billing and account health, the [ad account object](https://developers.facebook.com/docs/marketing-api/reference/ad-account) has `account_status` (for example 1 = ACTIVE, 2 = DISABLED, 3 = UNSETTLED), `disable_reason`, `amount_spent`, `spend_cap` and `balance`. For disapprovals, the [ad object](https://developers.facebook.com/docs/marketing-api/reference/adgroup) has an `effective_status` whose values include `DISAPPROVED` and `WITH_ISSUES`.

### Google Ads API

Google Ads reports are queries in the Google Ads Query Language sent to `GoogleAdsService` (`Search` or `SearchStream`), as the [reporting overview](https://developers.google.com/google-ads/api/docs/reporting/overview) explains. Google's own [disapproved ads sample](https://developers.google.com/google-ads/api/samples/get-all-disapproved-ads) filters on the ad's policy summary:

```sql
SELECT
  ad_group_ad.ad.id,
  ad_group_ad.ad.type,
  ad_group_ad.policy_summary.approval_status,
  ad_group_ad.policy_summary.policy_topic_entries
FROM ad_group_ad
WHERE
  campaign.id = {campaign_id}
  AND ad_group_ad.policy_summary.approval_status = DISAPPROVED
```

If you run more than a handful of accounts, a [Google Ads manager account](https://support.google.com/google-ads/answer/6139186?hl=en) lets you "run reports for multiple accounts at a time" and "use alerts to efficiently monitor all of your linked accounts".

### TikTok API for Business

TikTok's [basic reports](https://business-api.tiktok.com/portal/docs/basic-reports/v1.3) are the report type with "the most comprehensive data about your ads, including spend and performance data". Use them for the spend part of the check.

## Use the alerts and scheduled reports you already have

Some checks need no code at all. In Meta Ads Manager, [automated rules](https://www.facebook.com/business/help/1694779440789213) "automatically check your campaigns, ad sets and ads, and then update or notify you of any changes". Google Ads can [schedule a report from any statistics table](https://support.google.com/google-ads/answer/2404176?hl=en): click the download icon, choose **Schedule**, then pick a frequency such as daily or weekly. Set these up first, then script only what they don't cover.

## Keep browser automation for pages without an API

A few screens have no API: an agency's own client reporting dashboard, a partner portal, an invoice page in a billing system. Reading those in a browser on a schedule can be reasonable, with limits:

- Read each site's terms first. Meta's [Terms of Service](https://www.facebook.com/terms.php) say "You may not access or collect data from our Products using automated means (without our prior permission)", and its [Automated Data Collection Terms](https://www.facebook.com/apps/site_scraping_tos_terms.php) require Meta's express written permission. For Meta accounts, use the Marketing API, not a script driving Ads Manager pages.
- The same applies to Google Ads and TikTok Ads Manager: their APIs cover spend, ad status and billing, so check those accounts through the API and leave their web pages alone.
- Keep to each platform's account rules. Meta's terms ask each person to "create only one account (your own)". Don't create extra logins to spread the checks.
- Read only what you are allowed to see, keep the request rate low, and never use automation to get around a ban, a review, a verification step or an ad restriction.

## Run the remaining page checks with the BrowserLogin API

BrowserLogin keeps each client's login in its own browser profile. Its REST API and hosted MCP endpoint let a script open that profile in a cloud browser, read the page and close it again. The BrowserLogin request and response shapes below come from the in-app API guide (**Workspace > Open API guide**).

### Create an API key

1. In BrowserLogin, open **Workspace** (**Account** if you are not the workspace owner), then the **API keys** tab.
2. Type a name such as `Northwind Media daily checks` and tap **Create**. A sheet opens showing the key once.
3. Tap **Copy key**, store the key in a password manager, then tap **I stored it safely**. The sheet warns that "This key cannot be recovered after dismissal."

![One-time API key sheet titled Copy Northwind Media daily checks, with Copy key and I stored it safely buttons](https://api.sapps.co/api/assets/store/5e1aaa29f2d44b10/article/025addb2-1089-48bf-8b0d-6e60093ca21e.png)

Keys are created and revoked only in the signed-in workspace. The API can list keys but never create, rotate or revoke them. On the same screen, tap **Open API guide**. Its **Connection and authentication** block shows the key shape and the header every request sends.

![API guide Connection and authentication block: key shape bl_<KEY_ID>_<KEY_SECRET> and header Authorization: Bearer <BROWSERLOGIN_API_KEY>](https://api.sapps.co/api/assets/store/5e1aaa29f2d44b10/article/49537e92-6636-43ae-99ee-a5cbcb84e9a5.png)

The guide's **Runtime endpoints** section lists your **REST base URL** (ending in `/api/v1`) and your **MCP endpoint** (ending in `/mcp/browserSessionMCP`), each with a copy button.

### Find the client's profile

List the profiles your key can see with `GET <REST base URL>/profiles`, adding `?q=` to match a name:

```http
GET /api/v1/profiles?q=Northwind
Authorization: Bearer <BROWSERLOGIN_API_KEY>
```

The guide's response shape (sample values):

```json
{
  "items": [{
    "id": "<PROFILE_ID>",
    "name": "Research profile",
    "owner_user_id": "<USER_ID>",
    "role": "owner",
    "platform": "macos",
    "proxy_id": "<PROXY_ID>",
    "has_proxy": true,
    "user_key_required": false,
    "tags": ["research"],
    "group": "Research",
    "deleted": false,
    "active_session": null,
    "capabilities": { "can_stop_current_session": false, "can_force_stop_current_session": false, "can_rotate_proxy": true },
    "created_at": "2026-08-11T11:00:00.000Z",
    "updated_at": "2026-08-11T12:00:00.000Z"
  }],
  "next_cursor": null,
  "total": 1
}
```

### Start a cloud session

Starting and stopping cloud sessions happens through the MCP tools, not REST. (`POST /profiles/:profileId/sessions` on REST locks a profile for the desktop client; it does not open a cloud browser.) The MCP endpoint speaks standard MCP over HTTP: POST one JSON-RPC message with the same Bearer header. A [tools/call request](https://modelcontextprotocol.io/specification/2025-11-25/server/tools) to start the profile looks like this:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "cloud_session_start",
    "arguments": { "profile_id": "<PROFILE_ID>", "wait_until_running": true, "wait_timeout_seconds": 45 }
  }
}
```

One call waits at most 45 seconds. If the result has `timed_out: true`, call `session_wait` with the session ID; don't start it again. A repeat start on a live session returns it with `reused: true`. The result carries `session_id`, `status` and a session object. The guide's sample below shows a session another member started, so `can_stop` is false there; for a session your script started it is true:

```json
{
  "session_id": "<CLOUD_SESSION_ID>",
  "profile_id": "<PROFILE_ID>",
  "profile_name": "Shop admin",
  "status": "running",
  "variant": "free",
  "browser_label": "Free · CloakBrowser 146.0.7680.177.5",
  "instance_status": "running",
  "started_by_name": "Sam Member",
  "can_stop": false,
  "can_force_stop": true,
  "link_ready": false
}
```

(Trimmed: the full object also has timestamps, `error` and the starter's user ID.)

### Open the page and read a snapshot

Call `cloud_browser_navigate` with `profile_id` and `url`, for example your own dashboard at `https://reports.example.com/northwind-bakery/billing`. Then call `cloud_browser_snapshot` with `profile_id`. It returns an accessibility snapshot of the page with element refs, reading the main frame first and each iframe on its own deadline. Long pages come back in parts: when the result has `next_cursor`, call again with it as `cursor`. To pull one value, such as a "Payment failed" banner, `cloud_browser_find` searches the page for text or a regular expression and returns only the matching lines.

![API guide entry for cloud_browser_snapshot: summary, Access: profile reader, and arguments starting with profile_id and optional maxChars](https://api.sapps.co/api/assets/store/5e1aaa29f2d44b10/article/04eeec41-2719-4ac9-9a91-6a1232b06720.png)

### Stop the session

Call `cloud_session_stop` with `profile_id` (or `session_id`). The instance stops the browser and saves the profile's archive, so the login is still there for tomorrow's run. Only the person who started the session can stop it normally; the profile owner can add `force: true`.

### Or ask the Cloud Agent

If you'd rather not write the script, the **Agent** screen in the workspace runs the same hosted tools for you. Ask it to open the Northwind Bakery profile, go to the billing page and report any warning. It asks you to approve before it starts or stops a session (the card reads "Start a cloud session on Northwind Bakery."); navigating and reading the page need no approval.

## Before you schedule it

A few limits apply to the cloud tools:

- At most 120 cloud tool calls per user per minute. Extra calls return `RATE_LIMITED` with `retry_after_ms`.
- Each call is audited as `cloud.mcp_tool` with only the tool name and profile ID. URLs, typed text and page content are never logged.
- A profile has one live session at a time, so schedule the script for a time when no teammate is working in that profile. If a teammate's session is live, a start returns their session (`reused: true`) and your script cannot stop it.
- Cloud sessions use credits. **Cloud > Settings** shows the price per session-hour.

[Create an API key in BrowserLogin and start your first cloud session over the API](https://sapps.co/explore/browserlogin).
