# Facebook Graph API Reference

Canonical: https://monsterapi.co/docs/api/facebook-graph

Read the Facebook Graph reference. Review parameters, response fields, examples, and current credit prices.

OpenAPI specification: [Facebook](https://monsterapi.co/docs/openapi/platforms/facebook.yaml).

---

Current operation prices: [public catalog](https://monsterapi.co/account/api/v1/public/api-prices). Prices use credits per request.

---

# Facebook: Post embedding details

`GET /facebook/api/oembed/post`

Documentation: https://monsterapi.co/docs/api/facebook#facebook-post-embedding-details

Operation ID: `facebook_oembed_post`

Returns embedding code and display details for a post or photo. Pass its url; an empty embedding record can still be a valid response.

## Authentication

Send your billing API key in the `Authorization: Bearer <YOUR_API_KEY>` header. Your account login is separate.

## Inputs

- `url` (query, required): Public Facebook post or photo URL. The URL uses `http` or `https`, names the host `www.facebook.com`, `facebook.com`, `m.facebook.com` or `fb.watch`, and carries no user name or password. Percent-encode spaces and non-ASCII characters.

## Responses

- 200: Details for the requested object.

- 400: A request parameter is invalid.

Refused at the gateway: the request target, path and query string together, is longer than 8,192 bytes; or the headers, the target counted among them, exceed 16,384 bytes or 64 fields

- 401: #/components/responses/GatewayUnauthorized

- 402: #/components/responses/GatewayPaymentRequired

- 403: #/components/responses/GatewayForbidden

- 404: The requested object is absent, or Facebook does not show it to logged-out visitors. An empty page of an object that exists does not return `404`.

- 405: `method_not_allowed`: the endpoint answers GET alone, and any other method, HEAD included, is refused

Refused at the gateway: the path exists, but no operation on it takes the method of the request, HEAD included; `Allow` names the methods that do

- 409: #/components/responses/GatewayConflict

- 429: `rate_limited`: Facebook limited the requests or asked a logged-out visitor to sign in. Wait for the seconds in `Retry-After`, then repeat the request. Facebook publishes no numbers for these limits.

Refused at the gateway: the account calls faster than its rate limit allows

- 500: The requested information could not be returned.

- 501: The requested information is unavailable without signing in or is not supported.

- 503: The requested information is temporarily unavailable. Repeat the request later. `code` gives the cause:

- `upstream_error`: no answer came from Facebook, or Facebook answered with a server error. Wait for the seconds in `Retry-After`, then repeat the request.
- `upstream_stale`: the service is renewing its access to this information.
- `no_proxies`: the service cannot get this kind of information at the moment.
- `overloaded`: the service is handling too many requests at the same time. Repeat the request after a short pause, or send fewer requests at the same time.

Refused at the gateway: the check could not complete, the account is suspended, or the platform did not answer; each may pass later, and `Retry-After` comes only when the platform did not answer

## Credits

Check the live price in the documentation before sending. Platform 2xx and 4xx responses can use credits, including empty data. Gateway refusals and 5xx responses do not use credits. Each pagination request is a separate call.

https://monsterapi.co/docs/pricing

## Request template

Replace path placeholders and add the required query parameters from the Inputs section before sending.

```shell

curl --get 'https://api.monsterapi.co/facebook/api/oembed/post' \
  -H 'Authorization: Bearer <YOUR_API_KEY>'

```

---

# Facebook: Video embedding details

`GET /facebook/api/oembed/video`

Documentation: https://monsterapi.co/docs/api/facebook#facebook-video-embedding-details

Operation ID: `facebook_oembed_video`

Returns embedding code and display details for a video. Pass its url; supported unavailable video addresses return not_found.

## Authentication

Send your billing API key in the `Authorization: Bearer <YOUR_API_KEY>` header. Your account login is separate.

## Inputs

- `url` (query, required): Public Facebook video URL. The URL uses `http` or `https`, names the host `www.facebook.com`, `facebook.com`, `m.facebook.com` or `fb.watch`, and carries no user name or password. Percent-encode spaces and non-ASCII characters.

## Responses

- 200: Details for the requested object.

- 400: A request parameter is invalid.

Refused at the gateway: the request target, path and query string together, is longer than 8,192 bytes; or the headers, the target counted among them, exceed 16,384 bytes or 64 fields

- 401: #/components/responses/GatewayUnauthorized

- 402: #/components/responses/GatewayPaymentRequired

- 403: #/components/responses/GatewayForbidden

- 404: The requested object is absent, or Facebook does not show it to logged-out visitors. An empty page of an object that exists does not return `404`.

- 405: `method_not_allowed`: the endpoint answers GET alone, and any other method, HEAD included, is refused

Refused at the gateway: the path exists, but no operation on it takes the method of the request, HEAD included; `Allow` names the methods that do

- 409: #/components/responses/GatewayConflict

- 429: `rate_limited`: Facebook limited the requests or asked a logged-out visitor to sign in. Wait for the seconds in `Retry-After`, then repeat the request. Facebook publishes no numbers for these limits.

Refused at the gateway: the account calls faster than its rate limit allows

- 500: The requested information could not be returned.

- 501: The requested information is unavailable without signing in or is not supported.

- 503: The requested information is temporarily unavailable. Repeat the request later. `code` gives the cause:

- `upstream_error`: no answer came from Facebook, or Facebook answered with a server error. Wait for the seconds in `Retry-After`, then repeat the request.
- `upstream_stale`: the service is renewing its access to this information.
- `no_proxies`: the service cannot get this kind of information at the moment.
- `overloaded`: the service is handling too many requests at the same time. Repeat the request after a short pause, or send fewer requests at the same time.

Refused at the gateway: the check could not complete, the account is suspended, or the platform did not answer; each may pass later, and `Retry-After` comes only when the platform did not answer

## Credits

Check the live price in the documentation before sending. Platform 2xx and 4xx responses can use credits, including empty data. Gateway refusals and 5xx responses do not use credits. Each pagination request is a separate call.

https://monsterapi.co/docs/pricing

## Request template

Replace path placeholders and add the required query parameters from the Inputs section before sending.

```shell

curl --get 'https://api.monsterapi.co/facebook/api/oembed/video' \
  -H 'Authorization: Bearer <YOUR_API_KEY>'

```
