# Ad Library Facebook Ads for Competitor Research

**Use case:** 

Resolve public Facebook Ad Library links into ad archive IDs, advertiser Page IDs and names, ad status, creative text, calls to action, landing links, and run dates. For a specific ad, change the urls input; includeMetadata adds available ad details.

## Input

```json
{
  "urls": [
    "https://www.facebook.com/ads/library/?id=1568983211690149"
  ],
  "ids": [],
  "includeMetadata": true,
  "maxItems": 20
}
```

## Output

```json
{
  "entityType": {
    "label": "Type",
    "format": "text"
  },
  "name": {
    "label": "Name",
    "format": "text"
  },
  "numericId": {
    "label": "ID",
    "format": "text"
  },
  "username": {
    "label": "Username",
    "format": "text"
  },
  "canonicalUrl": {
    "label": "Canonical URL",
    "format": "link"
  },
  "status": {
    "label": "Status",
    "format": "text"
  }
}
```

## How it works

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

The Facebook URL to ID & Entity Resolver Actor is ready to run with the inputs already set for "Ad Library Facebook Ads for Competitor Research". [Sign up or log in](https://console.apify.com/create-task-from-example/lkZSq6Z8ZguOMvMB9) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Ad Library Facebook Ads for Competitor Research" task

The Facebook URL to ID & Entity Resolver Actor will start running based on the input automatically. You can also change all the input fields, like facebook urls, handles or ids, numeric ids to reverse, and more, to match your specific use case.

### 3. Receive the "Ad Library Facebook Ads for Competitor Research" 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 type, name, ID, 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 "Ad Library Facebook Ads for Competitor Research" task via API](https://apify.com/xyrelith-data/fb-url-id-resolver.md).

## FAQ

### How do I look up Facebook Ad Library ads for competitor research?

Enter a public Facebook Ad Library link to get its ad archive ID, advertiser Page ID and name, status, creative text, call to action, landing link and run dates from the Facebook ad research task.

### What details can I get about a Facebook ad from its Ad Library link?

The Facebook ad research task can return an ad’s advertiser, status, title, text, call to action, landing link and run dates when Facebook makes those details available.

### What link do I need to look up a Facebook Ad Library ad?

Use a public Facebook Ad Library link for the specific ad, such as the supplied link with ID 1568983211690149, in the Facebook ad research task.

### How many Facebook Ad Library links can I check in one run?

The Facebook ad research task is set to return at most 20 records per run; duplicate links resolving to the same entity are collapsed.

### How much does it cost to look up Facebook ads here?

At the current setting of 20 maximum results, the Facebook ad research task’s result charge is at most $0.02 on the Free plan, plus Apify platform usage for the run.

### Do I need a Facebook login or API key to look up an ad?

The Facebook ad research task reads public links as a signed-out visitor, with no Facebook login, cookies or API key required.

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

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

### Can I run Facebook Ad Library lookups on a schedule or through an API?

You can run the Facebook ad research task on an Apify schedule, through the Apify API, or with integrations such as Zapier, Make and n8n.

## About this Actor

This example demonstrates how to use [Facebook URL to ID & Entity Resolver](https://apify.com/xyrelith-data/fb-url-id-resolver.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/xyrelith-data/fb-url-id-resolver.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/xyrelith-data/fb-url-id-resolver.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`).
