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

# Facebook Post

> Sell facebook.post on AnyAPI: the request your endpoint receives, the response it must return, and what the live trial grades.

Fetch a single Facebook post by URL with its text and engagement counts (likes, comments, shares, views).

This page is the seller-facing summary of one catalog API, `facebook.post`. The transport rules that apply to every API a seller serves - signed requests, the response envelope, timeouts, and body limits - are on [the operator endpoint contract](https://getanyapi.com/docs/sell/operator-endpoint-contract.md).

## The price you compete with

AnyAPI publishes this API from **\$1.20 per 1,000 requests**. That is the price a buyer sees today, so it is the price your endpoint has to come in under to win traffic.

## The request your endpoint receives

| Field | Type | Required | What it means |
| - | - | - | - |
| `requireFields` | array | no | Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `videoId` or `views`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a post that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge. |
| `url` | string | yes | Full Facebook post URL. |

> **Full input JSON Schema**
>
> ```json theme={"dark"}
> {
>   "$schema": "https://json-schema.org/draft/2020-12/schema",
>   "$id": "https://getanyapi.com/schemas/facebook.post.input.json",
>   "example": {
>     "url": "https://www.facebook.com/reel/2166091230582141/"
>   },
>   "title": "Facebook post input",
>   "type": "object",
>   "additionalProperties": false,
>   "required": [
>     "url"
>   ],
>   "properties": {
>     "url": {
>       "type": "string",
>       "description": "Full Facebook post URL."
>     },
>     "requireFields": {
>       "type": "array",
>       "uniqueItems": true,
>       "items": {
>         "type": "string",
>         "enum": [
>           "authorVerified",
>           "feedbackId",
>           "reactions",
>           "videoId",
>           "videoUrl",
>           "views"
>         ]
>       },
>       "description": "Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `videoId` or `views`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a post that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge."
>     }
>   }
> }
> ```

## The response your endpoint must return

| Field | Type | Always present | What it means |
| - | - | - | - |
| `data` | null or object | yes | |
| `data.authorId` | string | no | Numeric Facebook id of the page or profile that posted. |
| `data.authorImage` | string | no | Profile picture URL of the page or profile that posted. |
| `data.authorName` | string | no | Display name of the page or profile that posted. |
| `data.authorVerified` | boolean | no | Whether the posting page or profile carries a Facebook verification badge. |
| `data.comments` | integer | yes | |
| `data.createdUtc` | number | no | UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. |
| `data.durationSeconds` | number | no | Length of the post's video in seconds, 0 when the post carries no video. |
| `data.feedbackId` | string or null | no | Facebook feedback id of the post; pass it to facebook.post\_comments as feedbackId to fetch its comments. Null when this source cannot read it. |
| `data.id` | string | yes | Facebook post id. For a reel or video post this is NOT the id in the /reel/ URL; that one is videoId. |
| `data.image` | string | no | Preview image or video thumbnail URL for the post. |
| `data.likes` | integer | yes | |
| `data.reactions` | object or null | no | Reaction counts on the post, broken down by reaction type. Null when this source reports only the total. |
| `data.reactions.angry` | integer | no | Angry reactions. |
| `data.reactions.care` | integer | no | Care reactions. |
| `data.reactions.haha` | integer | no | Haha reactions. |
| `data.reactions.like` | integer | no | Like reactions. |
| `data.reactions.love` | integer | no | Love reactions. |
| `data.reactions.sad` | integer | no | Sad reactions. |
| `data.reactions.wow` | integer | no | Wow reactions. |
| `data.shares` | integer | yes | |
| `data.text` | string | yes | |
| `data.url` | string | no | Canonical Facebook URL of the post. |
| `data.videoId` | string or null | no | Facebook video id of the post's reel or video, the id that appears in its /reel/\<id> URL. Null when the post carries no video or this lane cannot read it. |
| `data.videoUrl` | string or null | no | Playable video file URL of the post's reel or video. Null when the post carries no video or this source cannot read it. |
| `data.views` | integer or null | yes | Number of views on the post's video. Null when the source cannot report an exact count, for example when it gives only a rounded figure such as 14K. |
| `found` | boolean | yes | |

Extra fields are kept, missing declared fields fail.

> **Full output JSON Schema**
>
> ```json theme={"dark"}
> {
>   "$schema": "https://json-schema.org/draft/2020-12/schema",
>   "$id": "https://getanyapi.com/schemas/facebook.post.output.json",
>   "title": "Facebook post output",
>   "type": "object",
>   "additionalProperties": false,
>   "required": [
>     "found",
>     "data"
>   ],
>   "properties": {
>     "found": {
>       "type": "boolean"
>     },
>     "data": {
>       "oneOf": [
>         {
>           "type": "null"
>         },
>         {
>           "type": "object",
>           "required": [
>             "id",
>             "text",
>             "likes",
>             "comments",
>             "shares",
>             "views"
>           ],
>           "properties": {
>             "id": {
>               "x-anyapi-must-populate": true,
>               "type": "string",
>               "description": "Facebook post id. For a reel or video post this is NOT the id in the /reel/ URL; that one is videoId."
>             },
>             "videoId": {
>               "type": [
>                 "string",
>                 "null"
>               ],
>               "description": "Facebook video id of the post's reel or video, the id that appears in its /reel/<id> URL. Null when the post carries no video or this lane cannot read it."
>             },
>             "text": {
>               "x-anyapi-must-populate": true,
>               "type": "string"
>             },
>             "likes": {
>               "type": "integer"
>             },
>             "comments": {
>               "type": "integer"
>             },
>             "shares": {
>               "type": "integer"
>             },
>             "views": {
>               "type": [
>                 "integer",
>                 "null"
>               ],
>               "description": "Number of views on the post's video. Null when the source cannot report an exact count, for example when it gives only a rounded figure such as 14K."
>             },
>             "url": {
>               "type": "string",
>               "description": "Canonical Facebook URL of the post."
>             },
>             "createdUtc": {
>               "type": "number",
>               "description": "UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds."
>             },
>             "image": {
>               "type": "string",
>               "description": "Preview image or video thumbnail URL for the post."
>             },
>             "durationSeconds": {
>               "type": "number",
>               "description": "Length of the post's video in seconds, 0 when the post carries no video."
>             },
>             "authorId": {
>               "type": "string",
>               "description": "Numeric Facebook id of the page or profile that posted."
>             },
>             "authorName": {
>               "type": "string",
>               "description": "Display name of the page or profile that posted."
>             },
>             "authorImage": {
>               "type": "string",
>               "description": "Profile picture URL of the page or profile that posted."
>             },
>             "authorVerified": {
>               "type": "boolean",
>               "description": "Whether the posting page or profile carries a Facebook verification badge."
>             },
>             "reactions": {
>               "type": [
>                 "object",
>                 "null"
>               ],
>               "description": "Reaction counts on the post, broken down by reaction type. Null when this source reports only the total.",
>               "properties": {
>                 "like": {
>                   "type": "integer",
>                   "description": "Like reactions."
>                 },
>                 "love": {
>                   "type": "integer",
>                   "description": "Love reactions."
>                 },
>                 "care": {
>                   "type": "integer",
>                   "description": "Care reactions."
>                 },
>                 "haha": {
>                   "type": "integer",
>                   "description": "Haha reactions."
>                 },
>                 "wow": {
>                   "type": "integer",
>                   "description": "Wow reactions."
>                 },
>                 "sad": {
>                   "type": "integer",
>                   "description": "Sad reactions."
>                 },
>                 "angry": {
>                   "type": "integer",
>                   "description": "Angry reactions."
>                 }
>               }
>             },
>             "videoUrl": {
>               "type": [
>                 "string",
>                 "null"
>               ],
>               "description": "Playable video file URL of the post's reel or video. Null when the post carries no video or this source cannot read it."
>             },
>             "feedbackId": {
>               "type": [
>                 "string",
>                 "null"
>               ],
>               "description": "Facebook feedback id of the post; pass it to facebook.post_comments as feedbackId to fetch its comments. Null when this source cannot read it."
>             }
>           }
>         }
>       ]
>     }
>   }
> }
> ```

## Fields that must never come back empty

* `id`
* `text`

The repository marks these fields as ones every source must be able to fill. An empty value is only correct when the entity itself genuinely has nothing there.

## Not found, and how it differs from empty

When the entity does not exist, answer 2xx with the not-found shape:

```json theme={"dark"}
{
  "found": false,
  "data": null
}
```

An empty result is not a not-found: when the entity exists but carries nothing, answer 2xx with `found: true` and the empty values.

This output schema declares no `reason` field, so `found: false` is the whole not-found answer.

## Example request

```json theme={"dark"}
{
  "url": "https://www.facebook.com/reel/2166091230582141/"
}
```

The compatibility checks fire the schema's example at your endpoint. After that, your answers are graded against what the currently serving source returned for the same real customer inputs.

## Next

* [The operator endpoint contract](https://getanyapi.com/docs/sell/operator-endpoint-contract.md) for signing, budgets, and the live trial.
* [Every API open to sellers](https://getanyapi.com/docs/sell/apis/index.md).
* Want to sell an API that is not on that list? Email [support@getanyapi.com](mailto:support@getanyapi.com).


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