# Facebook Photos Scraper (`datahamster/facebook-photos-scraper`) Actor

Facebook photos scraper for public business Pages and albums: full-size image URL with width and height, alt text, photo id and link, Page and album name. Upload date range filter, no login. Monitor mode returns only new photos.

- **URL**: https://apify.com/datahamster/facebook-photos-scraper.md
- **Developed by:** [Viktor Dubnytskiy](https://apify.com/datahamster) (community)
- **Categories:** Social media, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 result items

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/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 Photos Scraper

Get the photos of any public Facebook business Page or album as rows: the **full-size image URL with its width and height**, the photo id and a clean photo link, the alt text (the Page's own description or Facebook's automatic one), and the Page and album name. Paste Page links or handles, optionally an upload-date range, and run. No login, no cookies.

**Try it:** the prefilled example returns 20 rows in about 10 seconds and costs about $0.043. Results cost $2.10 per 1,000.

Coverage: business Pages and their albums, as Facebook shows them to a logged-out visitor. Personal profiles are skipped (no rows, nothing charged). Facebook serves no upload date and no post text on these pages, so rows have no date field; use the date range filter instead.

### Why this one

Compared with the most-used Facebook photos actor in the Store (apify/facebook-photos-scraper, checked 2026-11-05: its input is a list of URLs and a result limit, its README sample rows carry a 206 x 206 px image link, an alt-text field and the photo URL):

- **Full-size images with dimensions.** `imageUrl` is the largest rendition Facebook serves (2000 x 1385 px for the first NASA photo of the smoke run, up to 2048 px), with `width` and `height`; the 552 px grid thumbnail is in `thumbnailUrl`. The leader's sample rows carry a 206 x 206 px crop and no size.
- **Upload-date range.** `uploadedAfter` / `uploadedBefore` (YYYY-MM-DD, or "30 days") go straight into Facebook's own upload-date filter of the Photos tab, so you pay only for photos inside the range. Measured 2026-11-05: NASA for 2025 returned 40 photos over 5 requests, a range in the year 2000 returns none. The leader has no date input.
- **New-photo alerts.** Monitor mode returns only photos the Page added since the last run, optionally to a webhook or Telegram. Measured: a 16-photo baseline of NASA, then a run with one photo unknown to the state returned exactly that one row. The leader has no monitor mode.
- **Albums by link, with the album name.** `albumUrls` reads one album (for example a Page's "Cover photos"), every row carries `albumName` and `albumId`. The leader documents Page/profile URLs only and returns no album name.
- **Price:** $2.10 per 1,000 photos: 30% below the leader on the FREE, BRONZE and SILVER plans and slightly below it on GOLD ($1.00 vs $1.10 per 1,000); on PLATINUM and DIAMOND the leader is cheaper.

### What you get

One row per photo: `id`, `photoId`, `url`, `imageUrl`, `width`, `height`, `originalWidth`, `originalHeight`, `thumbnailUrl`, `altText`, `altTextGenerated`, `pageId`, `pageName`, `pageUrl`, `albumId`, `albumName`, `albumUrl`, `position`, `source`, `inputUrl`, `scrapedAt`.

Sample rows from the smoke runs of 2026-11-05:

| `pageName` | `albumName` | `width` x `height` | `altText` |
|---|---|---|---|
| NASA - National Aeronautics and Space Administration | | 2000 x 1385 | An intricate cloud of white dust takes center stage in this photo, rising in a windy pillar. ... |
| NASA - National Aeronautics and Space Administration | | 1920 x 1280 | Three jet aircraft, each with a white nose and blue body, fly in a triangle formation ... |
| The Copper Kettle Restaurant | | 1080 x 1350 | May be an image of text |
| NASA - National Aeronautics and Space Administration | Cover photos | 843 x 562 (original 2048 x 1365) | ... |

One full row:

```json
{
  "id": "1675983760563660",
  "url": "https://www.facebook.com/photo/?fbid=1675983760563660",
  "photoId": "1675983760563660",
  "imageUrl": "https://scontent-atl3-2.xx.fbcdn.net/v/t39.99422-6/871223884_..._n.png?stp=dst-jpg_tt6&cstp=mx2000x1385&ctp=s2000x1385&...",
  "width": 2000,
  "height": 1385,
  "originalWidth": 2000,
  "originalHeight": 1385,
  "thumbnailUrl": "https://scontent-atl3-2.xx.fbcdn.net/v/t39.99422-6/871223884_..._n.png?stp=c308.0.1385.1385a_dst-jpg_tt6&...&ctp=s552x414&...",
  "altText": "An intricate cloud of white dust takes center stage in this photo, rising in a windy pillar. The background features rust-colored dust with dots of distant stars and galaxies shining through.",
  "altTextGenerated": false,
  "pageId": "100044561550831",
  "pageName": "NASA - National Aeronautics and Space Administration",
  "pageUrl": "https://www.facebook.com/NASA",
  "albumId": null,
  "albumName": null,
  "albumUrl": null,
  "position": 1,
  "source": "photos",
  "inputUrl": "https://www.facebook.com/NASA",
  "scrapedAt": "2026-11-05T22:11:16.851966Z"
}
```

- `position` is the photo's place in Facebook's order for that Page or album (newest first on the Photos tab and in albums; inside a date range Facebook's own order, mostly newest first).
- `altTextGenerated` is true for Facebook's automatic text ("May be an image of food"); false means the Page wrote it.
- Album rows: Facebook's album grid serves an 843 px wide image, so `width`/`height` describe that file and `originalWidth`/`originalHeight` the full photo. For full-size files, read the Page itself.
- The image links are signed by Facebook and expire after some days; download the files soon after the run.

### Use cases

- **Brand and competitor visual monitoring.** Run competitors' Pages daily in monitor mode and get every new photo they post.
- **Image datasets.** Full-size images with dimensions and alt text for research, catalogues or model training on public brand content.
- **Archiving a campaign.** A date range pulls exactly the photos of one month or event.
- **Accessibility audits.** `altTextGenerated` shows which Pages write their own image descriptions.

### Related actors

- [Facebook Pages Search](https://apify.com/datahamster/facebook-pages-search): find business Pages by keyword, with contacts and followers.
- [Facebook Events Scraper](https://apify.com/datahamster/facebook-events-scraper): public events of the same Pages.
- [Facebook Reels Scraper](https://apify.com/datahamster/facebook-reels-videos): a Page's reels with exact view counts.
- [Facebook Groups Search](https://apify.com/datahamster/facebook-groups-search): find public groups by keyword.

### Input

| Field | Meaning | Default |
|---|---|---|
| `pageUrls` | Page links or handles (`https://www.facebook.com/NASA`, `NASA`, `profile.php?id=…`) | `NASA` (prefill) |
| `albumUrls` | Album links (`facebook.com/media/set/?set=a.<id>`) | empty |
| `maxPhotosPerPage` | Photos per Page or album | `40` |
| `uploadedAfter`, `uploadedBefore` | Upload-date range, YYYY-MM-DD or "30 days" (Photos tab only, scrape mode only) | empty |
| `maxItems` | Stop after this many rows | `100` |
| `mode` | `scrape`, or `monitor` for new photos only | `scrape` |
| `monitorStateId`, `webhookUrl`, `telegramBotToken`, `telegramChatId` | Monitor state key and alert targets | empty |

**Monitor mode** keys each photo on its id. The first run of a Page (or album) records what it reads and returns nothing (a baseline). Later runs return only photos never seen before (`changeType: "new"`), and you pay only for those rows plus one monitor check per run. Photos tabs and albums list the newest photo first, so a run reads from the top and stops at the first photo it already knows: a daily run usually costs one request per Page or album. `uploadedAfter` / `uploadedBefore` cannot be used in monitor mode (the run ends with `invalid_input` and nothing is charged). Changing `maxPhotosPerPage` starts a new baseline. If a monitor run crashes, the next runs of the same state wait until that run's timeout has passed (`emptyReason: overlapping_run`); use a new `monitorStateId` to start over at once.

### Pricing

| Event | Price |
|---|---|
| result | $0.0021 per photo ($2.10 per 1,000) |
| monitor-check | $0.005 per monitor run |
| change | $0.0021 per new photo in monitor mode |

Paid Apify plans pay less per photo: BRONZE $0.0014, SILVER $0.00112, GOLD and above $0.001. You are charged only for rows actually pushed; a blocked run or a personal profile charges nothing. Platform usage (datacenter proxy, about $0.0004 for the 20-row example) is billed to your account at Apify's rate.

**Found it useful?** A quick review on the Store page helps others find this actor and tells us what to improve.

### Limits

- Business Pages only. A personal profile's photos are never returned; the run log and `PHOTOS_SUMMARY.personalProfilesSkipped` say which links were skipped.
- No upload date, likes, comments or post text: Facebook does not show them on the photo grid to logged-out visitors.
- The upload-date filter works on the Photos tab, not on album links.
- An album link with a wrong id gets the same empty answer from Facebook as a blocked request, so it is reported as `blocked` rather than "no photos".
- Facebook can refuse the next page of a long read; the photos already read are kept and `PHOTOS_SUMMARY.truncated` says where it stopped.

### What is NOT collected

No personal data. Only business Pages are read. People recognised or tagged in a photo are never named: in Facebook's automatic alt text ("May be an image of 2 people, Jane Doe and text") the people list and every capitalised or non-Latin word outside the quoted text read from the image become `[person]`, and e-mail addresses and phone numbers are removed from every alt text. Tags, comments, reactions and uploader lists are never read, and photo links carry no tracking or owner parts.

### FAQ

**Why did a run return nothing?** `RUN_SUMMARY` in the run's key-value store has `emptyReason`; `PHOTOS_SUMMARY` lists each source's state (ok, profile, unavailable, wall).

**Can I get the photos of a person?** No. The actor is for business Pages only.

### Changelog

- 0.1: initial release: Photos tab and album links, full-size image URL with dimensions, alt text with names masked, upload-date range, monitor mode for new photos.

# Actor input Schema

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

Stop after this many photo rows (you are charged only for pushed rows)

## `mode` (type: `string`):

scrape = full results; monitor = only new/changed items since the previous run of this task

## `monitorStateId` (type: `string`):

Optional state id when not running as a saved task (monitor mode)

## `webhookUrl` (type: `string`):

POST a change summary here in monitor mode

## `telegramBotToken` (type: `string`):

Optional: bot token for monitor-mode change summaries

## `telegramChatId` (type: `string`):

Optional: chat id that receives monitor-mode summaries

## `pageUrls` (type: `array`):

Links or handles of Facebook business Pages, such as https://www.facebook.com/NASA or NASA, one per line. The actor reads the Page's Photos tab, newest first. Personal profiles are skipped (no rows, nothing charged).

## `albumUrls` (type: `array`):

Optional. Links to albums of business Pages, such as https://www.facebook.com/media/set/?set=a.416661013162614 (open an album on the Page's Photos > Albums tab and copy the link). Rows carry the album name.

## `maxPhotosPerPage` (type: `integer`):

Stop reading one Page or album after this many photos. Facebook serves 8 photos per request.

## `uploadedAfter` (type: `string`):

Optional. Only photos uploaded on or after this day: YYYY-MM-DD, or a relative period such as 30 days. Uses Facebook's own upload-date filter of the Photos tab (not applied to album links). Not available in monitor mode.

## `uploadedBefore` (type: `string`):

Optional. Only photos uploaded on or before this day (YYYY-MM-DD). Photos tab only.

## Actor input object example

```json
{
  "maxItems": 20,
  "mode": "scrape",
  "pageUrls": [
    "https://www.facebook.com/NASA"
  ],
  "maxPhotosPerPage": 20
}
```

# Actor output Schema

## `results` (type: `string`):

All pushed rows (dataset, JSON)

## `resultsTable` (type: `string`):

Dataset in the Console viewer

## `runSummary` (type: `string`):

RUN_SUMMARY record

# 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 = {
    "maxItems": 20,
    "pageUrls": [
        "https://www.facebook.com/NASA"
    ],
    "maxPhotosPerPage": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("datahamster/facebook-photos-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 = {
    "maxItems": 20,
    "pageUrls": ["https://www.facebook.com/NASA"],
    "maxPhotosPerPage": 20,
}

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

```

## MCP server setup

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