# Meta Ad Library Brand Search & Page ID Finder (`whoareyouanas/meta-brand-dropdown-search`) Actor

Find Facebook Page IDs from a brand name or prefix using Meta Ad Library advertiser search. Get ranked pages, categories, profile images, verification, Instagram handles and follower counts. One query per lookup, JSON/CSV exports and a Standby API for dropdowns. No Facebook login required.

- **URL**: https://apify.com/whoareyouanas/meta-brand-dropdown-search.md
- **Developed by:** [Anas Nadeem](https://apify.com/whoareyouanas) (community)
- **Categories:** Social media, Developer tools
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## Meta Ad Library Brand Search & Page ID Finder

**Find Facebook Page IDs from a brand name or prefix.** Meta Ad Library Brand Search returns the ranked advertiser suggestions from the Facebook Ad Library search dropdown, including page names, categories, profile images, verification values and linked Instagram handles.

Enter one query, such as `ele`, `Nike` or `Spotify`. Use the suggestions in a competitor selector, build a brand search dropdown, or pass the selected `pageId` to an Ad Library scraper. No Facebook login, Meta developer app or Meta API token is required.

### How to find a Facebook Page ID by brand name

1. Enter a brand name or partial name in **Brand name or search prefix**.
2. Choose a country if needed, then click **Save & Start**.
3. Open **Advertiser suggestions** in the run's Output tab.
4. Review the candidate's name, category and social links, then use its `pageId` in your workflow.

Minimal input:

```json
{
  "query": "ele"
}
```

To match a country-specific dropdown and cap the results:

```json
{
  "query": "ele",
  "country": "US",
  "maxResults": 10
}
```

Each run or API request searches **one query**. The Actor returns Meta's available suggestions up to your limit and removes duplicate Page IDs within that search. A genuine no-match query succeeds with zero suggestions.

### Meta advertiser search data

Each dataset row represents one advertiser candidate. Download the dataset as JSON, CSV or Excel, or retrieve it through the Apify API.

| Field | What you get |
| --- | --- |
| `pageId` | Numeric Facebook Page ID, returned as a string |
| `pageName` | Advertiser's display name |
| `rank` | Original position in Meta's suggestion list |
| `category` | Public page category, when available |
| `pageAlias`, `pageUrl` | Facebook username/alias and page link |
| `libraryUrl` | Page-specific Meta Ad Library link with the requested country and category |
| `logoUrl` | Profile image URL, when available |
| `likes` | Meta's raw Facebook `likes` count |
| `verification` | Meta's page verification value, such as `BLUE_VERIFIED` |
| `igUsername`, `igUrl` | Linked Instagram handle and profile link |
| `igFollowers`, `igVerification` | Instagram follower count and verification flag |
| `query`, `country`, `adType` | Search context for tracing each result |
| `advertiserCountry` | Advertiser country if Meta supplies it |
| `source`, `fetchedAt` | Suggestion source and UTC retrieval timestamp |

Example advertiser row, shortened from a recorded lookup. Counts are a point-in-time snapshot:

```json
{
  "query": "ele",
  "country": "US",
  "adType": "ALL",
  "rank": 1,
  "pageId": "114803668557265",
  "pageName": "Eleven Media Group",
  "category": "Newspaper",
  "pageAlias": "ElevenMediaGroup",
  "pageUrl": "https://www.facebook.com/ElevenMediaGroup",
  "libraryUrl": "https://www.facebook.com/ads/library/?active_status=all&ad_type=all&country=US&view_all_page_id=114803668557265&search_type=page",
  "likes": 20753610,
  "verification": "BLUE_VERIFIED",
  "igUsername": "elevenmediagroup",
  "igUrl": "https://www.instagram.com/elevenmediagroup/",
  "igFollowers": 124480,
  "igVerification": true,
  "advertiserCountry": null,
  "source": "meta_ad_library_typeahead",
  "fetchedAt": "2026-10-28T13:07:13.794Z"
}
```

Missing optional metadata is `null`; a measured zero remains `0`. Instagram fields depend on Meta linking and returning an account. Profile image URLs can expire.

### Brand search API for dropdowns

Use **Apify Standby** to send individual advertiser searches to an HTTP endpoint. A running instance reuses its browser session across requests. Copy the hostname from this Actor's **Endpoints** tab.

```bash
curl --get 'https://whoareyouanas--meta-brand-dropdown-search.apify.actor/search' \
  --header "Authorization: Bearer $APIFY_TOKEN" \
  --data-urlencode 'query=ele' \
  --data-urlencode 'country=US' \
  --data-urlencode 'maxResults=10'
```

You can also send `POST /search` with a JSON body:

```json
{
  "query": "Nike",
  "country": "US",
  "maxResults": 5
}
```

Set `Content-Type: application/json` and authenticate with an Apify Bearer token. Keep the token on your backend. Python, JavaScript, n8n, Make and other clients can call the same HTTP endpoints.

The HTTP response wraps suggestions in `results`, alongside `query`, `country`, `count`, `availableCount`, `fetchedAt`, `cached` and `durationMs`. A normal Actor run stores the advertiser rows directly in its dataset.

For a dropdown, wait for at least two characters and debounce typing before sending a request. Discard earlier responses when the input changes. Cold starts, proxy setup and retries add latency; a warm instance is more responsive than a new one. See [how Apify Standby works](https://docs.apify.com/actors/running/standby).

#### Where to see the keyword used by the API

A Standby run's **Input** tab shows server startup settings. Each keyword arrives separately through an HTTP request.

Open **Output → Search request history**, or the `REQUESTS` key in that run's key-value store, to inspect the most recent 100 search requests, filters, result counts and errors. The run log and advertiser rows also identify their query. Health checks do not create search-history entries.

### Run a single brand lookup through the Apify API

For an automation that starts a run and returns its dataset, use the synchronous endpoint:

```bash
curl --request POST \
  'https://api.apify.com/v2/acts/whoareyouanas~meta-brand-dropdown-search/run-sync-get-dataset-items?format=json' \
  --header "Authorization: Bearer $APIFY_TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{"query":"Nike","country":"US","maxResults":5}'
```

This endpoint returns an array of advertiser rows. Use Standby for repeated interactive searches. For scheduled lookups, create an Apify Task with one saved query and connect it to a Schedule.

### Input options

| Input | Default | Description |
| --- | --- | --- |
| `query` | Required for a lookup | One brand name or prefix, 2–200 characters |
| `country` | `ALL` | `ALL` or a two-letter country code, such as `US`, `GB` or `IN` |
| `maxResults` | `10` | Maximum suggestions to return, from 1 to 50 |
| `adType` | `ALL` | Ad Library category; availability varies by country |

The country selects Meta's search context. It does not identify a brand's headquarters or prove that the page currently runs ads in that country. Raising `maxResults` does not paginate beyond Meta's available dropdown suggestions.

#### Proxy and API settings

| Input | Default | Description |
| --- | --- | --- |
| `proxyConfiguration` | Residential proxies in cloud runs | Proxy settings for Meta access; proxy traffic is billed separately |
| `cacheTtlSeconds` | `0` | Optional cache within a warm run, up to 300 seconds |
| `minIntervalMs` | `1000` | Minimum interval between outbound lookups |
| `requestTimeoutSecs` | `60` | Search deadline including browser setup and retries |
| `maxRetries` | `1` | Fresh-session retries within the deadline, up to 2 |

The result cache is off by default. When it is enabled, use `fresh=true` on an HTTP request to bypass it. `cached` and `fetchedAt` identify reused results. Saved Actor/Task input supplies the server settings; each HTTP request supplies its own query and can override country, category and result limit.

### Use cases

- **Facebook Page ID lookup:** resolve a brand name into numeric Page ID candidates before retrieving ads.
- **Competitor discovery:** let users choose the right advertiser during onboarding or campaign research.
- **Advertiser autocomplete:** populate a search dropdown with names, profile images and linked social accounts.
- **Brand-to-Instagram lookup:** retrieve the Instagram handle linked to a matching Facebook advertiser when Meta provides it.
- **Ad research workflows:** pass a selected Page ID to another tool that collects the advertiser's creatives.

### Pricing and error handling

Check the **Pricing** tab for current rates. Under search-event pricing, one successful query is one lookup, regardless of how many advertiser suggestions it returns. A valid empty response and a cached response are completed lookups. Failed searches and health checks do not trigger the search event.

Apify resource and proxy costs may be additional, including Standby resource usage while an instance is idle. A `402` response indicates that the run's search spending limit has been reached.

| HTTP status | Meaning |
| --- | --- |
| `200` | Search completed; `results` may be empty |
| `400` | Missing/invalid query, unsupported filters or a query array |
| `429` | Search queue is busy or Meta rate limited the session; respect `Retry-After` |
| `502` | Upstream access, session or response error |
| `504` | Search deadline exceeded |

Errors include a code, message and retryability flag. A failed Meta request is reported as an error rather than as an empty advertiser search. For normal runs, inspect `SUMMARY` for the query and outcome.

### Frequently asked questions

#### Can I find a Facebook Page ID without knowing the page URL?

Yes. Enter the brand name or a partial name. The Actor searches Meta Ad Library advertiser suggestions and returns matching Page IDs and social links.

#### Does one query return several brands or advertiser pages?

Yes. A single string can match several pages, regional accounts or similarly named advertisers. Meta determines the ranking. Review the candidates before selecting a Page ID.

#### Is this the same as searching ad text in Facebook Ad Library?

This Actor returns the **advertiser dropdown suggestions** for your query. It does not collect ad copy, images, videos, ad counts or spend. Follow `libraryUrl` or pass a selected `pageId` to an ads scraper to retrieve creatives.

#### Do I need a Facebook login or a Meta API key?

No Facebook login, user-supplied cookies or Meta developer token is required. API calls to this Actor require your Apify token. This is an independent Apify integration using public Ad Library suggestions.

#### Does a verification badge confirm that I found the right brand?

A badge is a value returned by Meta. The candidate's name, category, page URL and Instagram handle still need to match the brand you want. Several regional pages can share a display name.

#### Can I retrieve every advertiser matching a broad keyword?

The Actor returns the suggestion set supplied by Meta, without pagination. Use a more specific prefix if the desired page is absent. It is not an exhaustive advertiser directory.

#### Why are some Instagram or country fields null?

Meta does not supply every field for every suggestion. Unavailable values remain null, and the requested search country is not used to infer an advertiser's location.

#### Can I search several keywords in one request?

Each run or request accepts one `query` string. Send separate requests for separate keywords.

For help with a particular lookup, open an issue on this Actor and include the run URL, query and country.

# Actor input Schema

## `query` (type: `string`):

The single brand name or partial name to search, such as ele, Nike or Spotify. Required for every lookup; use 2–200 characters. Standby requests send this field to /search instead of setting it at server startup.

## `country` (type: `string`):

ALL or a two-letter ISO country code such as US, GB or IN. This selects Meta's search context, not the advertiser's headquarters.

## `adType` (type: `string`):

Meta Ad Library ad category. Availability of regulated categories varies by country.

## `maxResults` (type: `integer`):

Return up to this many ranked Facebook advertiser suggestions. Meta controls the available dropdown results; raising this limit does not add pagination.

## `proxyConfiguration` (type: `object`):

Residential proxies are the cloud default for Meta Ad Library access. Apify bills proxy traffic separately. Direct access is available when your network supports it.

## `cacheTtlSeconds` (type: `integer`):

0 fetches live results (default). Set up to 300 to reuse recent results in a warm Standby run. fresh=true bypasses this cache.

## `minIntervalMs` (type: `integer`):

Minimum time between outbound lookups per browser session. Unique queries are serialized with a bounded queue.

## `requestTimeoutSecs` (type: `integer`):

Total upstream deadline, including browser launch and retries. Queue waiting has a separate 10-second limit.

## `maxRetries` (type: `integer`):

Retries retryable upstream errors with a new browser/proxy session, within the same time limit.

## Actor input object example

```json
{
  "query": "ele",
  "country": "ALL",
  "adType": "ALL",
  "maxResults": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "cacheTtlSeconds": 0,
  "minIntervalMs": 1000,
  "requestTimeoutSecs": 60,
  "maxRetries": 1
}
```

# Actor output Schema

## `advertisers` (type: `string`):

No description

## `summary` (type: `string`):

No description

## `requests` (type: `string`):

No description

# 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 = {
    "query": "ele"
};

// Run the Actor and wait for it to finish
const run = await client.actor("whoareyouanas/meta-brand-dropdown-search").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 = { "query": "ele" }

# Run the Actor and wait for it to finish
run = client.actor("whoareyouanas/meta-brand-dropdown-search").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 '{
  "query": "ele"
}' |
apify call whoareyouanas/meta-brand-dropdown-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,whoareyouanas/meta-brand-dropdown-search"
        }
    }
}
```

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/920wQqgcLwOCaayJg/builds/8Sc8vbMMMzxKsB4BH/openapi.json
