# Facebook Photo API

Get one public Facebook photo by fbid or permalink: AI alt text, creation time, owner name and page id, full-resolution image URI, container post id, per-type reaction counts and the next photo id. Photo detail renders no OpenGraph properties, so the data comes from the structured document rather than from page metadata.

- **Documentation:** [https://scrappa.co/docs/facebook-api/facebook_photo](https://scrappa.co/docs/facebook-api/facebook_photo)
- **API group:** Facebook API
- **Endpoint:** `GET https://scrappa.co/api/facebook/photo`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `photo` | string | Yes | Photo fbid, or a full photo permalink. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/facebook/photo?photo=1644708703691166"
```

## Example response

```json
{
    "success": true,
    "photo": {
        "id": "1644708703691166",
        "accessibility_caption": "A rocket launching at sunrise over the Kennedy Space Center",
        "created_time": 1790872565,
        "owner_name": "NASA - Official Site",
        "page_id": "110966435892128",
        "image": {
            "uri": "https://...",
            "width": 2048,
            "height": 1365
        },
        "container_post_id": "1234567890",
        "reactions": {
            "total": 8421,
            "by_type": {
                "like": 8000,
                "love": 400,
                "wow": 21
            },
            "share_count": 0
        },
        "next_photo_id": "1644708687024501"
    },
    "meta": {
        "classification": "ok",
        "billable": true,
        "endpoint_family": "facebook_photo",
        "duration_ms": 4800
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A required parameter is missing or malformed, for example a handle with characters Facebook does not allow or a non-numeric id. |
| 404 | Not Found | The page, profile, group, event, photo, reel, post or listing does not exist, is not public, or was served by Facebook without the requested record. This is the truthful answer, not a temporary fault: it is never billed and retrying the same permalink will not change it. |
| 503 | Records Not Read | Facebook returned records for this request that the parser could not read. The origin status is 502 and it is reported here as 503 because Cloudflare replaces 502 and 504 bodies with its own page. This request is never billed: the customer received no data. |
| 503 | Temporarily Unavailable | The upstream service is temporarily unavailable. Please retry shortly. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
