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

Facebook photos scraper: pages, albums or photo links in; every photo with its full-size image link, width and height, post caption, likes, comments, shares, date and alt text. $0.99 per 1,000 photos on Starter, 2x cheaper than the most-used Facebook photos scraper. No login.

- **URL**: https://apify.com/deepmine/facebook-photos-scraper.md
- **Developed by:** [DeepMine](https://apify.com/deepmine) (community)
- **Categories:** Social media, Automation
- **Features:** Limited permissions
- **Stats:** 12 total users, 7 monthly users, 93.8% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.69 / 1,000 photos

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 Photos Scraper: Page & Album Photos

Paste Facebook pages and get every photo they posted, newest first, or paste album links and get just that album's photos: the **full-size image link with its width and
height**, the **post caption**, **likes, comments and shares**, the **date**, Facebook's alt text, and links to the
photo and its post. No login, no cookies, no browser.

### What you get for each photo

| Field | Example |
|---|---|
| `pageName` | National Geographic |
| `photoUrl` | https://www.facebook.com/photo.php?fbid=1710246410472782&... |
| `imageUrl` | full-size JPEG on Facebook's CDN |
| `width` / `height` | 1536 / 2048 |
| `caption` | A yellow-legged gull stands alongside its painted counterpart in Rome... |
| `likes` / `comments` / `shares` | 540 / 17 / 24 |
| `postedAt` | 2026-11-03T11:00:00Z |
| `ocrText` | May be an image of sea bird and text |
| `photoId`, `postId`, `postUrl`, `thumbnailUrl`, `timestamp`, `pageId`, `pageUrl` | ids and links |

The row also carries the keys other Facebook photo scrapers return (`id`, `image`, `url`, `dataType`, `facebookUrl`,
`facebookId`, `pageAdLibrary`, `inputUrl`), so existing pipelines keep working.

```json
{
  "pageName": "National Geographic",
  "photoUrl": "https://www.facebook.com/photo.php?fbid=1710246410472782&set=pb.100044623170418.-2207520000&type=3",
  "imageUrl": "https://scontent-dfw5-1.xx.fbcdn.net/v/t39.99422-6/872142523_..._n.png?stp=dst-jpg_tt6&...",
  "width": 1536,
  "height": 2048,
  "caption": "A yellow-legged gull stands alongside its painted counterpart in Rome. ...",
  "likes": 540,
  "comments": 17,
  "postedAt": "2026-11-03T11:00:00Z",
  "shares": 24,
  "ocrText": "May be an image of sea bird and text",
  "photoId": "1710246410472782",
  "postId": "1710246423806114",
  "postUrl": "https://www.facebook.com/natgeo/posts/pfbid0jrPrTNZix5UN6cD72KkaXyvQsS8pLEJyXAVm8bv9dzYYTn3C8LTFiAjdtWQjj1Gnl",
  "pageId": "100044623170418",
  "dataType": "photo",
  "pageAdLibrary": { "id": "23497828950" }
}
```

### Input

| Field | What it does |
|---|---|
| `startUrls` | Page links (`https://www.facebook.com/natgeo`), page names (`natgeo`), `profile.php?id=` links, album links (`https://www.facebook.com/media/set/?set=a.528642321966536`), or single photo links (`photo.php?fbid=...`). |
| `resultsLimit` | The most photos per page or album (default 50). |
| `onlyPhotosNewerThan` | Skip older photos: a date (`2026-10-01`) or a relative time (`7 days`, `3 months`). |

```json
{
  "startUrls": [{ "url": "https://www.facebook.com/natgeo" }, { "url": "https://www.facebook.com/NASA" }],
  "resultsLimit": 50
}
```

### Pricing

You pay per photo returned, with no start fee. Each photo is charged once per run, even when two links lead to it.
Pages that fail, and photos skipped by the date filter, are free. The run stops at your spending limit.

### How it works

The scraper asks Facebook's own page API for the page's Photos tab, 8 photos a call, and reads each photo's details by
its id; an album link is read through the album's own photo grid, so it returns that album's photos only, in the album's order. It doesn't load the page and runs no browser, so a run of 100 photos takes seconds. It works logged out,
so only public pages and photos are reachable: a page that is age-gated or restricted for logged-out visitors gives
no photos, and so does an album that is removed or private, or that belongs to a personal profile. The run summary (the `OUTPUT` record) says so for each link, with each album's title and photo count. Other photo set links (a post's photo set, `set=pcb.` or `set=pb.`) are skipped with a note: paste the album, page or photo link instead.

Image links are Facebook CDN links and expire after a few days: download the images soon after the run if you need
the files.

### Other Facebook scrapers

- Facebook Posts Scraper: every post of a page with its text, media and counts.
- Facebook Reels Scraper: a page's reels with exact plays.
- Facebook Comments Scraper, Facebook Pages Scraper, Facebook Video Downloader.

# Actor input Schema

## `startUrls` (type: `array`):

Page links (https://www.facebook.com/natgeo), page names (natgeo), profile.php?id= links, album links (media/set/?set=a.<id>), or single photo links (photo.php?fbid=...). Public pages only: no login is used.

## `resultsLimit` (type: `integer`):

The most photos to return for each page (newest first) or album (in the album's order). You pay only for photos returned.

## `onlyPhotosNewerThan` (type: `string`):

Skip photos posted before this date: a date (2026-10-01) or a relative time (7 days, 2 weeks, 3 months, 1 year). Leave empty for all photos.

## `proxyConfiguration` (type: `object`):

Apify Proxy; datacenter works for public pages. Leave as is.

## `residentialFallback` (type: `boolean`):

Ask a call again on residential proxy when every datacenter IP is refused.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.facebook.com/natgeo"
    },
    {
      "url": "https://www.facebook.com/NASA"
    }
  ],
  "resultsLimit": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "residentialFallback": true
}
```

# Actor output Schema

## `photos` (type: `string`):

No description

## `summary` (type: `string`):

No description

# 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 = {
    "startUrls": [
        {
            "url": "https://www.facebook.com/natgeo"
        },
        {
            "url": "https://www.facebook.com/NASA"
        }
    ],
    "resultsLimit": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("deepmine/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 = {
    "startUrls": [
        { "url": "https://www.facebook.com/natgeo" },
        { "url": "https://www.facebook.com/NASA" },
    ],
    "resultsLimit": 50,
}

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

```

## MCP server setup

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