# US Political Ads on Facebook

**Use case:** 

Find Facebook political and issue ads for the keyword “coffee” in the US, sorted by total impressions. Records can include ad text, advertiser Page name, run dates, impression ranges, and spend ranges when Meta publishes them. Change searchTerms to explore another topic.

## Input

```json
{
  "mode": "search",
  "searchTerms": [
    "coffee"
  ],
  "pageIds": [],
  "adIds": [],
  "bylines": [],
  "country": "US",
  "countries": [],
  "adActiveStatus": "active",
  "adType": "political_and_issue_ads",
  "mediaType": "all",
  "publisherPlatforms": [],
  "contentLanguages": [],
  "searchType": "keyword_unordered",
  "sortBy": "total_impressions",
  "resultsPerSearch": 20,
  "maxItems": 20,
  "includeEuDetails": false,
  "rehostMedia": false,
  "onlyTotal": false
}
```

## Output

```json
{
  "ad_id": {
    "label": "Ad ID",
    "format": "text"
  },
  "page_name": {
    "label": "Page Name",
    "format": "text"
  },
  "ad_text": {
    "label": "Ad Text",
    "format": "text"
  },
  "start_date": {
    "label": "Started",
    "format": "text"
  },
  "status": {
    "label": "Status",
    "format": "text"
  },
  "media_type": {
    "label": "Media",
    "format": "text"
  },
  "cta_text": {
    "label": "CTA",
    "format": "text"
  },
  "link_url": {
    "label": "Link URL",
    "format": "link"
  },
  "publisher_platform": {
    "label": "Platforms",
    "format": "text"
  },
  "collation_count": {
    "label": "Creative Reuse",
    "format": "text"
  },
  "spend": {
    "label": "Spend",
    "format": "text"
  },
  "impressions": {
    "label": "Impressions",
    "format": "text"
  },
  "ad_snapshot_url": {
    "label": "Snapshot URL",
    "format": "link"
  },
  "search_term": {
    "label": "Search Term",
    "format": "text"
  }
}
```

## How it works

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

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

### 2. Start the "US Political Ads on Facebook" task

The Facebook Ad Library Byline & Advertiser Ad Finder Actor will start running based on the input automatically. You can also change all the input fields, like mode, search terms, and more, to match your specific use case.

### 3. Receive the "US Political Ads on Facebook" 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 ad id, page name, ad text, 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 "US Political Ads on Facebook" task via API](https://apify.com/nimbryxo-studio/facebook-ad-library-byline-and-advertiser-ad.md).

## FAQ

### How can I find US political ads about coffee on Facebook?

The US political ads task searches Facebook’s Ad Library for “coffee” in the United States and sorts results by total impressions.

### What information does the Facebook Ad Library show for political ads?

Each result from the US political ads task can include ad text, the advertiser Page, run dates, impression and spend ranges, and a public ad link.

### Can I search Facebook political ads for a different keyword?

Change the search phrase in the US political ads task to explore another topic; the current search is for “coffee” in the United States.

### How many Facebook ad results can I get for coffee?

The US political ads task is capped at 20 results for this run, with a maximum of 20 results per search.

### How are the coffee ad results sorted?

Results from the US political ads task are sorted by total impressions, as reported in the Ad Library.

### Do I need a Facebook login or API key to search its Ad Library?

The US political ads task reads public Ad Library data without a login, cookie, or API key.

### Can I download the Facebook political ad results?

Results from the US political ads task land in a dataset that can be downloaded as JSON, CSV, Excel, XML, RSS, or an HTML table.

### Can I run this Facebook ad search on a schedule or through an API?

You can run the US political ads task on an Apify schedule, through the Apify API, or through integrations such as Zapier, Make, and n8n.

## About this Actor

This example demonstrates how to use [Facebook Ad Library Byline & Advertiser Ad Finder](https://apify.com/nimbryxo-studio/facebook-ad-library-byline-and-advertiser-ad.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/nimbryxo-studio/facebook-ad-library-byline-and-advertiser-ad.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/nimbryxo-studio/facebook-ad-library-byline-and-advertiser-ad.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`).
