# Facebook Photo Albums Scraper (`thenetaji/facebook-albums-scraper`) Actor

Collect the photo albums of a public Facebook Page, with each album's title, photo count, cover image and link. Supply several Pages in one run.

- **URL**: https://apify.com/thenetaji/facebook-albums-scraper.md
- **Developed by:** [The Netaji](https://apify.com/thenetaji) (community)
- **Categories:** Social media, For creators
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

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 Photo Albums Scraper — Page Albums

The Actor collects a public Facebook Page's photo albums exactly as a logged-out visitor sees them on the Page's Photos tab. No Facebook account, login, or session cookie is used at any point.

### Accepted input

`page` is required and accepts a list of Page usernames, numeric IDs, or full `facebook.com/<page>/` URLs, one per line; duplicates are collapsed before any request is made. `maxItems` (default `50`) bounds the number of albums saved per Page; `0` continues until Facebook stops returning a next page.

```json
{
  "page": ["NASA", "https://www.facebook.com/unicef/"],
  "maxItems": 100
}
```

### Result fields

Each row carries `page`, `id`, `title`, `subtitle`, `url`, `imageUrl`, and `raw`.

```json
{
  "page": "NASA",
  "id": "1023004567890123",
  "title": "Artemis II — Splashdown",
  "subtitle": "48 photos",
  "url": "https://www.facebook.com/media/set/?set=a.1023004567890123",
  "imageUrl": "https://scontent.xx.fbcdn.net/v/..."
}
```

`subtitle` is Facebook's own secondary line beneath the album title, typically the photo count, and is `null` when the album listing does not carry one. Individual photos inside an album are not returned by this Actor; each row is the album itself, not its contents.

`raw` carries the complete record Facebook returned, beyond what is broken out into its own field.

### Behaviour on partial results

Each Page's list is a separate paginated series of requests. A Page that cannot be resolved — because the username or ID does not exist, or the Page is not public — is logged as a warning and skipped, and the run continues with the rest of the list.

### Public, logged-out data only

Everything returned here is visible on the Page's own Photos tab to somebody who is not signed in. Albums a Page restricts to logged-in visitors are not returned.

### Frequently asked questions

**Are individual photos inside an album returned?**
No. Each row is one album — its title, cover image, and link — not the photos it contains. There is no public per-photo listing surface for this Actor to read.

**Can photo albums and videos be collected in the same run?**
Not from this Actor: it covers photo albums only. Use the [Facebook Videos Scraper](https://apify.com/thenetaji/facebook-videos-scraper) for a Page's videos.

**Is a Facebook account or login required?**
No. Only the Photos tab that Facebook already shows to a logged-out visitor is read.

### What this is useful for

Archiving a Page's photo library outside Facebook's own retention; monitoring a competitor's or partner's publishing cadence across photo content; and building a media inventory — titles, counts, and links — without opening each album by hand.

### Related Actors

| Actor | Purpose |
| --- | --- |
| [Facebook Videos Scraper](https://apify.com/thenetaji/facebook-videos-scraper) | Videos published by a Page |
| [Facebook Page Scraper](https://apify.com/thenetaji/facebook-page-scraper) | Profile, About and Transparency details for a Page |
| [Facebook Posts Scraper](https://apify.com/thenetaji/facebook-posts-scraper) | Timeline posts for a Page |

# Actor input Schema

## `page` (type: `array`):

Facebook Page usernames, numeric IDs, or full facebook.com/<page>/ URLs, one per line.

## `maxItems` (type: `integer`):

Maximum albums to save per Page. Set `0` to continue until no further albums are available.

## Actor input object example

```json
{
  "page": [
    "NASA",
    "https://www.facebook.com/unicef/"
  ],
  "maxItems": 20
}
```

# Actor output Schema

## `dataset` (type: `string`):

All records scraped by this run

# 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 = {
    "page": [
        "NASA"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("thenetaji/facebook-albums-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 = {
    "page": ["NASA"],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("thenetaji/facebook-albums-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 '{
  "page": [
    "NASA"
  ],
  "maxItems": 20
}' |
apify call thenetaji/facebook-albums-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,thenetaji/facebook-albums-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/sbuAhFlaB6DvUaX2B/builds/xwbeYaq4a0vMiKohn/openapi.json
