> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mindcase.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Facebook Photos API

> Get Facebook photos with photo url, image url, caption, alt text, posted at, reactions, by urls.

`POST /v1/data/facebook/photos/run`

**Pricing:** $0.0035 per photo ($3.50 per 1,000).

## Request

Send the inputs under `params`. Only the keys below are accepted; any other key returns `422 invalid_params`.

**urls** `string[]` *required*

One or more urls. One request reads them all.

**maxResults** `integer` (default: 100)

How many photos to return in total. Defaults to 100; use 0 for all.

**onlyPhotosNewerThan** `date`

Only Photos Newer Than as a date (YYYY-MM-DD).

**onlyPhotosOlderThan** `date`

Only Photos Older Than as a date (YYYY-MM-DD).

## Example

```bash cURL theme={null}
curl -X POST "https://api.mindcase.co/v1/data/facebook/photos/run?wait=true" \
  -H "Authorization: Bearer $MINDCASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "params": {
    "urls": [
      "https://www.facebook.com/humansofnewyork",
      "https://www.facebook.com/lemonde.fr",
      "https://www.facebook.com/amul.coop"
    ],
    "maxResults": 10
  }
}'
```

```python Python theme={null}
import os, requests

r = requests.post(
    "https://api.mindcase.co/v1/data/facebook/photos/run",
    params={"wait": "true"},
    headers={"Authorization": f"Bearer {os.environ['MINDCASE_API_KEY']}"},
    json={"params": {
    "urls": [
        "https://www.facebook.com/humansofnewyork",
        "https://www.facebook.com/lemonde.fr",
        "https://www.facebook.com/amul.coop"
    ],
    "maxResults": 10
}},
)
job = r.json()
rows = job.get("data", [])  # if job["status"] == "running", poll /v1/jobs/{job_id}/results
```

```javascript Node.js theme={null}
const r = await fetch("https://api.mindcase.co/v1/data/facebook/photos/run?wait=true", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MINDCASE_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ params: {
  "urls": [
    "https://www.facebook.com/humansofnewyork",
    "https://www.facebook.com/lemonde.fr",
    "https://www.facebook.com/amul.coop"
  ],
  "maxResults": 10
} }),
});
const job = await r.json();
const rows = job.data ?? []; // if job.status === "running", poll /v1/jobs/{job_id}/results
```

## Response fields

Each row in `data` is one photo, keyed by these fields.

| Field | Name | Type |
| - | - | - |
| `photoId` | Photo ID | text |
| `photoUrl` | Photo URL | url |
| `imageUrl` | Image URL | url |
| `caption` | Caption | text |
| `altText` | Alt Text | text |
| `postedAt` | Posted At | datetime |
| `reactions` | Reactions | number |
| `comments` | Comments | number |
| `shares` | Shares | number |
| `reactionBreakdown` | Reaction Breakdown | object |
| `width` | Width | number |
| `height` | Height | number |
| `postId` | Post ID | text |
| `postUrl` | Post URL | url |
| `albumId` | Album ID | text |
| `page` | Page | object |

## Example response

Abridged: long text and lists are shortened.

```json theme={null}
{
  "job_id": "7f3a1c2e-0b9d-4c55-9a51-3f2e8d1b6a40",
  "agent": "facebook/photos",
  "status": "completed",
  "row_count": 1,
  "truncated": false,
  "data": [
    {
      "photoUrl": "https://www.facebook.com/photo/?fbid=1674631467561169",
      "reactionBreakdown": {
        "like": 4060,
        "love": 1850,
        "care": 69,
        "haha": 1,
        "wow": 5,
        "sad": 2,
        "angry": 0
      },
      "page": {
        "id": "100050429952420",
        "name": "Humans of New York",
        "url": "https://www.facebook.com/humansofnewyork",
        "followers": 17037782
      },
      "postedAt": "2026-10-13T15:34:06.000Z",
      "altText": "May be an image of child and text",
      "photoId": "1674631467561169",
      "shares": 111,
      "postUrl": "https://www.facebook.com/humansofnewyork/posts/pfbid02o7sXr5DEik3z71LVwoXW3NamCJraGwrg2yGUt5kGttrQ1do26Nixe3dPMbEg45YUl",
      "albumId": "755664696124522",
      "imageUrl": "https://scontent-iad3-1.xx.fbcdn.net/v/t39.99422-6/846467687_1626254438940479_4082321713543477890_n.png?stp=dst-jpg_tt6&cstp=mx2048x1365&ctp=s2048x1365&_nc_c...",
      "comments": 238,
      "reactions": 5987,
      "height": 1365,
      "width": 2048,
      "postId": "1674632237561092",
      "caption": "Last year I got an email that Little Humans was going out of print. It was a sad email to receive, because while not exactly a ‘money maker,’ Little Humans h..."
    }
  ]
}
```

## Related APIs

For posts and reels use [`facebook/posts`](https://docs.mindcase.co/apis/facebook/posts).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.