# Facebook Albums Scraper⚡ (`premiumscraper/facebook-albums-scraper`) Actor

Scrape Facebook albums from Pages, Profiles, or direct album links. Output includes: album title, item count, cover image, description, engagement (reactions/comments/shares), owner details, nested photos per album, and album comments with filter support. One row per album ✨ Facebook Albums Scraper⚡

- **URL**: https://apify.com/premiumscraper/facebook-albums-scraper.md
- **Developed by:** [Premium Scraper](https://apify.com/premiumscraper) (community)
- **Categories:** Social media, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 album scrapeds

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 Albums Scraper ⚡ — Albums, Photos & Comments

Scrape **Facebook albums** from any public Facebook Page or Profile with this **Facebook Albums Scraper** — plus optional **direct album links**, per-album photo collection, and public album comments. This **Facebook Albums Scraper** returns one row per album with title, item count, cover image, engagement metrics, description, owner details, nested photos/comments, and exact requested-vs-returned diagnostics.

This **Facebook Albums Scraper** supports **direct album links** (`/media/set/?set=a.XXX`) and **profile-based album discovery**. `max_albums_per_profile` always means **unique albums per profile**. If you request more albums than a profile exposes publicly, the **Facebook Albums Scraper** stops at the available album count and does not duplicate albums to reach your requested limit.

> **💡 Need to scrape posts from a full profile?** Use [Facebook Posts Scraper](https://apify.com/premiumscraper/facebook-posts-scraper) — it scrapes all posts from any Facebook Page or Profile and includes full post details, comments, shares, reactions, and media. [→ Try Facebook Posts Scraper](https://apify.com/premiumscraper/facebook-posts-scraper)

### 🤔 Why Use This Facebook Albums Scraper?

Facebook Pages and Profiles organize photos into albums — profile pictures, cover photos, timeline photos, and custom albums. This Facebook albums scraper inventories every public album on a profile, giving you a structured catalog of album titles, photo counts, cover images, engagement data, descriptions, and optionally the individual photos and public comments within each album. Perfect for content auditing, media research, brand monitoring, and competitor analysis at scale.

### ⚙️ How This Facebook Albums Scraper Works

1️⃣ **Provide input** — enter Facebook usernames, Page/Profile URLs, or direct album links.
2️⃣ **Automatic resolution** — the scraper resolves usernames to profile URLs, classifies direct album links, and navigates to each profile's albums tab.
3️⃣ **Album extraction** — each public album is parsed: title, item count, cover image, description, type, creation date, owner details, and full engagement metrics (reactions, comments, shares).
4️⃣ **Optional photo enrichment** — when "Include photos per album" is on, the **Facebook Albums Scraper** collects up to your `photos_per_album` limit for every album, whether that album came from a profile, username, or direct album link.
5️⃣ **Optional comment enrichment** — when "Include album comments" is on, the **Facebook Albums Scraper** fetches public album comments with configurable filter (`most_relevant`, `newest`, `all_comments`). The output clearly distinguishes verified no-comment albums, fully satisfied requests, all-available-returned cases, and cases where Facebook reported more public items than were returned.
6️⃣ **Flat output** — every album becomes one standalone dataset row with all metadata, plus nested photos and comments.
7️⃣ **Pay-per-event billing** — you are charged per album, per returned photo, per returned comment, optional comment-filter surcharge, and per direct album link. The run stops gracefully when your budget cap is reached.

### 📦 What Data Does This Facebook Albums Scraper Extract?

#### Per Album
- ✅ **Album title** — the display name of each album
- ✅ **Album ID** — unique identifier for each album
- ✅ **Album URL** — direct link to the album
- ✅ **Album item count** — number of photos/videos in the album (exact integer)
- ✅ **Album item count text** — display text (e.g., "234 items")
- ✅ **Album description** — album description/caption text
- ✅ **Album type** — wall, profile, cover, mobile, custom, etc.
- ✅ **Album creation date** — when the album was created
- ✅ **Cover image URL** — full-resolution album cover image
- ✅ **Thumbnail URL** — album thumbnail image
- ✅ **Album owner** — owner name, ID, profile URL, verification status
- ✅ **Album engagement** — reaction count, comment count, share count, top reactions breakdown

#### Per Photo (when "Include photos per album" is on)
- ✅ **Photo ID** — unique photo identifier
- ✅ **Image URL** — full-resolution image URL
- ✅ **Download URL** — direct image asset URL when Facebook exposes it
- ✅ **Image dimensions** — width and height in pixels
- ✅ **Thumbnail URL** — thumbnail image URL
- ✅ **Caption** — accessibility caption text
- ✅ **Photo URL** — direct link to the photo page
- ✅ **Photo details** — viewer image, pagination cursor, creation story ID, focus point, and other raw-response fields when available

#### Per Comment (when "Include album comments" is on)
- ✅ **Comment ID** — unique comment identifier
- ✅ **Message text** — comment content
- ✅ **Author** — name, ID, profile URL, profile picture
- ✅ **Created at** — comment timestamp
- ✅ **Reaction count** — number of reactions on the comment
- ✅ **Reply count** — number of replies
- ✅ **Attachments** — image/video URLs attached to the comment

### 🔗 Supported Input Sources

| Source Type | Example |
|-------------|---------|
| Page URL | `https://www.facebook.com/nike` |
| Profile URL | `https://www.facebook.com/Cristiano` |
| Username | `Cristiano` |
| Page with path | `https://www.facebook.com/nike/photos` |
| Direct album link | `https://www.facebook.com/media/set/?set=a.322648365888377&type=3` |
| Direct album link | `https://www.facebook.com/media/set/?set=a.10153828194112164&type=3` |

> **Note:** Direct album links require the "Include direct album" toggle to be turned on. When off, direct album links in the input are ignored with a warning.

### ⚙️ Input Configuration

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `username` | string[] | — | Facebook usernames (e.g., `Cristiano`, `nike`) |
| `facebook_urls` | URL[] | — | Facebook Page/Profile URLs or direct album links |
| `max_albums_per_profile` | integer | 10 | Maximum unique albums to collect per profile. If the profile exposes fewer albums, the **Facebook Albums Scraper** stops at the available album count and reports requested vs returned values. |
| `include_direct_album` | boolean | false | Turn on to scrape direct album links. Costs extra per direct album link. When off, direct album links in input are skipped with a clear log message. |
| `include_album_photos` | boolean | false | Turn on to scrape individual photos from each album. Costs extra per returned photo. |
| `photos_per_album` | integer | 10 | Maximum photos per album. This limit applies to albums from usernames, profile URLs, page URLs, and direct album links. |
| `include_album_comments` | boolean | false | Turn on to scrape public comments from each album when Facebook exposes them. |
| `comments_limit` | integer | 10 | Maximum public top-level comments per album. |
| `comment_filter` | string | `most_relevant` | Comment ordering: `most_relevant`, `newest`, or `all_comments`. `newest` and `all_comments` cost extra per album. |

You can combine `username`, `facebook_urls` (profile URLs), and direct album links in a single run. Duplicates are skipped automatically.

### 📊 Output Dataset — Album Fields

Each row represents one album:

| Field | Type | Description |
|-------|------|-------------|
| `type` | string | Always `album` |
| `number` | integer | Sequential row number |
| `source_input` | string | Original input URL or username |
| `source_type` | string | `profile` or `direct_album_link` |
| `profile_url` | string | Resolved profile URL (for profile sources) |
| `album_id` | string | Album unique identifier |
| `album_url` | string | Direct URL to this album |
| `album_title` | string | Album display name |
| `album_description` | string | Album description/caption text |
| `album_count` | integer | Number of items in this album |
| `album_item_count_text` | string | Item count display text (e.g., "234 items") |
| `album_type` | string | Album type (wall, profile, cover, mobile, custom) |
| `album_created_at` | string | Album creation date (ISO 8601) |
| `cover_image_url` | string | Album cover image URL |
| `image_url` | string | Primary image URL |
| `thumbnail_url` | string | Thumbnail image URL |
| `album_owner` | object | Owner name, ID, URL, verification status |
| `album_engagement` | object | Reaction count, comment count, share count, top reactions breakdown |
| `album_details` | object | Additional album metadata |
| `album_photos` | object | Nested photos (when enabled) — exact availability diagnostics + photos list |
| `album_comments` | object | Nested comments (when enabled) — selected filter, exact availability diagnostics + comments list |
| `album_request_details` | object | Requested vs returned album counts, whether the available count is exact, and a note that the **Facebook Albums Scraper** never duplicates albums to satisfy `max_albums_per_profile` |

#### Nested Request Diagnostics

When `album_photos` or `album_comments` is enabled, each nested `request` object can include:

- `requested_count` — how many items you asked for
- `returned_count` — how many items were actually returned
- `available_count` — how many public items Facebook reported overall
- `available_count_is_exact` — whether that overall count is exact
- `available_count_for_selected_filter` — how many public comments Facebook reported for the selected filter when that count is available
- `expected_return_count` — how many items the actor expected to return based on the reported public count
- `availability_status` — `fulfilled`, `all_available_returned`, `verified_none_available`, `verified_extraction_issue`, or `partial_unverified`
- `message` — a human-readable explanation of whether the shortfall is expected, verified, or needs review

### 📋 Sample Output

```json
{
  "type": "album",
  "number": 1,
  "source_input": "Cristiano",
  "source_type": "profile",
  "profile_url": "https://www.facebook.com/Cristiano/",
  "album_id": "10150095902597164",
  "album_url": "https://www.facebook.com/media/set/?set=a.10150095902597164&type=3",
  "album_title": "Timeline Photos",
  "album_description": "Photos posted to the timeline",
  "album_count": 1234,
  "album_item_count_text": "1,234 items",
  "album_type": "wall",
  "album_created_at": "2011-01-15T00:00:00+00:00",
  "cover_image_url": "https://scontent.xx.fbcdn.net/v/...",
  "image_url": "https://scontent.xx.fbcdn.net/v/...",
  "thumbnail_url": "https://scontent.xx.fbcdn.net/v/...",
  "album_owner": {
    "name": "Cristiano Ronaldo",
    "id": "81221197163",
    "url": "https://www.facebook.com/Cristiano",
    "is_verified": true
  },
  "album_engagement": {
    "reaction_count_total": 5432,
    "comment_count_total": 234,
    "share_count_total": 56,
    "top_reactions_breakdown": [
      { "type": "LIKE", "count": 3000, "emoji": "👍", "label": "Like" },
      { "type": "LOVE", "count": 2000, "emoji": "❤️", "label": "Love" }
    ]
  },
  "album_details": {
    "title": "Timeline Photos",
    "item_count_text": "1,234 items",
    "cover_image": {
      "url": "https://scontent.xx.fbcdn.net/v/..."
    }
  },
  "album_photos": {
    "enabled": true,
    "source_album": {
      "album_id": "10150095902597164",
      "album_title": "Timeline Photos",
      "album_url": "https://www.facebook.com/media/set/?set=a.10150095902597164&type=3",
      "album_count": 1234
    },
    "request": {
      "requested_count": 20,
      "returned_count": 15,
      "available_count_signal": 1234,
      "available_count": 1234,
      "available_count_is_exact": true,
      "expected_return_count": 20,
      "availability_status": "verified_extraction_issue",
      "request_fulfilled": false,
      "message": "You requested 20 photos. Facebook indicates that at least 20 public photos should have been returned, but the actor only returned 15. Review the album link, and if the missing public photos are visible there, contact the developer."
    },
    "photos": [
      {
        "photo_id": "10154261928667164",
        "image_url": "https://scontent.xx.fbcdn.net/v/...",
        "download_url": "https://scontent.xx.fbcdn.net/v/...",
        "image_width": 960,
        "image_height": 720,
        "thumbnail_url": "https://scontent.xx.fbcdn.net/v/...",
        "caption": "May be an image of 1 person",
        "photo_page_url": "https://www.facebook.com/photo.php?fbid=10154261928667164&set=a.10150095902597164&type=3",
        "source_album": {
          "album_id": "10150095902597164",
          "album_title": "Timeline Photos",
          "album_url": "https://www.facebook.com/media/set/?set=a.10150095902597164&type=3",
          "album_count": 1234
        }
      }
    ]
  },
  "album_comments": {
    "enabled": true,
    "filter": "all_comments",
    "filter_title": "All comments",
    "filter_summary": "Facebook requests the broadest public album-comment view available.",
    "request": {
      "requested_count": 10,
      "returned_count": 8,
      "available_count_signal": 234,
      "available_count": 234,
      "available_count_is_exact": true,
      "available_count_for_selected_filter": 234,
      "available_count_for_selected_filter_is_exact": true,
      "expected_return_count": 10,
      "availability_status": "verified_extraction_issue",
      "request_fulfilled": false,
      "message": "You requested 10 comments. Facebook indicates that at least 10 public comments should have been returned, but the actor only returned 8. Review the album link, and if the missing public comments are visible there, contact the developer."
    },
    "comments": [
      {
        "comment_id": "10154261929867164",
        "created_at": "2026-01-15T14:30:00+00:00",
        "message_text": "Amazing photos!",
        "comment_url": "https://www.facebook.com/...",
        "author_name": "John Doe",
        "author_id": "123456789",
        "reaction_count": 5,
        "reply_count": 2
      }
    ]
  },
  "album_request_details": {
    "source_type": "profile",
    "requested_albums": 100,
    "available_albums": 30,
    "available_albums_is_exact": true,
    "returned_albums": 30,
    "request_fulfilled": false,
    "unique_album_rows_only": true,
    "message": "You requested 100 unique albums, but this profile only exposes 30 public albums. All 30 available albums were scraped without duplicates.",
    "tip": "max_albums_per_profile controls how many unique albums are requested per profile. When the profile exposes fewer public albums, the actor stops at the available count."
  }
}
````

### 🎯 Use Cases

- 📊 **Content auditing** — inventory all albums on competitor pages with engagement metrics
- 📸 **Photo cataloging** — extract photos from specific albums with descriptions
- 💬 **Community analysis** — scrape album comments for sentiment analysis
- 🔍 **Album monitoring** — track new albums and photos added to profiles
- 🛡️ **Media research** — catalog album sizes, types, and cover images at scale
- 📈 **Brand asset tracking** — monitor album changes on brand pages with reactions
- 🎯 **Digital archiving** — build complete album catalogs with photos for research
- 📢 **Reporting** — generate album inventory reports with engagement data

### 💡 Tips & Best Practices

- ✅ **Use usernames** for cleaner input — e.g., `Cristiano` instead of a full URL.
- 💰 **Set `max_albums_per_profile`** to control how many albums per profile you retrieve. The default (10) covers many use cases. If you set it higher than the actual count, the scraper stops at the actual count and shows a helpful tip.
- 📸 **Enable photos selectively** — turn on "Include photos per album" only when you need individual photo URLs. It adds cost per photo.
- 💬 **Comment filters** — `newest` usually changes the ordering. `all_comments` requests the broadest public view Facebook exposes, but on some albums Facebook can still return the same comment set as `most_relevant`.
- 🔗 **Direct album links** — paste direct album URLs to scrape specific albums without needing the profile URL. Remember to turn on the toggle.
- 🔧 **Budget cap** — always set a Maximum Cost Per Run, especially when photos and comments are enabled.
- 📌 **Combine sources** — mix usernames, profile URLs, and direct album links in one run.

### ❓ Frequently Asked Questions

**Q: What happens if I request 100 albums but the profile only has 30?**
A: The **Facebook Albums Scraper** stops at 30. It does NOT create duplicate albums to reach 100. Each album row includes `album_request_details` showing how many albums you requested, how many were returned, whether the available count is exact, and that the actor only returns unique albums.

**Q: Can this scraper download individual photos from albums?**
A: Yes. Turn on "Include photos per album" and set your `photos_per_album` limit. That limit applies to every album source in the **Facebook Albums Scraper**: usernames, profile/page URLs, and direct album links.

**Q: Does this scraper support album comments?**
A: Yes. Turn on "Include album comments" and choose your comment filter (`most_relevant`, `newest`, `all_comments`). Comments appear nested under each album row together with exact requested-vs-returned diagnostics. If Facebook exposes no public album-comment surface, the output is marked as a verified zero-comment case. We charge a flat fee for selecting `newest` or `all_comments`.

**Q: What do the comment filters actually change?**
A: `newest` usually changes the comment order and often returns a different first page than `most_relevant`. `all_comments` asks Facebook for the broadest public album-comment view it exposes, but Facebook can still return the same visible set as `most_relevant` on some albums. The output always records which filter was requested.

**Q: How do direct album links work?**
A: Paste links like `https://www.facebook.com/media/set/?set=a.322648365888377&type=3` into `facebook_urls` and turn on "Include direct album". When that toggle is off, the **Facebook Albums Scraper** skips direct album links and logs why they were ignored.

**Q: Does this scraper require login?**
A: No. This scraper only accesses publicly visible album data. No login or session tokens are required.

**Q: Can I scrape albums from personal profiles?**
A: Only public albums. If a profile restricts their albums to friends-only, those albums will not appear.

**Q: What happens if an error occurs during scraping?**
A: The scraper is designed to exit cleanly without failing the entire run. It safely catches access errors or network timeouts, logs the issue, and moves to the next item so you never lose the data already collected.

**Q: What happens when the budget limit is reached?**
A: The scraper stops gracefully and delivers all album rows collected so far. You are never charged beyond your set limit.

### 🔌 Integration Ideas

- 📊 Export album data with engagement metrics to Google Sheets for team review.
- 🔗 Feed album cover images and photos into a brand-asset management tool.
- ⏰ Schedule daily runs to track new albums and photos across monitored pages.
- 🔄 Combine with the Page Transparency Scraper for a full Facebook page audit.
- 💾 Connect via Apify integrations to Slack, Zapier, or Make for automated album monitoring.
- 🤖 Store album data in a database for historical trend analysis.

### 🔒 Privacy & Compliance

This Facebook albums scraper only accesses publicly visible album data. No authentication is required. The actor does not bypass any access controls. All internal tokens and proxy connection data are redacted from logs. Users are responsible for ensuring their use of album data complies with applicable laws and Facebook's terms of service.

# Actor input Schema

## `username` (type: `array`):

Facebook usernames like Cristiano or nike.

## `facebook_urls` (type: `array`):

Facebook Page/Profile URLs or direct album links (e.g. https://www.facebook.com/media/set/?set=a.322648365888377\&type=3). Direct album links require 'Include direct album' to be turned on.

## `max_albums_per_profile` (type: `integer`):

Maximum number of unique albums to collect for each profile/page. This limit never creates duplicate albums. If you request more than the profile exposes publicly, the actor stops at the available album count and reports requested vs returned counts in logs and output.

## `include_direct_album` (type: `boolean`):

Turn on to scrape direct album links like https://www.facebook.com/media/set/?set=a.XXX\&type=3. Each direct album link costs extra. When off, direct album links in the input are skipped with a clear log message.

## `include_album_photos` (type: `boolean`):

Turn on to scrape individual photos from each album. Photos appear as a nested list under their source album row. Costs extra per returned photo.

## `photos_per_album` (type: `integer`):

How many photos to scrape from each album when 'Include photos per album' is turned on. This limit applies to every album source: usernames, profile/page URLs, and direct album links.

## `include_album_comments` (type: `boolean`):

Turn on to scrape public comments for each album when Facebook exposes them. Comments appear as a nested list under each album row. Some albums do not expose public comments.

## `comments_limit` (type: `integer`):

How many public top-level comments to scrape from each album when 'Include album comments' is turned on.

## `comment_filter` (type: `string`):

Comment filter mode for album comments. newest and all\_comments cost extra per album. The actor only returns comments for albums where Facebook exposes public comments for the selected filter.

## Actor input object example

```json
{
  "username": [
    "leomessi"
  ],
  "facebook_urls": [
    {
      "url": "https://www.facebook.com/Cristiano/"
    }
  ],
  "max_albums_per_profile": 10,
  "include_direct_album": false,
  "include_album_photos": false,
  "photos_per_album": 10,
  "include_album_comments": false,
  "comments_limit": 10,
  "comment_filter": "most_relevant"
}
```

# 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 = {
    "username": [
        "leomessi"
    ],
    "facebook_urls": [
        {
            "url": "https://www.facebook.com/Cristiano/"
        }
    ],
    "max_albums_per_profile": 10,
    "photos_per_album": 10,
    "comments_limit": 10,
    "comment_filter": "most_relevant"
};

// Run the Actor and wait for it to finish
const run = await client.actor("premiumscraper/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 = {
    "username": ["leomessi"],
    "facebook_urls": [{ "url": "https://www.facebook.com/Cristiano/" }],
    "max_albums_per_profile": 10,
    "photos_per_album": 10,
    "comments_limit": 10,
    "comment_filter": "most_relevant",
}

# Run the Actor and wait for it to finish
run = client.actor("premiumscraper/facebook-albums-scraper").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 '{
  "username": [
    "leomessi"
  ],
  "facebook_urls": [
    {
      "url": "https://www.facebook.com/Cristiano/"
    }
  ],
  "max_albums_per_profile": 10,
  "photos_per_album": 10,
  "comments_limit": 10,
  "comment_filter": "most_relevant"
}' |
apify call premiumscraper/facebook-albums-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Facebook Albums Scraper⚡",
        "description": "Scrape Facebook albums from Pages, Profiles, or direct album links. Output includes: album title, item count, cover image, description, engagement (reactions/comments/shares), owner details, nested photos per album, and album comments with filter support. One row per album ✨ Facebook Albums Scraper⚡",
        "version": "1.0",
        "x-build-id": "qgqLj5CvKIIaVRZ8y"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/premiumscraper~facebook-albums-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-premiumscraper-facebook-albums-scraper",
                "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/premiumscraper~facebook-albums-scraper/runs": {
            "post": {
                "operationId": "runs-sync-premiumscraper-facebook-albums-scraper",
                "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/premiumscraper~facebook-albums-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-premiumscraper-facebook-albums-scraper",
                "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",
                "properties": {
                    "username": {
                        "title": "Facebook usernames",
                        "type": "array",
                        "description": "Facebook usernames like Cristiano or nike.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "facebook_urls": {
                        "title": "Facebook profile/page URLs or direct album links",
                        "type": "array",
                        "description": "Facebook Page/Profile URLs or direct album links (e.g. https://www.facebook.com/media/set/?set=a.322648365888377&type=3). Direct album links require 'Include direct album' to be turned on.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "max_albums_per_profile": {
                        "title": "Albums per profile limit",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of unique albums to collect for each profile/page. This limit never creates duplicate albums. If you request more than the profile exposes publicly, the actor stops at the available album count and reports requested vs returned counts in logs and output.",
                        "default": 10
                    },
                    "include_direct_album": {
                        "title": "Include direct album",
                        "type": "boolean",
                        "description": "Turn on to scrape direct album links like https://www.facebook.com/media/set/?set=a.XXX&type=3. Each direct album link costs extra. When off, direct album links in the input are skipped with a clear log message.",
                        "default": false
                    },
                    "include_album_photos": {
                        "title": "Include photos per album",
                        "type": "boolean",
                        "description": "Turn on to scrape individual photos from each album. Photos appear as a nested list under their source album row. Costs extra per returned photo.",
                        "default": false
                    },
                    "photos_per_album": {
                        "title": "Photos per album limit",
                        "minimum": 1,
                        "type": "integer",
                        "description": "How many photos to scrape from each album when 'Include photos per album' is turned on. This limit applies to every album source: usernames, profile/page URLs, and direct album links.",
                        "default": 10
                    },
                    "include_album_comments": {
                        "title": "Include album comments",
                        "type": "boolean",
                        "description": "Turn on to scrape public comments for each album when Facebook exposes them. Comments appear as a nested list under each album row. Some albums do not expose public comments.",
                        "default": false
                    },
                    "comments_limit": {
                        "title": "Comments per album limit",
                        "minimum": 1,
                        "type": "integer",
                        "description": "How many public top-level comments to scrape from each album when 'Include album comments' is turned on.",
                        "default": 10
                    },
                    "comment_filter": {
                        "title": "Comment ordering",
                        "enum": [
                            "most_relevant",
                            "newest",
                            "all_comments"
                        ],
                        "type": "string",
                        "description": "Comment filter mode for album comments. newest and all_comments cost extra per album. The actor only returns comments for albums where Facebook exposes public comments for the selected filter.",
                        "default": "most_relevant"
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
