# Track political ad spending on Facebook in the US

**Use case:** 

Export political and issue ads from the Meta Ad Library with spend and impression ranges, who paid for them, platforms and dates. Spend comes as Meta's text range plus lower and upper numbers, ready for charts. This example collects active and inactive US ads about climate. For journalists, researchers and campaign analysts.

## Input

```json
{
  "searchTerms": [
    "climate"
  ],
  "countries": [
    "US"
  ],
  "activeStatus": "all",
  "adType": "political_and_issue_ads",
  "mediaType": "all",
  "searchMode": "keyword_unordered",
  "sortBy": "relevance",
  "skipDuplicateVersions": false,
  "oneAdPerAdvertiser": false,
  "maxAdsPerSource": 100,
  "includeAdDetails": false,
  "countOnly": false,
  "includeMarkdown": false,
  "includeRawData": false,
  "onlyNewAds": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "maxConcurrency": 4,
  "maxRetries": 6
}
```

## Output

```json
{
  "pageName": {
    "label": "Advertiser",
    "format": "string"
  },
  "isPolitical": {
    "label": "Political",
    "format": "boolean"
  },
  "spend": {
    "label": "Spend",
    "format": "object"
  },
  "impressions": {
    "label": "Impressions",
    "format": "object"
  },
  "reachEstimate": {
    "label": "Reach estimate",
    "format": "object"
  },
  "currency": {
    "label": "Currency",
    "format": "string"
  },
  "euTotalReach": {
    "label": "EU reach",
    "format": "integer"
  },
  "payer": {
    "label": "Payer",
    "format": "string"
  },
  "beneficiary": {
    "label": "Beneficiary",
    "format": "string"
  },
  "paidForBy": {
    "label": "Paid for by",
    "format": "string"
  },
  "adLibraryUrl": {
    "label": "Ad Library link",
    "format": "string"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Facebook Ads Library Scraper & Ad Monitor Actor is ready to run with the inputs already set for "Track political ad spending on Facebook in the US". [Sign up or log in](https://console.apify.com/create-task-from-example/Fb1jlfr2sIy6YjJ8l) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Track political ad spending on Facebook in the US" task

The Facebook Ads Library Scraper & Ad Monitor Actor will start running based on the input automatically. You can also change all the input fields, like search terms (keywords or brand names), countries, and more, to match your specific use case.

### 3. Receive the "Track political ad spending on Facebook in the US" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as advertiser, political, spend, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Track political ad spending on Facebook in the US" task via API](https://apify.com/panix/facebook-ads-library-scraper.md).

## FAQ

### What spend data does the political ad spend task include?

For each political or issue ad, the political ad spend task returns Meta's spend and impression ranges as text plus lower and upper numbers, the currency, the paid-for-by line, platforms and start and end dates.

### Why are the spend figures ranges?

Meta publishes political ad spend and impressions only as ranges, such as $1K to $5K. The political ad spend task keeps Meta's text and adds numeric lower and upper bounds, so you can add them up and chart them.

### Can I follow another country, election or issue?

Change the keyword and the country in the political ad spend task. Meta keeps political and issue ads in its Ad Library for 7 years, active and inactive.

### Is it legal to collect political ad data?

The Meta Ad Library is a public transparency tool. The political ad spend task collects only what Meta shows publicly. Results can include public names of political advertisers, so use them for a legitimate purpose.

### How much does the political ad spend task cost?

The political ad spend task costs $0.60 per 1,000 ads on the Apify Free plan and $0.50 on Starter, less on Scale and Business, plus $0.003 per run. Failed sources and duplicates are never charged.

## About this Actor

This example demonstrates how to use [Facebook Ads Library Scraper & Ad Monitor](https://apify.com/panix/facebook-ads-library-scraper.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/panix/facebook-ads-library-scraper.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

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 full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/panix/facebook-ads-library-scraper.md

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`).
