# Facebook Place Search Scraper (`powerai/facebook-place-search-scraper`) Actor

Extract Facebook places by keyword with location filtering, supporting auto-pagination and up to 5000 results per run. Perfect for business research and location analysis.

- **URL**: https://apify.com/powerai/facebook-place-search-scraper.md
- **Developed by:** [PowerAI](https://apify.com/powerai) (community)
- **Categories:** Social media, Lead generation
- **Stats:** 71 total users, 2 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.99 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## 🏢 Facebook Place Search Scraper

This actor allows you to search and extract Facebook places based on keywords, with support for location filtering and automatic pagination. It leverages the latest Facebook Place Search API, ensuring robust and up-to-date results.

### Features

- **Keyword Search:** Find places by any keyword or phrase.
- **Location Filter:** Filter places by a specific location UID.
- **Auto Pagination:** Automatically fetches multiple pages using the API cursor until the desired number of results (`maxResults`) is reached.
- **Structured Output:** Returns a structured list of place objects with detailed metadata.

### Input Parameters

| Field          | Type      | Required | Description                                                      |
| -------------- | --------- | -------- | ---------------------------------------------------------------- |
| `query`        | string    | Yes      | Keywords to search for Facebook places.                         |
| `location_uid` | string    | No       | Location unique identifier for filtering places.                |
| `maxResults`   | integer   | No       | Maximum number of places to fetch (default: 5, max: 5000).      |

### Output

The output is a list of place objects, each containing:

- `type`: Place type
- `profile_url`: Place profile URL
- `url`: Place URL
- `image`: Place image information (uri, width, height, scale)
- `name`: Place name
- `facebook_id`: Facebook ID
- `is_verified`: Whether the place is verified

Example output:

```json
[
  {
    "type": "place",
    "profile_url": "https://www.facebook.com/lamejoroficial",
    "url": "https://www.facebook.com/lamejoroficial",
    "image": {
      "uri": "https://scontent.fmec2-1.fna.fbcdn.net/v/t39.30808-1/449711698_792789212975000_2635271177200978456_n.jpg?stp=dst-jpg_s120x120_tt6&_nc_cat=1&ccb=1-7&_nc_sid=2d3e12&_nc_ohc=xOI8Frogo_IQ7kNvwH_jogK&_nc_oc=Adk58JRbz1z0cF3lWjCdtZ0LwsHbA_Yvcxi5V0uvHEiO6a26LY3G9YJpDTF1AT9C7Js&_nc_zt=24&_nc_ht=scontent.fmec2-1.fna&_nc_gid=Dr4of4TG9_eKL-VdZLFvhw&oh=00_AfKg-4lx7KMsHWm5Kgea9II4GofIUi4HMjrRDZJ74TBCsA&oe=683B6D92",
      "width": 120,
      "height": 120,
      "scale": 2
    },
    "name": "La Mejor",
    "facebook_id": "100067317853332",
    "is_verified": true,
    "scrapedAt": "2025-05-27T09:19:06.229Z"
  },
  ...
]
```

### Use Cases

- Business research and analysis
- Location-based marketing
- Competitor analysis
- Local business discovery
- Market research

### Notes

- The actor will automatically paginate using the API cursor until the `maxResults` limit is reached or no more results are available.
- Make sure your query is specific enough to get relevant results.
- The API may have rate limits, so consider using appropriate delays between requests.

***

**Enjoy fast and reliable Facebook place data extraction!**

# Actor input Schema

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

Keywords to search for Facebook places.

## `location_uid` (type: `string`):

Location unique identifier for filtering places.

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

Maximum number of places to fetch.

## Actor input object example

```json
{
  "query": "la",
  "maxResults": 10
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("powerai/facebook-place-search-scraper").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("powerai/facebook-place-search-scraper").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 '{}' |
apify call powerai/facebook-place-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,powerai/facebook-place-search-scraper"
        }
    }
}
```

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/dTx1mV1P5M8kcp0AY/builds/3gKKgrFd6EYCHrOVd/openapi.json
