# Facebook Post Search Scraper | Keywords, Country & Dates (`lofomachines/facebook-post-search-scraper`) Actor

Find public Facebook posts for a list of keywords. Choose a country and dates, then export post links, text, authors, publication dates and available engagement to CSV, Excel or JSON.

- **URL**: https://apify.com/lofomachines/facebook-post-search-scraper.md
- **Developed by:** [Lofomachines](https://apify.com/lofomachines) (community)
- **Categories:** Social media
- **Features:** Limited permissions, Multi-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.39 / 1,000 post saveds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Post Search Scraper** finds public posts on [Facebook](https://www.facebook.com/) about your keywords and turns them into a spreadsheet. Search up to 100 topics in one run, choose a country and dates within the last 12 months, then export post links, text, authors and available engagement counts. Each row keeps the keyword that found it so you can compare topics side by side.

[English](#search-facebook-posts-by-keyword) · [Italiano](#italiano) · [Español](#español) · [Français](#français) · [Deutsch](#deutsch) · [Português](#português)

To use calendars that disable dates outside the last 12 months, [Download the calendar form](https://api.apify.com/v2/key-value-stores/hAosNoCtjprmv6WlP/records/calendar.html?signature=BdkODUyMuBRNgMIRSV5g\&attachment=true), open the file and copy the prepared search into the **JSON** tab in Apify.

### Search Facebook posts by keyword

1. Open **Input** and enter one keyword or phrase per line. For example, a festival organizer might enter `festival del cinema` and `cinema all’aperto`.
2. Pick **Italy** as the search country, or leave **Worldwide** selected. Each run uses one market.
3. Choose publication dates in either or both calendars. To cover a festival weekend in the last 12 months, pick its first and last days.
4. Set **Maximum posts per keyword**. Keep **Fast** for a quick sample or choose **Exhaustive** for a fuller collection, then click **Start**. Two keywords with a limit of 25 can return up to 50 rows.
5. Open **Output → Facebook posts** to review the links. Use **Engagement** to compare visible counts and **Export** to download CSV, Excel or JSON. Open **Run summary** for results by keyword.

You can start with just a phrase. No Facebook account, page URL or coding is required.

### What can you do with Facebook post search?

| If you need to… | Try this |
| --- | --- |
| Monitor public brand mentions | Enter your product name, campaign tagline and local spelling as separate keywords. Keep the post links in your weekly report. |
| Follow a launch or local event | Select the market and event dates. Open the original posts to check context before quoting them. |
| Compare the response to campaigns | Export the Engagement view and compare posts with visible counts at similar collection times. |
| Build a repeatable research workflow | Save your keywords as an Apify task, schedule future runs, or use the Actor’s API tab to send results to another tool. |

### Country, keyword and calendar settings

| Input | How it works |
| --- | --- |
| **Keywords or phrases** | One per line, up to 100 entries and 200 characters per entry. Use local spellings to find conversations in that language. |
| **Search country** | Prioritizes results relevant to the selected market. A post found for Italy can have an author based elsewhere. |
| **Published on or after** | Includes the selected UTC day. Leave empty to start at the earliest eligible day, 12 months ago. |
| **Published on or before** | Includes the selected UTC day. Leave empty to include today or set both calendars to the same day for a single day. |
| **Maximum posts per keyword** | Defaults to 50. Set any whole number from 1 to 3,000. Each keyword has its own limit. |
| **Search mode** | **Fast** (default) samples the range and can finish below your cap when few new posts appear. **Exhaustive** checks more dates and result pages. It can take longer and use more resources. |

**How far back can I search?** The earliest available day is the same UTC calendar date one year ago. The latest is today. Both ends are included. The Actor applies this window even when both calendars are empty. Every exported row must have a publication date from the post or its public preview. If you enter an older or future date, the run stops before collecting posts and shows the dates you can use.

For a particular campaign, enter both dates. If you enter only the end date, your search starts on the earliest eligible day, 12 months ago, and ends on your chosen date.

This input works year-round. Paste it into the Input tab’s JSON editor to sample the last 12 months. To narrow the period, choose dates on the form or supply `newerThan` and `olderThan` as ISO dates (`YYYY-MM-DD`).

```json
{
  "keywords": ["festival del cinema", "cinema all’aperto"],
  "country": "IT",
  "searchMode": "fast",
  "maxPostsPerQuery": 25
}
```

**Exhaustive** provides broader, adaptive coverage. It checks date windows distributed across the selected period, opens more pages, and explores productive windows in greater detail. Empty pages stop immediately; repeated pages stop when they no longer add new posts. Unproductive windows do not trigger a day-by-day sweep. Short ranges receive daily checks; longer ranges combine wider windows with selected days. Neither mode guarantees every available post.

The run summary reports date windows checked and days not checked individually. `diminishingReturns` means additional checks stopped adding new posts, not that no posts exist in the skipped periods. Failed requests remain eligible for recovery and are not counted as empty results.

### What Facebook post data can I export?

The dataset contains one row per distinct post **for each keyword**. If the same post matches two phrases, both rows keep their respective keyword. To count independent posts across all phrases, group your export by post ID or URL.

| Column | What you get |
| --- | --- |
| `keyword`, `country` | The phrase and search market you selected. `ANY` means Worldwide. |
| `url`, `postId`, `postType` | A Facebook permalink, its identifier and the format, such as a page post, group post, photo, video or reel. |
| `title`, `text`, `hashtags` | The visible heading, post text or preview excerpt, and hashtags found in that text. |
| `authorName`, `authorUrl`, `imageUrl` | The displayed author, author link and post image or thumbnail, when available. |
| `publishedAt`, `dateSource` | The publication date and its origin. `post` comes from the post itself, while `preview` comes from a public preview. |
| `reactionCount`, `commentCount`, `shareCount` | Visible engagement totals at collection time. An empty count means unavailable. A recorded zero means zero was visible. |
| `scrapedAt` | When the row was recorded. |

**Example output** below shows selected fields from two illustrative rows.

```json
[
  {
    "keyword": "festival del cinema",
    "country": "IT",
    "url": "https://www.facebook.com/examplefestival/posts/123456789012345",
    "postId": "123456789012345",
    "postType": "post",
    "text": "Il festival del cinema apre venerdì in piazza. #Cinema",
    "authorName": "Festival Esempio",
    "publishedAt": "2026-09-03T16:30:00.000Z",
    "dateSource": "post",
    "reactionCount": 185,
    "commentCount": 24,
    "shareCount": 5
  },
  {
    "keyword": "cinema all’aperto",
    "country": "IT",
    "url": "https://www.facebook.com/reel/234567890123456",
    "postId": "234567890123456",
    "postType": "reel",
    "text": "Il programma del cinema all’aperto per questo fine settimana.",
    "authorName": null,
    "publishedAt": "2026-09-05T12:00:00.000Z",
    "dateSource": "preview",
    "reactionCount": null,
    "commentCount": null,
    "shareCount": null
  }
]
```

Fast starts with a four-minute search budget. Each keyword gets an initial search, and any work already in progress can finish after that window. Productive searches get more pages while they keep finding new posts. The summary records why each keyword stopped. Exhaustive uses adaptive date windows and stops unproductive searches instead of checking every day separately.

### Facebook post search FAQ

#### Can I get every post mentioning my keyword?

Coverage depends on what is publicly discoverable. Some posts require an account, change visibility or disappear. The requested number is a maximum. For a sparse topic, try a local spelling or broaden the date range. If you get few results, clear the calendars to allow the full year, or choose Exhaustive to look for more matches.

#### How much of my date range was covered?

Open **Run summary** and find the entry for your keyword. It shows how many posts were saved, how many calendar days were checked, and how many candidates were skipped for missing or out-of-range dates. A keyword marked `limitReached` already has the number you requested, so the run can stop before checking every day. A `partial` entry means one or more searches or detail requests could not finish.

#### How can I manage speed and cost?

Start with 10 posts per keyword and inspect the matches before raising the cap. Focus your first run on a few phrases and dates that matter to your research. Longer periods and larger keyword lists can take more time. Apify shows actual usage in each run.

### Italiano

Exhaustive distribuisce i controlli sull’intero periodo e approfondisce le finestre produttive. Salta le pagine vuote e interrompe quelle che non aggiungono post nuovi, senza controllare singolarmente ogni giorno degli intervalli lunghi. Puoi impostare fino a 3.000 post per keyword.

**Cerca post pubblici su Facebook per parola chiave, paese e data** e scarica i risultati in Excel, CSV o JSON. Puoi partire dal nome di un prodotto, da un evento o da uno slogan. Ogni riga conserva il link al post e la parola chiave che lo ha trovato. Per iniziare basta il modulo di Apify, senza scrivere codice o inserire credenziali Facebook.

#### Come cercare i post su Facebook

1. Apri **Input**. In **Keywords or phrases** inserisci una parola o un’espressione per riga. Puoi cercare fino a 100 espressioni per esecuzione, con un massimo di 200 caratteri ciascuna.
2. In **Search country** scegli il mercato da privilegiare, ad esempio **Italy**, oppure lascia **Worldwide** per una ricerca internazionale. Il paese orienta i risultati, ma non identifica il luogo di residenza dell’autore. Per confrontare due mercati, avvia due ricerche con le stesse parole chiave.
3. Usa **Published on or after** per il primo giorno e **Published on or before** per l’ultimo. Puoi scegliere una data da oggi fino allo stesso giorno di 12 mesi fa. Entrambi i giorni sono inclusi e seguono il fuso UTC. Per cercare un solo giorno, seleziona la stessa data nei due calendari.
4. In **Maximum posts per keyword** indica quanti post vuoi per ciascuna espressione. Puoi scegliere da 1 a 3.000, con 50 come valore iniziale. Per provare un nuovo argomento, parti da 10 e lascia **Fast**. La modalità rapida campiona il periodo e può fermarsi prima del limite se emergono pochi nuovi post. Scegli **Exhaustive** se preferisci controllare più date e più risultati, anche a costo di una ricerca più lunga.
5. Premi **Start**, poi apri **Output → Facebook posts**. Dal pulsante **Export** scegli Excel o CSV per lavorare in un foglio di calcolo, oppure JSON per un’integrazione.

#### Esempio di ricerca per una rassegna

Per preparare una rassegna sul cinema in Italia, inserisci `festival del cinema` e `cinema all’aperto` su due righe. Scegli **Italy**, **la prima settimana del mese scorso** e **25 post per parola chiave**. Otterrai fino a 50 righe. Se uno stesso post risponde a entrambe le espressioni, compare una volta per ciascuna. Per contare i post unici dell’intera rassegna puoi raggruppare le righe per `postId` o link.

Per monitorare un marchio, usa il nome commerciale e lo slogan della campagna come due espressioni distinte. Per seguire un evento locale, abbina il nome della manifestazione a quello della città. Puoi salvare le impostazioni come attività Apify e ripetere la ricerca quando ti serve.

#### Quali dati trovi nel file

| Vista | Come usarla |
| --- | --- |
| **Posts** | Leggi il testo disponibile, controlla autore e data, apri il link originale prima di citare il post. |
| **Engagement** | Confronta reazioni, commenti e condivisioni disponibili al momento della raccolta. Un campo vuoto significa dato non disponibile, mentre `0` significa che il conteggio visibile era zero. |
| **All fields** | Esporta anche identificativo, formato del post, immagine o anteprima, hashtag, origine della data e orario di raccolta. |

In modalità **Fast**, ogni parola chiave riceve una prima ricerca. Dopo circa quattro minuti si chiude l’avvio di ulteriori ricerche e si completano i post già in lavorazione. Nel riepilogo puoi vedere il motivo di arresto per ciascuna keyword. **Exhaustive** approfondisce le finestre produttive senza controllare singolarmente ogni giorno degli intervalli lunghi.

#### Come leggere date e copertura

La raccolta include solo post con una data disponibile e risalenti agli ultimi 12 mesi, anche quando lasci vuoti i calendari. Il campo `dateSource` indica `post` se la data proviene dalla pubblicazione e `preview` se proviene dall’anteprima pubblica. Per cercare nell’intero anno lascia vuoti i calendari. Una data precedente a un anno fa o futura ferma la ricerca prima della raccolta e il messaggio indica l’intervallo ammesso. Se scegli soltanto la data finale, il periodo va dal primo giorno ammissibile, 12 mesi fa, fino alla data che hai scelto.

In **Output → Run summary** trovi, per ogni espressione, quanti post sono stati salvati, quanti giorni sono stati controllati e quanti risultati sono stati esclusi per data assente o fuori intervallo. Lo stato `limitReached` indica che la ricerca ha già raggiunto il numero richiesto. Con `partial` una parte della raccolta non si è conclusa. La quantità disponibile dipende dai post accessibili pubblicamente: se una ricerca restituisce poco, prova una variante locale del nome o un intervallo più ampio.

[Scopri gli altri Actor di LofoMachines per le tue ricerche sui social →](https://apify.com/lofomachines)

### Español

Exhaustive distribuye las comprobaciones por todo el período y profundiza en las ventanas productivas. Omite páginas vacías y detiene las que ya no añaden publicaciones nuevas; no revisa cada día de los períodos largos. Puedes solicitar hasta 3.000 publicaciones por palabra clave.

**Busca publicaciones públicas de Facebook por palabra clave, país y fecha.** Para seguir una feria, introduce `feria del libro` y el nombre del recinto en líneas distintas. Selecciona **Spain**, marca las fechas en los calendarios y fija un máximo por búsqueda. Puedes incluir hasta 100 expresiones en una ejecución.

Abre **Output → Facebook posts** para ver los enlaces, el texto disponible, el autor y la fecha. En **Engagement** puedes comparar las reacciones, los comentarios y las veces que se compartió cada publicación cuando esos datos están disponibles. Exporta los resultados a Excel, CSV o JSON. El país orienta la búsqueda al mercado elegido. Todos los resultados deben tener una fecha dentro de los últimos 12 meses, incluso si dejas ambos calendarios vacíos. Elige **Fast** para una muestra rápida o **Exhaustive** para revisar más fechas y resultados. Las filas marcadas como `preview` proceden de una vista previa pública. El resumen muestra los resultados por búsqueda.

### Français

Exhaustive répartit les vérifications sur toute la période et approfondit les fenêtres productives. Les pages vides ou sans nouvelles publications sont arrêtées; chaque jour des longues périodes n’est pas vérifié individuellement. La limite est de 3 000 publications par mot-clé.

**Retrouvez des publications Facebook publiques par mot-clé, pays et date.** Pour préparer une revue de presse, saisissez par exemple `salon du livre` puis le nom de la ville sur une autre ligne. Choisissez **France**, sélectionnez les dates du salon et fixez le nombre maximal de publications pour chaque expression.

Ouvrez **Output → Facebook posts** pour retrouver le texte disponible, les auteurs, les dates et les liens d’origine. La vue **Engagement** affiche les réactions, commentaires et partages visibles. Une case vide indique une donnée indisponible. Exportez le tableau au format Excel, CSV ou JSON. Le pays correspond au marché de recherche. Seules les publications datées des 12 derniers mois sont incluses, même si les deux calendriers restent vides. Choisissez **Fast** pour un échantillon rapide ou **Exhaustive** pour examiner davantage de dates et de résultats. La mention `preview` signale un simple aperçu public. Le bilan indique combien de publications ont été enregistrées pour chaque expression.

### Deutsch

Exhaustive verteilt Prüfungen über den gesamten Zeitraum und vertieft ergiebige Zeitfenster. Leere Seiten und Seiten ohne neue Beiträge werden nicht weiterverfolgt; bei langen Zeiträumen wird nicht jeder Tag einzeln geprüft. Bis zu 3.000 Beiträge pro Suchbegriff sind möglich.

**Öffentliche Facebook-Beiträge nach Suchbegriff, Land und Datum finden.** Für einen Veranstaltungsbericht geben Sie etwa `Buchmesse` und den Veranstaltungsort in getrennten Zeilen ein. Wählen Sie **Germany**, den Zeitraum im Kalender und die maximale Anzahl von Beiträgen pro Suchbegriff.

Unter **Output → Facebook posts** stehen die Links, die verfügbaren Texte, Autoren und Veröffentlichungsdaten. Die Ansicht **Engagement** zeigt sichtbare Reaktionen, Kommentare und geteilte Beiträge. Leere Felder kennzeichnen fehlende Angaben. Die Ergebnisse lassen sich als Excel, CSV oder JSON exportieren. Das gewählte Land steuert den Suchmarkt. Auch bei leeren Kalenderfeldern erscheinen nur datierte Beiträge aus den letzten zwölf Monaten. **Fast** liefert eine schnelle Stichprobe. **Exhaustive** prüft weitere Tage und Ergebnisse. Bei `preview` war nur die öffentliche Vorschau verfügbar. Die Zusammenfassung nennt die Anzahl der Ergebnisse je Suchbegriff.

### Português

Exhaustive distribui as verificações por todo o período e aprofunda as janelas produtivas. Páginas vazias ou sem novas publicações deixam de ser exploradas; períodos longos não são verificados dia a dia. O limite é de 3.000 publicações por palavra-chave.

**Encontre publicações públicas do Facebook por palavra-chave, país e data.** Para acompanhar um evento, insira `feira do livro` e o nome do local, um por linha. Selecione **Brazil**, escolha as datas no calendário e defina quantas publicações deseja por termo.

Em **Output → Facebook posts**, consulte o texto disponível, o autor, a data e o link da publicação. A visualização **Engagement** reúne as contagens visíveis de reações, comentários e compartilhamentos. Um campo vazio indica que a contagem estava indisponível. Exporte os dados em Excel, CSV ou JSON. O país corresponde ao mercado da busca. Mesmo com os calendários vazios, entram apenas publicações datadas dos últimos 12 meses. Escolha **Fast** para uma amostra rápida ou **Exhaustive** para examinar mais datas e resultados. O valor `preview` indica que só a prévia pública estava disponível. O resumo informa quantas publicações foram salvas por termo.

[Discover more social media scrapers and research tools by LofoMachines on Apify →](https://apify.com/lofomachines)

### Search API: connect your workflow

Use **Input** for a saved, exportable dataset, or **Server → POST /search → Try it out** for an immediate JSON response in your app or automation. Both interfaces accept the same keywords, country, dates and maximum of **3,000 posts per keyword**. Batch remains the best choice for large collections and longer Exhaustive searches.

The server supports both **single-tenant** and **multi-tenant** operation. Apify activates one tenancy at a time in **Settings → Server**. Each request is isolated: its results are returned only in its response and are not written to a shared dataset. Plan-based event prices apply. See the pricing section below and the live Pricing tab before starting a search.

**Example request — POST /search**

```json
{"keywords":["Milano Design Week"],"country":"IT","maxPostsPerQuery":3,"searchMode":"fast"}
```

Copy the server URL from the **Server** tab. Authenticate with `Authorization: Bearer <APIFY_TOKEN>` in your HTTP client. The interactive Server form handles authentication for you. `GET /health` checks readiness; `GET /openapi.json` describes the API.

**Example response — illustrative excerpt**

```json
{"requestId":"example","status":"completed","partialReason":null,"items":[{"keyword":"Milano Design Week","country":"IT","postType":"post","title":"Design week highlights"}],"summary":{"totalPosts":1,"maxPostsPerQuery":3},"nextStep":null}
```

Each HTTP request collects for up to **220 seconds**, allows up to 100 keywords and accepts the full 1–3,000 per-keyword cap. The cap is a maximum, not a promised result count. Responses are limited to 16 MiB; the request body limit is 256 KiB. A time or size cutoff returns the collected items with `status: "partial"`, a reason and per-keyword counts. Missing public metadata stays empty. For a complete longer attempt, use the same input in the **Input** tab; server responses are not resumable batch checkpoints.

An empty successful search returns HTTP 200 with no items. Invalid input returns 400; missing server authentication returns 401; excessive body size returns 413; unsupported content type returns 415. A busy server returns 429 with `Retry-After`. A failed search with no results returns 503; available partial results remain explicit in the response. Disconnecting cancels the request's work.

#### API: Italiano

Apri **Server → POST /search → Try it out** per ricevere i post direttamente in JSON, con le stesse keyword, paese, date e massimo di 3.000 post per keyword. Le richieste sono isolate e non salvano i risultati in un dataset condiviso. Sono supportati single-tenant e multi-tenant, con una tenancy attiva alla volta. Dopo 220 secondi o al limite della risposta, `partial` segnala i risultati parziali; per raccolte lunghe usa **Input** e il dataset esportabile.

#### API: Español

Abre **Server → POST /search** para recibir JSON con las mismas palabras clave, país, fechas y hasta 3.000 publicaciones por palabra clave. Las solicitudes están aisladas, sin dataset compartido. Admite single-tenant y multi-tenant, uno activo a la vez. Cada solicitud tiene 220 segundos; `partial` indica una colección incompleta. Usa **Input** para trabajos largos.

#### API: Français

Ouvrez **Server → POST /search** pour recevoir du JSON avec les mêmes mots-clés, pays, dates et une limite de 3 000 publications par mot-clé. Les requêtes sont isolées, sans dataset partagé. Les modes single-tenant et multi-tenant sont pris en charge, un seul étant actif à la fois. Après 220 secondes, `partial` signale une collecte incomplète. Utilisez **Input** pour les collectes longues.

#### API: Deutsch

Über **Server → POST /search** erhalten Sie JSON mit denselben Suchbegriffen, Ländern, Datumsfiltern und bis zu 3.000 Beiträgen pro Suchbegriff. Anfragen sind voneinander getrennt; Ergebnisse werden nicht in einem gemeinsamen Dataset gespeichert. Single-Tenant und Multi-Tenant werden unterstützt, jeweils einer aktiv. Das Zeitbudget beträgt 220 Sekunden; `partial` kennzeichnet unvollständige Ergebnisse. Für längere Suchen verwenden Sie **Input**.

#### API: Português

Use **Server → POST /search** para receber JSON com as mesmas palavras-chave, país, datas e até 3.000 publicações por palavra-chave. As solicitações são isoladas, sem dataset compartilhado. Há suporte a single-tenant e multi-tenant, com um ativo por vez. O limite é de 220 segundos; `partial` indica resultados incompletos. Use **Input** para coletas longas.

[Discover more LofoMachines Actors](https://apify.com/lofomachines)

### Clear pricing for bulk searches and API workflows

Post rows have the same plan-based rate in batch and server responses. Higher Apify plans receive automatic discounts; Platinum and Diamond use the Gold rates. The result cap is not a prepaid package: post charges apply only to rows actually delivered. A post matching two keywords can appear and be charged once under each keyword.

| Charge | Free | Starter / Bronze | Scale / Silver | Business / Gold |
|---|---:|---:|---:|---:|
| 1,000 post rows | $0.69 | $0.59 | $0.49 | $0.39 |
| Each accepted keyword | $0.001 | $0.001 | $0.0009 | $0.0008 |
| Each processing block | $0.003 | $0.003 | $0.0026 | $0.0023 |
| Each API search request (server only) | $0.004 | $0.004 | $0.0035 | $0.003 |

A **processing block** is up to 60 seconds of active collection at 512 MB, 30 seconds at 1 GB, 15 seconds at 2 GB or 7.5 seconds at 4 GB. Each started block is charged in advance, including the first block. Longer searches use more blocks. Each server request has its own processing blocks; idle server time does not create processing events.

Batch runs and single-tenant server runs also have the standard **Actor start** charge of $0.00005 per GB of allocated memory, minimum one event. Multi-tenant API users pay the API request charge instead of an Actor start charge for a shared run. Keyword and processing charges apply even when no matching posts are found. Invalid server input, readiness checks and the API schema do not trigger custom event charges.

**Example at the Starter rate:** a batch delivering 1,000 post rows from 10 accepted keywords and using 2 processing blocks costs the post price above + $0.01 for keywords + $0.006 for processing, plus Actor start. The equivalent API request adds $0.004 for the request. This example counts work units, not a promise about the time or result count of your search.

Platform usage is included for batch and multi-tenant API searches. Apify always adds infrastructure usage separately for **single-tenant servers**. Use the **maximum cost** setting for batch runs. For API requests, optionally set the `X-Search-Max-Charge-Usd` header (default $10). The API conservatively checks that budget using the highest plan rate; discounts can make the actual charge lower. A budget stop returns available paid rows with `partialReason: "spendingLimit"`; a starting budget that cannot cover setup and one potential post returns HTTP 402. The remaining post budget also limits collection work before pages are opened.

Partial searches charge only delivered rows plus the accepted keywords and started processing blocks. A disconnected API request stops collecting; accepted-work charges may already apply. Post charges are recorded immediately before the response is sent. If disconnection is detected before that step, no post charge is added; a connection failure during delivery may leave an already recorded charge. Batch checkpoint continuation does not charge its submitted keywords again. See the live **Pricing** tab for the active prices.

**Italiano:** prezzi per post con sconti automatici in base al piano; si aggiungono keyword accettate e blocchi di elaborazione, anche per ricerche vuote. Le chiamate server hanno una piccola tariffa per richiesta. Il prezzo totale dipende dai risultati e dal lavoro svolto: consulta la tabella e imposta un budget.

**Español:** descuentos automáticos por plan. Además de las publicaciones entregadas, se cobran las palabras clave aceptadas y los bloques de procesamiento, incluso sin resultados; la API añade una tarifa por solicitud. Consulta la tabla y define un presupuesto.

**Français:** remises automatiques selon le forfait. Les mots-clés acceptés et les blocs de traitement sont facturés même sans résultat, en plus des publications livrées; l’API ajoute des frais par requête. Consultez le tableau et fixez un budget.

**Deutsch:** automatische Rabatte je Tarif. Zusätzlich zu gelieferten Beiträgen werden angenommene Suchbegriffe und Verarbeitungsblöcke auch bei leeren Suchen berechnet; die API berechnet eine Gebühr pro Anfrage. Preise und Budget vor dem Start prüfen.

**Português:** descontos automáticos por plano. Além das publicações entregues, há cobranças por palavras-chave aceitas e blocos de processamento, mesmo sem resultados; a API inclui uma tarifa por solicitação. Consulte a tabela e defina um orçamento.

[Discover more LofoMachines Actors](https://apify.com/lofomachines)

# Actor input Schema

## `keywords` (type: `array`):

Enter one brand, event or phrase per line. Add up to 100 keywords of 200 characters each. The limit below applies separately to every keyword.

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

Choose a market to prioritize results relevant to that country. Leave Worldwide for a broader search. The author’s location may differ.

## `newerThan` (type: `string`):

Choose a UTC date from the last 12 months, including today. Leave empty to allow posts back to the same date last year. Earlier and future dates are rejected.

## `olderThan` (type: `string`):

Choose a UTC date from the last 12 months, up to and including today. Leave empty to include today. Use the same date in both calendars for one day.

## `maxPostsPerQuery` (type: `integer`):

Return up to this many posts for each keyword (1–3,000). Fewer posts may be available. Start with 10 to preview a topic.

## `searchMode` (type: `string`):

Fast finds an economical sample. Exhaustive checks more pages and date windows across your selected period, explores productive windows, and stops searches that no longer add new posts. It skips unproductive days instead of checking every day separately. Neither mode guarantees every available post. Both respect your per-keyword limit.

## Actor input object example

```json
{
  "keywords": [
    "film festival"
  ],
  "country": "ANY",
  "maxPostsPerQuery": 50,
  "searchMode": "fast"
}
```

# Actor output Schema

## `posts` (type: `string`):

One row per public post for each matching keyword.

## `summary` (type: `string`):

Coverage and counts for this run.

# 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 = {
    "keywords": [
        "film festival"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("lofomachines/facebook-post-search-scraper").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 = { "keywords": ["film festival"] }

# Run the Actor and wait for it to finish
run = client.actor("lofomachines/facebook-post-search-scraper").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 '{
  "keywords": [
    "film festival"
  ]
}' |
apify call lofomachines/facebook-post-search-scraper --silent --output-dataset

```

## MCP server setup

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

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/6bftgVbGCFv6IHESQ/builds/pvWN1irhZ1aQax7x3/openapi.json
