# Facebook Scraper & API | EveryInfra (`blushing_parachute/everyinfra-facebook-api`) Actor

Unofficial Facebook data via one Actor: search, profile, user_posts, post, comments, followers, ads, group_posts, marketplace, reviews, advertiser_search, ad_detail, events_search, marketplace_item and 2 more. Pay per request, no start fee. First 3 requests free across EveryInfra Actors.

- **URL**: https://apify.com/blushing_parachute/everyinfra-facebook-api.md
- **Developed by:** [ECHO](https://apify.com/blushing_parachute) (community)
- **Categories:** Social media, Developer tools
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 search requests

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 Scraper & API | EveryInfra

Find public posts, profiles, comments, ads and marketplace listings using keywords or URLs for social media research.

Some materials require asynchronous tasks to obtain, and search terms distinguish between keywords, ads, and marketplace items.

### Actions

| Action | What you get | Required | Optional | Results per request | Price per request |
|---|---|---|---|---|---|
| `search` | Search Facebook posts by `keyword` and get each post's text, author, likes, comments, shares and post time, with an optional date range. `content_type` sorts by newest or most popular rather than filtering media, and private messages are not searched. | keyword | content_type, since, until | 10 (up to 200) | $0.0020 |
| `profile` | Get a Facebook Page or public profile from its `url`. It includes category, bio, likes, followers, verification badge and any contact details it shows. Phone and email are only what the page displays. They do not verify identity or permit their use. | url | — | 1 | $0.0013 |
| `user_posts` | List posts from a Facebook Page or account at `url`, each with text, author, post time and like, comment and share counts. The results are not necessarily the complete timeline. | url | — | 10 (up to 50) | $0.0020 |
| `post` | Fetch one Facebook post from its `url` with text, author, post time and like, comment and share counts. Comments, detailed reactions and private content are not included. Use `comments` for the thread. | url | — | 1 | $0.0008 |
| `comments` | Pull comments on a Facebook post from its `url`. Each comment has author, author ID, likes, reply count, post time and permalink. Reply rows reuse the parent group's ID, so rebuild threads with `depth` and `reply_to_id`. A complete tree is not guaranteed. | url | — | 10 (up to 50) | $0.0016 |
| `followers` | Check follower, following, post and like counts for a Facebook account or Page by `username`. A precision flag marks approximate values. It returns totals only, not a list of individual followers. | username | channel | 1 | $0.0013 |
| `ads` | Find ads in the Facebook Ad Library by `keyword` or Ad Library URL. Get ad copy, call to action, landing page, run dates, placements and advertiser. Narrow by country and `status`. Spend, impressions, targeting and conversions are not included. | keyword | country, status | 20 (up to 200) | $0.0023 |
| `group_posts` | Read posts from a Facebook group by group `url` or identifier. Get text, author, post time and like, comment and share counts. `sort` picks top posts or recent activity. Recent activity follows activity, not creation time. Full coverage is not guaranteed. | url | sort | 20 (up to 200) | $0.0039 |
| `marketplace` | Browse Facebook Marketplace listings for an item `keyword` in one city. Get price, currency, city, state, condition, image and post time. `location` takes a city path such as nyc, the default, not a street address. Availability is not confirmed. | keyword | location | 20 (up to 200) | $0.0039 |
| `reviews` | Collect recommendations and reviews from a Facebook Page `url`, with text, recommend or not, rating where given, author and post time. Facebook uses recommend or not in place of stars, so a missing rating does not void a recommendation. | url | — | 20 (up to 200) | $0.0072 |
| `advertiser_search` | Find the Facebook Pages that advertise under a brand or advertiser name in the Ad Library, up to 15 per call. Each Page has its ID, name, username, category, verification flag, Page likes, and the linked Instagram account with its follower count. A search for nike puts Nike (Page ID 15087023444) first. There is no paging. | keyword | — | 15 (up to 15) | $0.0017 |
| `ad_detail` | Open one ad in the Facebook Ad Library from its link or Library ID. Get whether it is still running, start and end dates, ad text, headline, link and call to action, display format, the placements it ran on, images or video, every creative variant, and the advertiser's Page ID, name, likes and categories. Spend, reach and targeting are not part of the result. | url | — | 1 | $0.0007 |
| `events_search` | Search public Facebook events by `keyword`, such as `music festival`. Each event has its name, start time, the date as Facebook shows it, venue, online flag, whether it has already happened, going and interested counts, ticket price text when shown, and cover image. Past events are included. About 5 per page; page on with `next_page_token`. | keyword | page_token | all the source returns | $0.0008 |
| `marketplace_item` | Read one Facebook Marketplace listing from its link or numeric ID. Get title, description, price and original price, currency, condition, item attributes, location with coordinates, listing time, sold and pending flags, shipping and delivery options, photos, and the seller's name, rating, rating count and join date. | url | — | 1 | $0.0008 |
| `page_events` | List the events a public Facebook Page hosts, upcoming and past, from the Page link. Each event has its name, start time, venue, city, host, and online, past and canceled flags. Up to 10 per page and the count varies; page on with `next_page_token`. A Page that hosts no events returns an empty list. | url | page_token | all the source returns | $0.0007 |
| `post_transcript` | Turn the speech in a public Facebook video, Reel or video post into text, from its link. You get the transcript and the video length in seconds. A video where nobody speaks comes back without `text`. | url | — | 1 | $0.0009 |

### Input

Pick an `action` and fill the fields it uses. Example:

```json
{
  "action": "search",
  "keyword": "urban gardening"
}
```

Fields that another action needs are ignored when left empty. API users can also pass `{"action": ..., "params": {...}}`.

### Output

Each result is one dataset row. Rows keep every field the source page exposes for that action; a field the platform hides or leaves empty for a record is omitted rather than filled with a placeholder. When there is a next page, the run's `OUTPUT` record holds `next_page_token`.

- `search`: `id`, `url`, `text`, `author_name`, `author_username`, `author_id`, `author_url`, `author_avatar_url`, `media`, `reactions`, `view_count`, `link`, `group_name`, `is_paid_partnership`, `like_count`, `comment_count`, `share_count`, `posted_at`, `platform`
- `profile`: `id`, `name`, `url`, `bio`, `category`, `like_count`, `follower_count`, `is_verified`, `phone`, `email`, `website`, `rating`, `rating_scale`, `avatar_url`, `platform`
- `user_posts`: `id`, `url`, `text`, `author_name`, `author_username`, `author_id`, `author_url`, `author_avatar_url`, `media`, `reactions`, `view_count`, `link`, `group_name`, `is_paid_partnership`, `like_count`, `comment_count`, `share_count`, `posted_at`, `platform`
- `post`: `id`, `url`, `text`, `author_name`, `author_username`, `author_id`, `author_url`, `author_avatar_url`, `media`, `reactions`, `view_count`, `link`, `group_name`, `is_paid_partnership`, `like_count`, `comment_count`, `share_count`, `posted_at`, `platform`
- `comments`: `id`, `text`, `author_name`, `author_username`, `depth`, `reply_to_id`, `comment_url`, `author_id`, `author_url`, `like_count`, `reply_count`, `posted_at`, `platform`
- `followers`: `id`, `username`, `url`, `follower_count`, `following_count`, `post_count`, `like_count`, `connection_count`, `precision`, `platform`
- `ads`: `id`, `url`, `text`, `title`, `cta_text`, `link_url`, `is_active`, `started_at`, `ended_at`, `platforms`, `variant_count`, `advertiser_id`, `advertiser_name`, `advertiser_url`, `advertiser_likes`, `image_url`, `platform`
- `group_posts`: `id`, `url`, `text`, `posted_at`, `like_count`, `comment_count`, `share_count`, `author_id`, `author_name`, `author_url`, `group_url`, `platform`
- `marketplace`: `id`, `url`, `name`, `price`, `currency`, `city`, `state`, `condition`, `image_url`, `posted_at`, `platform`
- `reviews`: `id`, `url`, `text`, `is_recommended`, `rating`, `rating_scale`, `posted_at`, `like_count`, `comment_count`, `author_id`, `author_name`, `author_url`, `platform`
- `advertiser_search`: `id`, `name`, `username`, `url`, `category`, `avatar_url`, `page_like_count`, `is_verified`, `instagram_username`, `instagram_follower_count`, `instagram_verified`, `country`, `platform`
- `ad_detail`: `id`, `url`, `is_active`, `started_at`, `ended_at`, `text`, `title`, `caption`, `link_url`, `link_description`, `cta_text`, `display_format`, `platforms`, `media`, `creatives`, `variant_count`, `advertiser_id`, `advertiser_name`, `advertiser_url`, `advertiser_likes`, `advertiser_avatar_url`, `advertiser_categories`, `platform`
- `events_search`: `id`, `url`, `name`, `starts_at`, `date_text`, `place_name`, `place_id`, `is_online`, `is_past`, `going_count`, `interested_count`, `price_text`, `image_url`, `next_page_token`, `platform`
- `marketplace_item`: `id`, `url`, `title`, `text`, `price`, `price_text`, `original_price_text`, `currency`, `condition`, `attributes`, `location`, `latitude`, `longitude`, `posted_at`, `is_sold`, `is_pending`, `is_shipping_offered`, `delivery_types`, `category_id`, `image_urls`, `seller_id`, `seller_name`, `seller_rating`, `seller_rating_count`, `seller_joined_at`, `platform`
- `page_events`: `id`, `url`, `name`, `starts_at`, `date_text`, `place_name`, `city`, `host_name`, `is_online`, `is_past`, `is_canceled`, `next_page_token`, `platform`
- `post_transcript`: `id`, `url`, `text`, `duration_seconds`, `duration_sec`, `platform`

#### Field notes

- `depth`: Comment level: 0 is a top-level comment, 1 is a reply to it, 2 is a reply to a reply. Rows at depth >= 1 reuse their parent comment group id — rebuild the tree with depth + reply_to_id.
- `reply_to_id`: Id of the comment this row replies to (present only at depth >= 1; always null at depth 0). Reply rows reuse the parent group id as their row id, so treat this field as the parent link.
- `comment_url`: Permanent link to this comment; on reply rows the link carries a reply_comment_id parameter pointing at the commented row.
- `author_id`: Numeric user id of the comment author (stable identifier for cross-request deduplication).
- `author_url`: Profile link of the comment author.

### Pricing

Pay per event, charged only when a run delivers data:

- `search`: $0.0020, one event per started block of 10 results.
- `profile`: $0.0013, one event per non-empty request, whatever the row count.
- `user_posts`: $0.0020, one event per started block of 10 results.
- `post`: $0.0008, one event per non-empty request, whatever the row count.
- `comments`: $0.0016, one event per started block of 10 results.
- `followers`: $0.0013, one event per non-empty request, whatever the row count.
- `ads`: $0.0023, one event per started block of 20 results.
- `group_posts`: $0.0039, one event per started block of 20 results.
- `marketplace`: $0.0039, one event per started block of 20 results.
- `reviews`: $0.0072, one event per started block of 20 results.
- `advertiser_search`: $0.0017, one event per non-empty request, whatever the row count.
- `ad_detail`: $0.0007, one event per non-empty request, whatever the row count.
- `events_search`: $0.0008, one event per non-empty request, whatever the row count.
- `marketplace_item`: $0.0008, one event per non-empty request, whatever the row count.
- `page_events`: $0.0007, one event per non-empty request, whatever the row count.
- `post_transcript`: $0.0009, one event per non-empty request, whatever the row count.

Empty or failed requests are never charged. There is no actor-start fee and no per-row fee, and platform usage is included in these prices.

### Free trial

The first 3 accepted data requests per Apify account are free across all EveryInfra Actors combined (a lifetime total, not per Actor and not reset). Invalid input does not use a trial; an accepted request that returns no data still does. After that a paid Apify plan is required.

### Notes

- Results reflect what is publicly visible when the run happens; counts can be lower than requested.
- One run makes one request. For more pages, start another run with `page_token` where the action supports it.
- This is an independent Actor. It is not affiliated with, sponsored by, or endorsed by Facebook or its owner; names and trademarks belong to their respective owners.

### Support

Open an issue on this Actor's Issues tab with the run ID.

# Actor input Schema

## `action` (type: `string`):

What to fetch. Each action uses only the fields listed for it below; other fields are ignored when empty.

## `keyword` (type: `string`):

Used by `search` (required), `ads` (required), `marketplace` (required), `advertiser_search` (required), `events_search` (required). Specifies the search query for distinct platform endpoints. For search, it searches public posts; for ads, it accepts ad keywords or direct Ad Library and Page URLs; for marketplace, it accepts item search terms or complete Marketplace search URLs. Each action queries a different dataset rather than returning the same results under different field names.

## `content_type` (type: `string`):

Used by `search`. Sorts results for the search action using allowed values latest for newer posts or most_popular for popular posts. Despite its name, content_type acts as a sorting dimension and does not filter by media format, such as images or videos.

## `since` (type: `string`):

Used by `search`. Filters post publication dates for the search action from this start date, recommended in YYYY-MM-DD format. Combined with until, it forms the query date range; it does not filter ad run times or comment creation times.

## `until` (type: `string`):

Used by `search`. Filters post publication dates for the search action up to this end date, recommended in YYYY-MM-DD format. Combined with since, it forms the query date range; it does not control ad expiration dates.

## `url` (type: `string`):

Used by `profile` (required), `user_posts` (required), `post` (required), `comments` (required), `group_posts` (required), `reviews` (required), `ad_detail` (required), `marketplace_item` (required), `page_events` (required), `post_transcript` (required). Specifies the target URL corresponding to the requested action. Use public Page URLs for profile and user_posts, post URLs for post and comments, group page URLs or group identifiers for group_posts, and business page URLs for reviews (which appends /reviews). Arbitrary Facebook URLs cannot be interchanged across actions.

## `username` (type: `string`):

Used by `followers` (required). Specifies the Facebook account or Page identifier without an @ symbol for the followers action. This capability returns a total follower count object rather than an exported list of individual follower profiles or a user relationship graph.

## `channel` (type: `string`):

Used by `followers`. This parameter is used for compatibility with the account identifier in the followers action. If username is supplied, it takes precedence, and public requests must still include the required username parameter. This parameter does not represent a chat channel ID.

## `country` (type: `string`):

Used by `ads`. Specifies the country code for keyword queries in the ads action, such as US (defaults to US). Values are converted to uppercase when constructing request URLs. If keyword is provided as a complete URL, the parameters embedded in that URL take precedence and this country setting is not applied.

## `status` (type: `string`):

Used by `ads`. Filters ad page status with allowed values: all (default), active (currently running), or inactive (stopped). This represents ad delivery status rather than ad review status. When keyword is an Ad Library URL, its embedded active_status may differ from this parameter; keep the two consistent.

## `sort` (type: `string`):

Used by `group_posts`. Specifies post ordering for group_posts using top for top posts or recent for posts with recent activity, defaulting to chronological order if omitted. The recent option is based on activity rather than post creation time alone. Unsupported string values fall back to chronological order instead of returning an error.

## `location` (type: `string`):

Used by `marketplace`. Specifies the city path identifier for marketplace, such as nyc (defaults to nyc). It does not accept free-form street addresses. If keyword contains a complete Marketplace URL, that URL takes precedence and location is ignored.

## `page_token` (type: `string`):

Used by `events_search`, `page_events`. Page token for `events_search` and `page_events`. Leave it out for the first page, then pass back the previous response's `next_page_token` exactly as received; the last page has none.

## `limit` (type: `integer`):

How many results to request for list actions. Defaults and maximums per action: `search` 10 (max 200); `user_posts` 10 (max 50); `comments` 10 (max 50); `ads` 20 (max 200); `group_posts` 20 (max 200); `marketplace` 20 (max 200); `reviews` 20 (max 200); `advertiser_search` 15 (max 15). Billing: `search` one event per started block of 10 results; `user_posts` one event per started block of 10 results; `comments` one event per started block of 10 results; `ads` one event per started block of 20 results; `group_posts` one event per started block of 20 results; `marketplace` one event per started block of 20 results; `reviews` one event per started block of 20 results; `advertiser_search` one event per non-empty request, whatever the row count.

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

Optional JSON object with the same fields as above, for API and integration use. Flat fields and params must not disagree.

## Actor input object example

```json
{
  "action": "search",
  "keyword": "urban gardening"
}
```

# Actor output Schema

## `records` (type: `string`):

No description

# 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 = {
    "keyword": "urban gardening"
};

// Run the Actor and wait for it to finish
const run = await client.actor("blushing_parachute/everyinfra-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 = { "keyword": "urban gardening" }

# Run the Actor and wait for it to finish
run = client.actor("blushing_parachute/everyinfra-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 '{
  "keyword": "urban gardening"
}' |
apify call blushing_parachute/everyinfra-facebook-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,blushing_parachute/everyinfra-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/DqueiIZFg3huOIndH/builds/diroLlZPH598Pj5zj/openapi.json
