# Facebook API by APISH (`apish/facebook-api`) Actor

Facebook data as clean JSON via APISH: Replies to a Facebook comment, Facebook event, Facebook events search and 22 more endpoints. Pay per credit; failed calls are free.

- **URL**: https://apify.com/apish/facebook-api.md
- **Developed by:** [APISH](https://apify.com/apish) (community)
- **Categories:** Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$4.00 / 1,000 credits

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 API by APISH

Get public Facebook data as clean, consistent JSON: replies to a Facebook comment, facebook event, facebook events search, facebook event search, facebook group, facebook group About tab and more. 25 endpoints, one response shape, numbers parsed, absolute URLs.

### How to use

1. Pick an **Endpoint**. Each option shows what it returns and its price in credits.
2. Enter its **Parameters** as JSON, for example `{"token":"eyJmIjoiWm1WbFpHSmhZMnM2TVRZMU9EZzNOamM0TWpJM05ETTFPRjh4T0RZeU5qazBNall4TlRjME5ERTIiLCJlIjoiTWpveE56a3lOalkwTVRBeU9nRl9JVHl6dEhIR0FvTVFQRVdfVFREQWh4dnd1Nlg3TjFqRXlIczlIRUZWSlZBeGVMdnpuZHhocDdSM3pZSzZ6LXBKSWowX0plY29vZXVKMHhiU1dlLUVEZ1ItT0trRVBvZ0tYMklkTURYbnlTQkF4U2ZUbkFCR082eUQ3eU5FblViM0dmUkt3cTRQRXkxY1RKemZPa0N5MXVSZFQ0d3J5Q29pZ3RrMGxxUTlHQVRjWmVLUjlWc1Ytbnh4UzZmZUxyNXRmQ0h3SWJXdXkxRkx3ZXdFRldrZWpJRGMyWU5aeTJpOVMyVmtVZ1VURWNlU3V5MHNnTk9GdFJWYlllVXF6TTI5S21VQXlBMkVPVjRnRHhhcWJlcnlLYkU2aFZpSVFDbUJFSk5hTEJ5RngzUEtjUUwyWlNLX2hRcUVrXzZtQ2J2UV9UeWFJZHRlTVZ4RXY0eEhBc1pvbjlNa0xORGJNdHhCQ2JveHg5TEwwdzZCNF96UjhmMW5PZkZQb3NOT2o0Y3dHZ0pNTkVwb2lRRnVDbUx3S1hDTFZweFNTZllpUy1kYVFxZk9ueWhVQjhlVDE2Wm85amY3WXp5ZWZqSXgxZ1kyeGVMMndNVDdjR18tdjdTdjRDQmQydTZhWjlVMUhyYXNFTUpUZ2tEMGkydXRmRXJKZ2xObFU3c2dsclRDZXVGSmZiTHlzTFJYZkg1QjFGSXpZM1d1ZmJldUJCdzNvelZ6TXJ5SFZYNC05ZVVCODlTbTVXeGhpc204a3YzbkhZZ2t2d3ZQdGFuS3duWmNia2dJVlZXcnJrLVl2NTdrRl9saVcxbFEwYnRnZzVYYm5yZGVsNW9RIn0"}`. All parameters are listed below.
3. Run. Each call becomes one row in the dataset. Use **Batch** to run the same endpoint for many inputs and **Pages per input** to follow pagination.

### Pricing

Pay per event: you pay per APISH credit the call used. The price of each endpoint is in the table below. Calls that fail on our side (server errors, timeouts, blocks) are free.

### Endpoints

| Endpoint | Returns | Required parameters | Credits |
|---|---|---|---|
| `/facebook/v1/comment/replies` | Replies to a Facebook comment | `token` | 1 |
| `/facebook/v1/event/details` | Facebook event | `url` | 1 |
| `/facebook/v1/events` | Facebook events search | `q` | 1 |
| `/facebook/v1/events/search` | Facebook event search | `q` | 1 |
| `/facebook/v1/group` | Facebook group | `url` | 1 |
| `/facebook/v1/group/about` | Facebook group About tab | `url` | 1 |
| `/facebook/v1/group/posts` | Public Facebook group posts | `url` | 1 |
| `/facebook/v1/hashtag` | Facebook hashtag posts | `tag` | 1 |
| `/facebook/v1/marketplace` | Facebook Marketplace search | — | 1 |
| `/facebook/v1/marketplace/item` | Facebook Marketplace listing | `url` | 1 |
| `/facebook/v1/marketplace/location/search` | Look up a place for Marketplace search | `q` | 1 |
| `/facebook/v1/marketplace/search` | Facebook Marketplace search | — | 1 |
| `/facebook/v1/page` | Facebook page | `url` | 1 |
| `/facebook/v1/page/about` | Facebook page About tab | `url` | 1 |
| `/facebook/v1/page/transparency` | Facebook page transparency | `url` | 1 |
| `/facebook/v1/post` | Facebook post | `url` | 1 |
| `/facebook/v1/post/comments` | Facebook post comments | `url` | 1 |
| `/facebook/v1/post/transcript` | Facebook video transcript | `url` | 1 |
| `/facebook/v1/profile/albums` | Facebook page photo albums | `url` | 1 |
| `/facebook/v1/profile/events` | Facebook page events | `url` | 1 |
| `/facebook/v1/profile/photos` | Facebook page photos | `url` | 1 |
| `/facebook/v1/profile/posts` | Facebook page / profile posts | `url` | 1 |
| `/facebook/v1/profile/reels` | Facebook page short videos | `url` | 1 |
| `/facebook/v1/profile/videos` | Facebook page videos | `url` | 1 |
| `/facebook/v1/search/videos` | Search Facebook videos | `q` | 1 |

### Output

Each dataset row has `endpoint`, `params`, `status`, `credits_used` and the endpoint's data. Add `"raw": 1` to the parameters to also get the site's original record, or `"fields": "a,b.c"` to return only the fields you need.

### Endpoint details

#### Replies to a Facebook comment

Endpoint `/facebook/v1/comment/replies` · 1 credit per successful call.

Parameters:

- `token` (required): `replies_token` of a comment from /facebook/v1/post/comments.
- `cursor`: Value of `next_cursor` from the previous page.

Example parameters: `{"token":"eyJmIjoiWm1WbFpHSmhZMnM2TVRZMU9EZzNOamM0TWpJM05ETTFPRjh4T0RZeU5qazBNall4TlRjME5ERTIiLCJlIjoiTWpveE56a3lOalkwTVRBeU9nRl9JVHl6dEhIR0FvTVFQRVdfVFREQWh4dnd1Nlg3TjFqRXlIczlIRUZWSlZBeGVMdnpuZHhocDdSM3pZSzZ6LXBKSWowX0plY29vZXVKMHhiU1dlLUVEZ1ItT0trRVBvZ0tYMklkTURYbnlTQkF4U2ZUbkFCR082eUQ3eU5FblViM0dmUkt3cTRQRXkxY1RKemZPa0N5MXVSZFQ0d3J5Q29pZ3RrMGxxUTlHQVRjWmVLUjlWc1Ytbnh4UzZmZUxyNXRmQ0h3SWJXdXkxRkx3ZXdFRldrZWpJRGMyWU5aeTJpOVMyVmtVZ1VURWNlU3V5MHNnTk9GdFJWYlllVXF6TTI5S21VQXlBMkVPVjRnRHhhcWJlcnlLYkU2aFZpSVFDbUJFSk5hTEJ5RngzUEtjUUwyWlNLX2hRcUVrXzZtQ2J2UV9UeWFJZHRlTVZ4RXY0eEhBc1pvbjlNa0xORGJNdHhCQ2JveHg5TEwwdzZCNF96UjhmMW5PZkZQb3NOT2o0Y3dHZ0pNTkVwb2lRRnVDbUx3S1hDTFZweFNTZllpUy1kYVFxZk9ueWhVQjhlVDE2Wm85amY3WXp5ZWZqSXgxZ1kyeGVMMndNVDdjR18tdjdTdjRDQmQydTZhWjlVMUhyYXNFTUpUZ2tEMGkydXRmRXJKZ2xObFU3c2dsclRDZXVGSmZiTHlzTFJYZkg1QjFGSXpZM1d1ZmJldUJCdzNvelZ6TXJ5SFZYNC05ZVVCODlTbTVXeGhpc204a3YzbkhZZ2t2d3ZQdGFuS3duWmNia2dJVlZXcnJrLVl2NTdrRl9saVcxbFEwYnRnZzVYYm5yZGVsNW9RIn0"}`

#### Facebook event

Endpoint `/facebook/v1/event/details` · 1 credit per successful call.

Parameters:

- `url` (required)

Example parameters: `{"url":"https://www.facebook.com/events/1474625497812411/"}`

#### Facebook events search

Endpoint `/facebook/v1/events` · 1 credit per successful call.

Facebook's logged-out event search, 10 events per page, with Facebook's own filters. The search cards carry only name and picture, so each event is read for its dates, place, cover and counts (details=false skips that). `available_filters` lists the date and category values Facebook offers for the query. Pagination: pass `next_cursor` back as `cursor`; it is null on the last page. A query without a location (e.g. "concert") returns fewer results; add location_id or put the place in q.

Parameters:

- `q` (required): Search text: a place ("New York, NY"), a topic or both.
- `date`: today, tomorrow, this_week, this_weekend, next_week, a day (YYYY-MM-DD) or a range (YYYY-MM-DD~YYYY-MM-DD).
- `date_from`: Start of a date range (YYYY-MM-DD), instead of date.
- `date_to`: End of a date range (YYYY-MM-DD).
- `category`: Event category: art, causes, comedy, crafts, dance, drinks, film, fitness, food, games, gardening, health, home, literature, music, networking, other, party, religion, shopping, sports, theater, wellness (or a Facebook category id).
- `location_id`: A Facebook city page id (e.g. 108424279189115 for New York); /facebook/v1/event/details returns city_id for any event.
- `details`: false skips reading each event (faster; the search cards then carry only name, link and picture).
- `cursor`: Value of `next_cursor` from the previous page.

Example parameters: `{"q":"New York, NY"}`

#### Facebook event search

Endpoint `/facebook/v1/events/search` · 1 credit per successful call.

Facebook's logged-out event search, 10 events per page, with Facebook's own filters. The search cards carry only name and picture, so each event is read for its dates, place, cover and counts (details=false skips that). `available_filters` lists the date and category values Facebook offers for the query. Pagination: pass `next_cursor` back as `cursor`; it is null on the last page. A query without a location (e.g. "concert") returns fewer results; add location_id or put the place in q.

Parameters:

- `q` (required): Search text.
- `date`: today, tomorrow, this_week, this_weekend, next_week, a day (YYYY-MM-DD) or a range (YYYY-MM-DD~YYYY-MM-DD).
- `date_from`: Start of a date range (YYYY-MM-DD), instead of date.
- `date_to`: End of a date range (YYYY-MM-DD).
- `category`: Event category: art, causes, comedy, crafts, dance, drinks, film, fitness, food, games, gardening, health, home, literature, music, networking, other, party, religion, shopping, sports, theater, wellness (or a Facebook category id).
- `location_id`: A Facebook city page id (e.g. 108424279189115 for New York); /facebook/v1/event/details returns city_id for any event.
- `details`: false skips reading each event (faster; the search cards then carry only name, link and picture).
- `cursor`: Value of `next_cursor` from the previous page.

Example parameters: `{"q":"concert"}`

#### Facebook group

Endpoint `/facebook/v1/group` · 1 credit per successful call.

A public group: name, privacy, member count, description, cover, and its discussion feed (3 posts per page, Facebook's logged-out page size; the first call reads two pages). Pagination: pass `next_cursor` back as `cursor` here (or to /facebook/v1/group/posts).

Parameters:

- `url` (required): Group URL, slug or numeric id.
- `sort` — one of `recent`, `top`: recent (default) or top.
- `cursor`: Value of `next_cursor` from the previous page.

Example parameters: `{"url":"instantpotcommunity"}`

#### Facebook group About tab

Endpoint `/facebook/v1/group/about` · 1 credit per successful call.

A group's About tab: full description, privacy (public/private) and visibility, creation date, exact member count, new members in the last week, posts in the last day and month, admins and moderators (with counts) and the group rules.

Parameters:

- `url` (required): Group URL, vanity name or numeric id.

Example parameters: `{"url":"instantpotcommunity"}`

#### Public Facebook group posts

Endpoint `/facebook/v1/group/posts` · 1 credit per successful call.

Parameters:

- `url` (required)
- `sort`: recent or top.
- `cursor`: Value of `next_cursor` from the previous page.

Example parameters: `{"url":"https://www.facebook.com/groups/1270525996445602/"}`

#### Facebook hashtag posts

Endpoint `/facebook/v1/hashtag` · 1 credit per successful call.

The posts Facebook shows logged out for a hashtag: its top post and its most recent post (one each, 1-2 posts in all). Logged out, Facebook shows nothing further on a hashtag page and answers its paging query with "Rate limit exceeded", so there is no next page (`next_cursor` is always null). Each post has text, author, time, media, reaction/comment/share counts and `tab` (top or recent).

Parameters:

- `tag` (required): Hashtag, with or without #, or a facebook.com/hashtag/... URL.
- `sort` — one of `all`, `top`, `recent`: all (default: top and recent post), top or recent.

Example parameters: `{"tag":"nasa"}`

#### Facebook Marketplace search

Endpoint `/facebook/v1/marketplace` · 1 credit per successful call.

The server-rendered Marketplace search page: 24 listings. Logged out, Facebook's Marketplace search API answers with empty pages (checked Oct 2026), so there are no further pages; narrow the search with the filters instead. All filters are applied by Facebook. Without q, `category` browses a category with the same filters.

Parameters:

- `q`: Search text (optional when category is given).
- `location`: A Marketplace city slug (nyc, sanfrancisco, la, …) or a place name ("Austin, TX"); default nyc.
- `min_price`: Minimum price, in the listing currency.
- `max_price`: Maximum price.
- `radius_km`: Search radius around the location, km (1-500).
- `sort` — one of `best_match`, `newest`, `oldest`, `price_low`, `price_high`, `distance`, `distance_far`: best_match (default), newest, oldest, price_low, price_high, distance, distance_far.
- `days_since_listed`: Listed within the last 1, 7 or 30 days.
- `condition`: Item condition, comma-separated: new, used_like_new, used_good, used_fair.
- `delivery` — one of `local_pickup`, `shipping`: local_pickup or shipping.
- `exact`: true: only listings that match the words exactly.
- `category`: Without q: browse a Marketplace category instead (vehicles, electronics, propertyrentals, apparel, homegoods, …).

#### Facebook Marketplace listing

Endpoint `/facebook/v1/marketplace/item` · 1 credit per successful call.

Parameters:

- `url` (required)

Example parameters: `{"url":"https://www.facebook.com/marketplace/item/919704987847781/"}`

#### Look up a place for Marketplace search

Endpoint `/facebook/v1/marketplace/location/search` · 1 credit per successful call.

Facebook's own location picker is login-only; places come from Open-Meteo geocoding.

Parameters:

- `q` (required)

Example parameters: `{"q":"Austin"}`

#### Facebook Marketplace search

Endpoint `/facebook/v1/marketplace/search` · 1 credit per successful call.

The server-rendered Marketplace search page: 24 listings. Logged out, Facebook's Marketplace search API answers with empty pages (checked Oct 2026), so there are no further pages; narrow the search with the filters instead. All filters are applied by Facebook. Without q, `category` browses a category with the same filters.

Parameters:

- `q`: Search text (optional when category is given).
- `location`: A Marketplace city slug (nyc, sanfrancisco, la, …) or a place name ("Austin, TX"); default nyc.
- `min_price`: Minimum price, in the listing currency.
- `max_price`: Maximum price.
- `radius_km`: Search radius around the location, km (1-500).
- `sort` — one of `best_match`, `newest`, `oldest`, `price_low`, `price_high`, `distance`, `distance_far`: best_match (default), newest, oldest, price_low, price_high, distance, distance_far.
- `days_since_listed`: Listed within the last 1, 7 or 30 days.
- `condition`: Item condition, comma-separated: new, used_like_new, used_good, used_fair.
- `delivery` — one of `local_pickup`, `shipping`: local_pickup or shipping.
- `exact`: true: only listings that match the words exactly.
- `category`: Without q: browse a Marketplace category instead (vehicles, electronics, propertyrentals, apparel, homegoods, …).

#### Facebook page

Endpoint `/facebook/v1/page` · 1 credit per successful call.

A public page or profile: name, category, intro, follower/following counts (exact follower count when Facebook shows it), contact cards (phone, email, website, address, hours, price range), rating, verified flag, profile and cover pictures, social links.

Parameters:

- `url` (required): Page URL or username.

Example parameters: `{"url":"bbcnews"}`

#### Facebook page About tab

Endpoint `/facebook/v1/page/about` · 1 credit per successful call.

Every field of a public page's About tab, read from its four sub-tabs in parallel: categories, address with map pin (latitude/longitude), phone, email, websites, social links (Instagram, X…), rating ("98% recommend") and review count, hours status, price range, services, the long description (`about`), privacy policy and impressum, and Page transparency (Page ID, creation date, whether the page is running ads, the confirmed owner). `sections` lists every section and field as Facebook shows them; a sub-tab that could not be read is named in `sections_failed`.

Parameters:

- `url` (required): Page URL or username (profile.php?id=… links work too).
- `sections`: Comma-separated subset of contact, details, privacy, transparency (default: all four).

Example parameters: `{"url":"NASA"}`

#### Facebook page transparency

Endpoint `/facebook/v1/page/transparency` · 1 credit per successful call.

A page's transparency panel: Page ID, creation date (also as YYYY-MM-DD), the ad status with `running_ads` true/false, the confirmed owner (`responsible_entity`) and the admin note. `available` is false for profiles without the panel.

Parameters:

- `url` (required): Page URL or username (profile.php?id=… links work too).

Example parameters: `{"url":"NASA"}`

#### Facebook post

Endpoint `/facebook/v1/post` · 1 credit per successful call.

Parameters:

- `url` (required)

Example parameters: `{"url":"https://www.facebook.com/NASA/posts/1658876782274358"}`

#### Facebook post comments

Endpoint `/facebook/v1/post/comments` · 1 credit per successful call.

Parameters:

- `url` (required)
- `sort`: relevant, newest or all.
- `cursor`: Value of `next_cursor` from the previous page.

Example parameters: `{"url":"https://www.facebook.com/NASA/posts/1658876782274358"}`

#### Facebook video transcript

Endpoint `/facebook/v1/post/transcript` · 1 credit per successful call.

Parameters:

- `url` (required)

Example parameters: `{"url":"https://www.facebook.com/watch/?v=452499129200583"}`

#### Facebook page photo albums

Endpoint `/facebook/v1/profile/albums` · 1 credit per successful call.

A page's photo albums: album id, title, number of items, cover image and link, 8 per page. Pagination: pass `next_cursor` back as `cursor`; it is null on the last page. (Logged out, Facebook does not show the photos inside an album; /facebook/v1/profile/photos lists the page's photos.)

Parameters:

- `url` (required): Page URL or username.
- `cursor`: Value of `next_cursor` from the previous page.

Example parameters: `{"url":"NASA"}`

#### Facebook page events

Endpoint `/facebook/v1/profile/events` · 1 credit per successful call.

Parameters:

- `url` (required)

Example parameters: `{"url":"https://www.facebook.com/NASA"}`

#### Facebook page photos

Endpoint `/facebook/v1/profile/photos` · 1 credit per successful call.

Parameters:

- `url` (required)
- `cursor`: Value of `next_cursor` from the previous page.

Example parameters: `{"url":"https://www.facebook.com/NASA"}`

#### Facebook page / profile posts

Endpoint `/facebook/v1/profile/posts` · 1 credit per successful call.

Parameters:

- `url` (required)
- `cursor`: Value of `next_cursor` from the previous page.

Example parameters: `{"url":"https://www.facebook.com/NASA"}`

#### Facebook page short videos

Endpoint `/facebook/v1/profile/reels` · 1 credit per successful call.

Facebook's Reels tab is login-only; this lists the page's vertical videos.

Parameters:

- `url` (required)
- `cursor`: Value of `next_cursor` from the previous page.

Example parameters: `{"url":"https://www.facebook.com/NASA"}`

#### Facebook page videos

Endpoint `/facebook/v1/profile/videos` · 1 credit per successful call.

Parameters:

- `url` (required)
- `cursor`: Value of `next_cursor` from the previous page.

Example parameters: `{"url":"https://www.facebook.com/NASA"}`

#### Search Facebook videos

Endpoint `/facebook/v1/search/videos` · 1 credit per successful call.

Parameters:

- `q` (required)
- `cursor`: Value of `next_cursor` from the previous page.

Example parameters: `{"q":"nasa artemis"}`

### Support

Questions, bugs or a missing field? Open an issue in this Actor's Issues tab and we will reply there.

Public data only: nothing behind a login. You are responsible for how you use the data you collect.

# Actor input Schema

## `endpoint` (type: `string`):

Which Facebook endpoint to call. Each option shows what it returns and its price in credits.

## `params` (type: `object`):

Query parameters for the endpoint, as JSON. See the README for every endpoint's parameters. Example: {"token":"eyJmIjoiWm1WbFpHSmhZMnM2TVRZMU9EZzNOamM0TWpJM05ETTFPRjh4T0RZeU5qazBNall4TlRjME5ERTIiLCJlIjoiTWpveE56a3lOalkwTVRBeU9nRl9JVHl6dEhIR0FvTVFQRVdfVFREQWh4dnd1Nlg3TjFqRXlIczlIRUZWSlZBeGVMdnpuZHhocDdSM3pZSzZ6LXBKSWowX0plY29vZXVKMHhiU1dlLUVEZ1ItT0trRVBvZ0tYMklkTURYbnlTQkF4U2ZUbkFCR082eUQ3eU5FblViM0dmUkt3cTRQRXkxY1RKemZPa0N5MXVSZFQ0d3J5Q29pZ3RrMGxxUTlHQVRjWmVLUjlWc1Ytbnh4UzZmZUxyNXRmQ0h3SWJXdXkxRkx3ZXdFRldrZWpJRGMyWU5aeTJpOVMyVmtVZ1VURWNlU3V5MHNnTk9GdFJWYlllVXF6TTI5S21VQXlBMkVPVjRnRHhhcWJlcnlLYkU2aFZpSVFDbUJFSk5hTEJ5RngzUEtjUUwyWlNLX2hRcUVrXzZtQ2J2UV9UeWFJZHRlTVZ4RXY0eEhBc1pvbjlNa0xORGJNdHhCQ2JveHg5TEwwdzZCNF96UjhmMW5PZkZQb3NOT2o0Y3dHZ0pNTkVwb2lRRnVDbUx3S1hDTFZweFNTZllpUy1kYVFxZk9ueWhVQjhlVDE2Wm85amY3WXp5ZWZqSXgxZ1kyeGVMMndNVDdjR18tdjdTdjRDQmQydTZhWjlVMUhyYXNFTUpUZ2tEMGkydXRmRXJKZ2xObFU3c2dsclRDZXVGSmZiTHlzTFJYZkg1QjFGSXpZM1d1ZmJldUJCdzNvelZ6TXJ5SFZYNC05ZVVCODlTbTVXeGhpc204a3YzbkhZZ2t2d3ZQdGFuS3duWmNia2dJVlZXcnJrLVl2NTdrRl9saVcxbFEwYnRnZzVYYm5yZGVsNW9RIn0"}

## `batch` (type: `array`):

Run the same endpoint for many inputs: a list of parameter objects. Each item is one call. Leave empty to use Parameters.

## `maxPages` (type: `integer`):

For paginated endpoints: follow next_cursor up to this many pages per input. 1 = first page only.

## Actor input object example

```json
{
  "endpoint": "/facebook/v1/comment/replies",
  "params": {
    "token": "eyJmIjoiWm1WbFpHSmhZMnM2TVRZMU9EZzNOamM0TWpJM05ETTFPRjh4T0RZeU5qazBNall4TlRjME5ERTIiLCJlIjoiTWpveE56a3lOalkwTVRBeU9nRl9JVHl6dEhIR0FvTVFQRVdfVFREQWh4dnd1Nlg3TjFqRXlIczlIRUZWSlZBeGVMdnpuZHhocDdSM3pZSzZ6LXBKSWowX0plY29vZXVKMHhiU1dlLUVEZ1ItT0trRVBvZ0tYMklkTURYbnlTQkF4U2ZUbkFCR082eUQ3eU5FblViM0dmUkt3cTRQRXkxY1RKemZPa0N5MXVSZFQ0d3J5Q29pZ3RrMGxxUTlHQVRjWmVLUjlWc1Ytbnh4UzZmZUxyNXRmQ0h3SWJXdXkxRkx3ZXdFRldrZWpJRGMyWU5aeTJpOVMyVmtVZ1VURWNlU3V5MHNnTk9GdFJWYlllVXF6TTI5S21VQXlBMkVPVjRnRHhhcWJlcnlLYkU2aFZpSVFDbUJFSk5hTEJ5RngzUEtjUUwyWlNLX2hRcUVrXzZtQ2J2UV9UeWFJZHRlTVZ4RXY0eEhBc1pvbjlNa0xORGJNdHhCQ2JveHg5TEwwdzZCNF96UjhmMW5PZkZQb3NOT2o0Y3dHZ0pNTkVwb2lRRnVDbUx3S1hDTFZweFNTZllpUy1kYVFxZk9ueWhVQjhlVDE2Wm85amY3WXp5ZWZqSXgxZ1kyeGVMMndNVDdjR18tdjdTdjRDQmQydTZhWjlVMUhyYXNFTUpUZ2tEMGkydXRmRXJKZ2xObFU3c2dsclRDZXVGSmZiTHlzTFJYZkg1QjFGSXpZM1d1ZmJldUJCdzNvelZ6TXJ5SFZYNC05ZVVCODlTbTVXeGhpc204a3YzbkhZZ2t2d3ZQdGFuS3duWmNia2dJVlZXcnJrLVl2NTdrRl9saVcxbFEwYnRnZzVYYm5yZGVsNW9RIn0"
  },
  "batch": [],
  "maxPages": 1
}
```

# Actor output Schema

## `results` (type: `string`):

One row per call: endpoint, params, status, credits_used and the data.

# 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 = {
    "endpoint": "/facebook/v1/comment/replies",
    "params": {
        "token": "eyJmIjoiWm1WbFpHSmhZMnM2TVRZMU9EZzNOamM0TWpJM05ETTFPRjh4T0RZeU5qazBNall4TlRjME5ERTIiLCJlIjoiTWpveE56a3lOalkwTVRBeU9nRl9JVHl6dEhIR0FvTVFQRVdfVFREQWh4dnd1Nlg3TjFqRXlIczlIRUZWSlZBeGVMdnpuZHhocDdSM3pZSzZ6LXBKSWowX0plY29vZXVKMHhiU1dlLUVEZ1ItT0trRVBvZ0tYMklkTURYbnlTQkF4U2ZUbkFCR082eUQ3eU5FblViM0dmUkt3cTRQRXkxY1RKemZPa0N5MXVSZFQ0d3J5Q29pZ3RrMGxxUTlHQVRjWmVLUjlWc1Ytbnh4UzZmZUxyNXRmQ0h3SWJXdXkxRkx3ZXdFRldrZWpJRGMyWU5aeTJpOVMyVmtVZ1VURWNlU3V5MHNnTk9GdFJWYlllVXF6TTI5S21VQXlBMkVPVjRnRHhhcWJlcnlLYkU2aFZpSVFDbUJFSk5hTEJ5RngzUEtjUUwyWlNLX2hRcUVrXzZtQ2J2UV9UeWFJZHRlTVZ4RXY0eEhBc1pvbjlNa0xORGJNdHhCQ2JveHg5TEwwdzZCNF96UjhmMW5PZkZQb3NOT2o0Y3dHZ0pNTkVwb2lRRnVDbUx3S1hDTFZweFNTZllpUy1kYVFxZk9ueWhVQjhlVDE2Wm85amY3WXp5ZWZqSXgxZ1kyeGVMMndNVDdjR18tdjdTdjRDQmQydTZhWjlVMUhyYXNFTUpUZ2tEMGkydXRmRXJKZ2xObFU3c2dsclRDZXVGSmZiTHlzTFJYZkg1QjFGSXpZM1d1ZmJldUJCdzNvelZ6TXJ5SFZYNC05ZVVCODlTbTVXeGhpc204a3YzbkhZZ2t2d3ZQdGFuS3duWmNia2dJVlZXcnJrLVl2NTdrRl9saVcxbFEwYnRnZzVYYm5yZGVsNW9RIn0"
    },
    "batch": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("apish/facebook-api").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 = {
    "endpoint": "/facebook/v1/comment/replies",
    "params": { "token": "eyJmIjoiWm1WbFpHSmhZMnM2TVRZMU9EZzNOamM0TWpJM05ETTFPRjh4T0RZeU5qazBNall4TlRjME5ERTIiLCJlIjoiTWpveE56a3lOalkwTVRBeU9nRl9JVHl6dEhIR0FvTVFQRVdfVFREQWh4dnd1Nlg3TjFqRXlIczlIRUZWSlZBeGVMdnpuZHhocDdSM3pZSzZ6LXBKSWowX0plY29vZXVKMHhiU1dlLUVEZ1ItT0trRVBvZ0tYMklkTURYbnlTQkF4U2ZUbkFCR082eUQ3eU5FblViM0dmUkt3cTRQRXkxY1RKemZPa0N5MXVSZFQ0d3J5Q29pZ3RrMGxxUTlHQVRjWmVLUjlWc1Ytbnh4UzZmZUxyNXRmQ0h3SWJXdXkxRkx3ZXdFRldrZWpJRGMyWU5aeTJpOVMyVmtVZ1VURWNlU3V5MHNnTk9GdFJWYlllVXF6TTI5S21VQXlBMkVPVjRnRHhhcWJlcnlLYkU2aFZpSVFDbUJFSk5hTEJ5RngzUEtjUUwyWlNLX2hRcUVrXzZtQ2J2UV9UeWFJZHRlTVZ4RXY0eEhBc1pvbjlNa0xORGJNdHhCQ2JveHg5TEwwdzZCNF96UjhmMW5PZkZQb3NOT2o0Y3dHZ0pNTkVwb2lRRnVDbUx3S1hDTFZweFNTZllpUy1kYVFxZk9ueWhVQjhlVDE2Wm85amY3WXp5ZWZqSXgxZ1kyeGVMMndNVDdjR18tdjdTdjRDQmQydTZhWjlVMUhyYXNFTUpUZ2tEMGkydXRmRXJKZ2xObFU3c2dsclRDZXVGSmZiTHlzTFJYZkg1QjFGSXpZM1d1ZmJldUJCdzNvelZ6TXJ5SFZYNC05ZVVCODlTbTVXeGhpc204a3YzbkhZZ2t2d3ZQdGFuS3duWmNia2dJVlZXcnJrLVl2NTdrRl9saVcxbFEwYnRnZzVYYm5yZGVsNW9RIn0" },
    "batch": [],
}

# Run the Actor and wait for it to finish
run = client.actor("apish/facebook-api").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 '{
  "endpoint": "/facebook/v1/comment/replies",
  "params": {
    "token": "eyJmIjoiWm1WbFpHSmhZMnM2TVRZMU9EZzNOamM0TWpJM05ETTFPRjh4T0RZeU5qazBNall4TlRjME5ERTIiLCJlIjoiTWpveE56a3lOalkwTVRBeU9nRl9JVHl6dEhIR0FvTVFQRVdfVFREQWh4dnd1Nlg3TjFqRXlIczlIRUZWSlZBeGVMdnpuZHhocDdSM3pZSzZ6LXBKSWowX0plY29vZXVKMHhiU1dlLUVEZ1ItT0trRVBvZ0tYMklkTURYbnlTQkF4U2ZUbkFCR082eUQ3eU5FblViM0dmUkt3cTRQRXkxY1RKemZPa0N5MXVSZFQ0d3J5Q29pZ3RrMGxxUTlHQVRjWmVLUjlWc1Ytbnh4UzZmZUxyNXRmQ0h3SWJXdXkxRkx3ZXdFRldrZWpJRGMyWU5aeTJpOVMyVmtVZ1VURWNlU3V5MHNnTk9GdFJWYlllVXF6TTI5S21VQXlBMkVPVjRnRHhhcWJlcnlLYkU2aFZpSVFDbUJFSk5hTEJ5RngzUEtjUUwyWlNLX2hRcUVrXzZtQ2J2UV9UeWFJZHRlTVZ4RXY0eEhBc1pvbjlNa0xORGJNdHhCQ2JveHg5TEwwdzZCNF96UjhmMW5PZkZQb3NOT2o0Y3dHZ0pNTkVwb2lRRnVDbUx3S1hDTFZweFNTZllpUy1kYVFxZk9ueWhVQjhlVDE2Wm85amY3WXp5ZWZqSXgxZ1kyeGVMMndNVDdjR18tdjdTdjRDQmQydTZhWjlVMUhyYXNFTUpUZ2tEMGkydXRmRXJKZ2xObFU3c2dsclRDZXVGSmZiTHlzTFJYZkg1QjFGSXpZM1d1ZmJldUJCdzNvelZ6TXJ5SFZYNC05ZVVCODlTbTVXeGhpc204a3YzbkhZZ2t2d3ZQdGFuS3duWmNia2dJVlZXcnJrLVl2NTdrRl9saVcxbFEwYnRnZzVYYm5yZGVsNW9RIn0"
  },
  "batch": []
}' |
apify call apish/facebook-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,apish/facebook-api"
        }
    }
}
```

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/3BuqQkpmGdTOIcUvE/builds/5u9Z5Zea9tjbmZ0NS/openapi.json
