# Facebook Page ID Finder (`igview-owner/facebook-page-search`) Actor

Search brand pages & keyword ideas. Retrieve likes, verification status, categories, and linked Instagram handles with follower counts in one fast run.

- **URL**: https://apify.com/igview-owner/facebook-page-search.md
- **Developed by:** [Sachin Kumar Yadav](https://apify.com/igview-owner) (community)
- **Categories:** Social media, Lead generation, Automation
- **Stats:** 6 total users, 4 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Facebook Page Search - Pages & Keywords Finder

**Search Facebook Pages and keywords using the Ad Library autocomplete API. Find pages by name, discover keyword suggestions, and retrieve detailed page profiles (including Category, Page ID, likes, verification status, and Instagram follower count). Perfect for discovering competitor Page IDs and keyword trends. Built with Apify best practices for reliability and speed.**

---

### Table of Contents

- [Features](#features)
- [Use Cases](#use-cases)
- [Quick Start](#quick-start)
- [Input Parameters](#input-parameters)
- [Output Format](#output-format)
- [Supported Countries](#supported-countries)
- [Performance & Limits](#performance--limits)
- [FAQ](#faq)
- [Troubleshooting](#troubleshooting)
- [Tags](#tags)

---

### Features

- **Page Finder** - Locate any advertiser Facebook Page by searching their name or brand keyword.
- **Page ID Extraction** - Find the precise numerical Page ID needed to run page-specific ad library scrapes.
- **Keyword Autocomplete** - Discover relevant search query suggestions directly from Facebook's system.
- **Profile Metadata** - Retrieve page logos (`image_uri`), likes, category, and alias names.
- **Instagram Sync** - Extract connected Instagram profiles, follower counts, and verification badges.
- **Regional Context** - Target autocomplete contexts using 50+ supported countries.
- **Single API Call Efficiency** - Lightning fast execution since suggestions require no complex pagination loop.

---

### Use Cases

| Use Case | Description | Key Benefits |
|----------|-------------|--------------|
| Competitor ID Discovery | Find a brand's exact Facebook Page ID to feed into the Page Ads Scraper. | Crucial mapping step for automated competitive tracking. |
| Keyword Expansion | Discover autocomplete suggestions related to your niche terms. | Identify related search terms and audience interest signals. |
| Brand Auditing | Identify verified pages, like counts, and linked Instagram profiles. | Measure social presence and verification status of page entities. |
| Regional Research | Discover page variations and suggestions in different international contexts. | Map out global vs local advertiser strategies. |
| Data Pre-processing | Automatically resolve brand names into Page IDs before running main scrapes. | Streamline high-volume scraping workflows. |

---

### Quick Start

#### 1. Basic - Search a Page/Brand Name
```json
{
  "query": "gymshark",
  "country": "US"
}
````

#### 2. Advanced - Regional Autocomplete Suggestions

```json
{
  "query": "tech tools",
  "country": "DE"
}
```

***

### Input Parameters

| Parameter | Type | Required | Description | Default | Example |
|-----------|------|----------|-------------|---------|---------|
| `query` | String | Yes | The search keyword, brand name, or phrase to lookup suggestions for | - | `"gymshark"`, `"nike"`, `"dropshipping"` |
| `country` | String | No | Two-letter country code (ISO 3166-1 alpha-2) for context | `"US"` | `"US"`, `"GB"`, `"CA"`, `"DE"`, `"IN"` |

***

### Output Format

The actor outputs suggestion objects in a single flat list, using the `result_type` attribute (`page`, `keyword`, or `location`) to distinguish between record types.

#### Output Example (Page Suggestion)

```json
{
  "source": "facebook_page_search",
  "search_query": "gymshark",
  "country": "US",
  "result_type": "page",
  "position": 1,
  "name": "Gymshark",
  "page_id": "102484795092789",
  "category": "Sportswear Store",
  "image_uri": "https://scontent.xx.fbcdn.net/v/t39.35426-6/...",
  "likes": 2400320,
  "verification": "blue_verified",
  "entity_type": "page",
  "ig_username": "gymshark",
  "ig_followers": 6120480,
  "ig_verification": "blue_verified",
  "page_alias": "gymshark",
  "page_is_deleted": false,
  "keyword": null,
  "scraped_at": "2026-06-23T13:20:00.000Z"
}
```

#### Output Example (Keyword Suggestion)

```json
{
  "source": "facebook_page_search",
  "search_query": "gymshark",
  "country": "US",
  "result_type": "keyword",
  "position": 5,
  "name": "gymshark clothing",
  "keyword": "gymshark clothing",
  "page_id": null,
  "category": null,
  "image_uri": null,
  "likes": null,
  "verification": null,
  "entity_type": null,
  "ig_username": null,
  "ig_followers": null,
  "ig_verification": null,
  "page_alias": null,
  "page_is_deleted": null,
  "scraped_at": "2026-06-23T13:20:05.000Z"
}
```

#### Output Fields Explained

| Field | Type | Description |
|-------|------|-------------|
| `source` | String | Source indicator, always `facebook_page_search` |
| `search_query` | String | The query term used for search |
| `country` | String | The country code used for regional context |
| `result_type` | String | Type of suggest result (`page`, `keyword`, or `location`) |
| `position` | Integer | Position of the result in the suggestions list (1-based) |
| `name` | String | Target name (either the page name, keyword text, or location string) |
| `page_id` | String | Facebook Page ID (for `page` type, otherwise `null`) |
| `category` | String | Page business category (e.g. "Clothing Brand") |
| `image_uri` | String | URL to the page logo/avatar image |
| `likes` | Integer | Total Facebook page likes |
| `verification` | String | Page verification status (e.g. `"blue_verified"`) |
| `entity_type` | String | Type code of entity (usually `"page"`) |
| `ig_username` | String | Linked Instagram account handle |
| `ig_followers` | Integer | Follower count of linked Instagram account |
| `ig_verification` | String | Verification status of linked Instagram account |
| `page_alias` | String | Page alias identifier / slug name |
| `page_is_deleted` | Boolean | Whether the page is flagged as deleted |
| `keyword` | String | Autocomplete suggestion keyword (for `keyword` type, otherwise `null`) |
| `scraped_at` | String | Timestamp of scraping run |

***

### Supported Countries

The autocomplete context API uses 50 countries. Here are some of the most commonly used country codes:

| Region | Code | Region | Code | Region | Code |
|--------|------|--------|------|--------|------|
| United States | `US` | United Kingdom | `GB` | Canada | `CA` |
| Australia | `AU` | India | `IN` | Germany | `DE` |
| France | `FR` | Italy | `IT` | Spain | `ES` |
| Brazil | `BR` | Mexico | `MX` | Japan | `JP` |
| South Korea | `KR` | Netherlands | `NL` | Sweden | `SE` |
| Poland | `PL` | Türkiye | `TR` | United Arab Emirates | `AE` |
| Saudi Arabia | `SA` | Singapore | `SG` | Indonesia | `ID` |

*(Check `.actor/input_schema.json` for the complete list of 50 supported countries).*

***

### Performance & Limits

- **Pagination** - Autocomplete does not support pagination. It is a single, direct request.
- **Speed** - Runs extremely fast (normally under 3 seconds) since it only calls one endpoint once.
- **Yield** - Returns up to ~10-20 suggestions mixed between keywords, pages, and locations depending on search volume.

***

### FAQ

- **Q: How do I find the Page ID from this?**
  - Search for your brand name or competitor page name. The results with `result_type = "page"` will list the exact `page_id` in the dataset table.
- **Q: Does this scraper require cookies?**
  - No login, credential mapping, or cookies are needed.
- **Q: Why are some fields null?**
  - Suggestions can be simple search keywords (e.g. "nike shoes") which do not have page information like Page ID, category, or Instagram followers. Those fields will remain `null`.

***

### Troubleshooting

| Issue | Cause | Solution |
|-------|-------|----------|
| "No search query provided" | Empty or missing `query` | Provide a valid search term in the input |
| No suggestions returned | The query is extremely unique or obfuscated | Try shorter keywords or common terms |
| API errors / timeouts | Temporary server lag | The actor automatically retries and handles errors internally |

***

### Why Choose This Actor?

- Fast brand name to Page ID mapping
- Combines pages, keywords, and location suggestions
- Extracts detailed likes, category, and verification badges
- Includes linked Instagram account profiles & followers
- Single API call (highly credit efficient)
- Downloadable as CSV, Excel, JSON, or HTML

***

### Tags

`facebook page search`, `facebook page id finder`, `autocomplete scraper`, `facebook brand search`, `competitor finder`, `instagram profile finder`, `ad library autocomplete`, `spy tool helpers`, `marketing automation`, `apify actor`

***

### Get Started Now

1. Enter the **Search Query** (e.g., brand name or topic)
2. Select the **Country** context
3. Click **Start** to run the scraper
4. Browse/download suggestions and extract competitor **Page IDs**
5. Feed Page IDs into the **Facebook Page Ads Scraper**
6. Click ["Try for free"](https://apify.com?fpr=ykgg9c) to test the actor

***

### Related Actors

- **[Facebook Ads Search Scraper](https://apify.com/igview-owner/facebook-ads-search)** - Search ads across the entire Ad Library by keyword.
- **[Facebook Page Ads Scraper](https://apify.com/igview-owner/facebook-page-ads)** - Scrape ads from specific Facebook Pages.

*Built using Apify Platform | Optimized for Performance & Reliability*

# Actor input Schema

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

💬 Enter your search keyword or phrase (e.g., 'fitness', 'buy', 'tech'). This will search for matching Facebook Pages and keyword suggestions.

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

🗺️ Select the country for search context. Uses two-letter country code (ISO 3166-1 alpha-2).

## Actor input object example

```json
{
  "query": "buy",
  "country": "US"
}
```

# Actor output Schema

## `search_results` (type: `string`):

Open the dataset view with an overview of all search results including pages, keywords, and page details.

# 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": "buy",
    "country": "US"
};

// Run the Actor and wait for it to finish
const run = await client.actor("igview-owner/facebook-page-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": "buy",
    "country": "US",
}

# Run the Actor and wait for it to finish
run = client.actor("igview-owner/facebook-page-search").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": "buy",
  "country": "US"
}' |
apify call igview-owner/facebook-page-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=igview-owner/facebook-page-search",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Facebook Page ID Finder",
        "description": "Search brand pages & keyword ideas. Retrieve likes, verification status, categories, and linked Instagram handles with follower counts in one fast run.",
        "version": "1.0",
        "x-build-id": "xaOfpGrK8lgW9QB8A"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/igview-owner~facebook-page-search/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-igview-owner-facebook-page-search",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/igview-owner~facebook-page-search/runs": {
            "post": {
                "operationId": "runs-sync-igview-owner-facebook-page-search",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/igview-owner~facebook-page-search/run-sync": {
            "post": {
                "operationId": "run-sync-igview-owner-facebook-page-search",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "query"
                ],
                "properties": {
                    "query": {
                        "title": "🔎 Search Query",
                        "minLength": 1,
                        "maxLength": 200,
                        "type": "string",
                        "description": "💬 Enter your search keyword or phrase (e.g., 'fitness', 'buy', 'tech'). This will search for matching Facebook Pages and keyword suggestions.",
                        "default": "buy"
                    },
                    "country": {
                        "title": "🌍 Country",
                        "enum": [
                            "US",
                            "GB",
                            "CA",
                            "AU",
                            "IN",
                            "DE",
                            "FR",
                            "IT",
                            "ES",
                            "BR",
                            "MX",
                            "JP",
                            "KR",
                            "NL",
                            "SE",
                            "PL",
                            "TR",
                            "AE",
                            "SA",
                            "SG",
                            "PH",
                            "ID",
                            "TH",
                            "VN",
                            "EG",
                            "ZA",
                            "NG",
                            "KE",
                            "PK",
                            "BD",
                            "AR",
                            "CO",
                            "CL",
                            "PE",
                            "RO",
                            "CZ",
                            "HU",
                            "AT",
                            "CH",
                            "BE",
                            "PT",
                            "DK",
                            "NO",
                            "FI",
                            "IE",
                            "NZ",
                            "IL",
                            "MY",
                            "TW",
                            "HK"
                        ],
                        "type": "string",
                        "description": "🗺️ Select the country for search context. Uses two-letter country code (ISO 3166-1 alpha-2).",
                        "default": "US"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
