# Facebook Ad Count Tracker - Active Ads per Page (`neverempty/facebook-ads-count-tracker`) Actor

See how many ads each Facebook page is running right now in the Meta Ad Library, and how that number changed since your last run. One row per page and country, charged per page instead of per ad, so you can check 100 competitors every day without downloading their ads.

- **URL**: https://apify.com/neverempty/facebook-ads-count-tracker.md
- **Developed by:** [NeverEmpty](https://apify.com/neverempty) (community)
- **Categories:** Social media, Marketing, Automation
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.80 / 1,000 page counteds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Facebook Ad Count Tracker - Active Ads per Page

**Paste your competitors' Facebook pages and get one row per page with the number of ads each one is running right now in the Meta Ad Library, plus the change since your last run.** You pay per page counted, not per ad, so a page with 3,000 live ads costs the same to check as a page with 3.

Schedule it daily and the `change` column shows who just launched a new campaign (+40) and who paused one (-25), from the count alone.

### Who it is for

- **Marketers and agencies** who watch a list of competitors or clients and only need "how many ads are live today".
- **Ecommerce and DTC teams** who treat a sudden jump in a rival's ad count as a sign of a new product or a sale.
- **Analysts and dashboards** that need a clean daily number per brand to chart over time.

### What you get

One row per page and country:

| Column | Example | Meaning |
|---|---|---|
| `status` | `ok` | `ok`, `no-active-ads`, `not-found`, `unreadable`, `blocked`, `bad-input` or `budget-reached` |
| `pageName` | `Nike` | The page name as the Ad Library shows it |
| `pageId` | `15087023444` | The numeric Facebook page ID |
| `activeAdsCount` | `73` | Ads running right now for this page in this country |
| `country` | `US` | The country you asked for, or `ALL` |
| `checkedAt` | `2026-10-29T08:00:12.345Z` | When the count was read |
| `previousActiveAdsCount` | `48` | The count from your last run of the same list |
| `change` | `25` | `activeAdsCount` minus the previous count |
| `previousCheckedAt` | `2026-10-28T08:00:09.120Z` | When the previous count was read |
| `pageUrl` | `https://facebook.com/nike` | The page |
| `adLibraryUrl` | `https://www.facebook.com/ads/library/?...` | Opens the same ads in the Ad Library |
| `input` | `15087023444` | What you typed, so you can match rows to your list |
| `note` | `null` | Why a row has no count (`null` for `ok`) |

Example output:

```json
{
  "status": "ok",
  "pageName": "Nike",
  "pageId": "15087023444",
  "activeAdsCount": 73,
  "country": "US",
  "checkedAt": "2026-10-29T08:00:12.345Z",
  "previousActiveAdsCount": 48,
  "change": 25,
  "previousCheckedAt": "2026-10-28T08:00:09.120Z",
  "pageUrl": "https://facebook.com/nike",
  "adLibraryUrl": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&media_type=all&search_type=page&view_all_page_id=15087023444",
  "input": "15087023444",
  "note": null
}
```

Download the table as CSV, Excel or JSON, or read it from the API.

### How to use it

1. **Pages**: one per line. Any of these works:
   - a page ID: `15087023444`
   - an Ad Library link: `https://www.facebook.com/ads/library/?view_all_page_id=15087023444`
   - a profile link with an ID: `https://www.facebook.com/profile.php?id=100064...`
2. **Countries**: two-letter codes such as `US`, `GB`, `DE`, or `ALL` for every country. Each page gets one row per country. Empty means `ALL`.
3. **List name** (optional): runs with the same name share their last counts. Use one name per list, for example `clients-a` and `clients-b`.
4. **Start the change column again** (optional): turn it on once to forget the remembered counts of this list, for example after you change the list a lot.
5. Click **Start**, or add a **Schedule** (for example every day at 08:00) to build a daily history.

Example input:

```json
{
  "pages": ["15087023444", "https://www.facebook.com/ads/library/?view_all_page_id=670688686620124"],
  "countries": ["US", "GB"],
  "historyName": "competitors"
}
```

Up to 1,000 page and country pairs per run.

### Cost

- You are charged once for each row with a count (`status: ok`), plus a small fee once per run when at least one page has ads. See the **Pricing** tab for the current amounts.
- **Not charged**: pages with no active ads (`no-active-ads`), pages that do not exist (`not-found`), input mistakes, and pages that could not be read. They still appear as rows so your list stays complete.
- If you set a maximum cost per run, the run stops before going over it, the remaining pages come back as `budget-reached` rows (not charged), and the log and status message say so.

### FAQ

#### How do I check how many ads my competitors are running on Facebook every day?

Put their page IDs or Ad Library links in **Pages**, choose your countries, give the list a name, and add a daily **Schedule**. Each run returns one row per page with `activeAdsCount`, and from the second run on, `change` shows how much it moved since the day before.

#### How do I find a Facebook page ID?

Search the brand in the Meta Ad Library (facebook.com/ads/library), click the page name to see all its ads, and copy the link from the address bar. It contains `view_all_page_id=` followed by the ID. You can paste that whole link.

#### Can I paste a link like facebook.com/nike?

Use the page ID or the page's Ad Library link instead. A name link such as facebook.com/nike does not contain the page ID, so it comes back as a `bad-input` row with a note and is not charged. Open the page's ads in the Ad Library once and copy that link.

#### Is the number the same as the one the Ad Library shows?

It is the count the Ad Library gives for that page, country and "active ads" filter at `checkedAt`. Ads start and stop all the time, so the number can change within the same day.

#### What happens when a page has 0 ads or does not exist?

A page with no active ads returns `status: no-active-ads` and `activeAdsCount: 0`. A page ID that does not exist returns `status: not-found`. Neither is charged.

#### Can I see the ad texts and images?

This Actor returns the count only, which is why it is charged per page. Use the `adLibraryUrl` of a row to open that page's ads in the Ad Library when a number jumps.

#### How much does it cost to track 100 pages a day?

100 counted rows per day, plus one start fee per run. Pages with no active ads are free. The **Pricing** tab shows the current price per page and per run.

#### How often can I run it?

As often as you like. Daily is enough for most competitor lists; hourly works for launches you are watching closely.

#### Can I track separate lists for different clients?

Yes. Use a different **List name** for each one. Each list remembers its own last counts, so the `change` columns never mix.

#### Can I connect it to Google Sheets, Slack or Zapier?

Yes. Use Apify integrations or webhooks to send each run's dataset to Google Sheets, Slack, Zapier, Make or your own endpoint.

### Notes and limits

- It reads only the public Meta Ad Library, which anyone can open without a Facebook account. You do not need to give it a login.
- `ALL` and single countries can give different numbers, because some ads run only in certain countries.
- The `change` column is empty on the first run of a list, after **Start the change column again**, and for a page or country that was not in the previous run.
- If the Ad Library asks for a check or does not answer, the run stops asking, returns a note row for each page not counted, and charges nothing for them. Run it again later.
- Very large runs take longer, because each page and country pair is checked separately.
- This Actor is not made by, endorsed by or connected to Meta Platforms, Inc. Facebook and Meta are trademarks of Meta Platforms, Inc.

### Feedback

Something not working, or a column you need? Open an issue on the **Issues** tab. If the Actor saves you time, a short review helps other people find it.

# Actor input Schema

## `pages` (type: `array`):

The pages to count, one per line: a numeric page ID (15087023444), a Meta Ad Library link that contains view_all_page_id=..., or a facebook.com/profile.php?id=... link. A page name link (facebook.com/nike) cannot be turned into an ID without logging in: open the page's ads in the Ad Library and copy that link instead. Empty = the example page 15087023444 (Nike).

## `countries` (type: `array`):

Count the ads shown in these countries, one two-letter code per line (US, GB, DE, BR ...), or ALL for every country. Each page gets one row per country. Empty = ALL. Up to 1,000 page and country pairs per run.

## `historyName` (type: `string`):

Optional. Runs with the same list name share their last counts, so each row shows the previous count and the change. Use a different name for each separate list (for example clients-a and clients-b). Letters, digits, dot, dash and underscore, up to 40. Empty = one shared default list.

## `resetHistory` (type: `boolean`):

On = ignore the counts remembered for this list name, so the previous count and change are empty in this run. This run's counts are still remembered for the next run.

## Actor input object example

```json
{
  "pages": [
    "15087023444"
  ],
  "countries": [
    "US"
  ],
  "resetHistory": false
}
```

# Actor output Schema

## `results` (type: `string`):

One row per page and country: page name, page ID, how many ads it is running right now, country, time of the check, previous count and change since the last run with the same list name, and links to the page and its Ad Library view. Pages with no active ads, missing pages, unreadable pages and input mistakes come back as free rows that say why.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "pages": [
        "15087023444"
    ],
    "countries": [
        "US"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("neverempty/facebook-ads-count-tracker").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "pages": ["15087023444"],
    "countries": ["US"],
}

# Run the Actor and wait for it to finish
run = client.actor("neverempty/facebook-ads-count-tracker").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "pages": [
    "15087023444"
  ],
  "countries": [
    "US"
  ]
}' |
apify call neverempty/facebook-ads-count-tracker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,neverempty/facebook-ads-count-tracker"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/zjVMYITnelFtyTS7q/builds/oIHh7C1csZ63wWgBq/openapi.json
